Real-time control and online monitoring system for digital twin heavy-load mechanical arm
The real-time control and online monitoring system of the heavy-duty robotic arm built through digital twin technology uses virtual simulation engines and reinforcement learning algorithms to solve the accuracy and efficiency problems of heavy-duty robotic arm control and monitoring, and improve the stability and stability of the robotic arm. Reliability promotes the development of industrial automation.
Patent Information
- Application Number
- CN202410668723.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-28
- Publication Date
- 2024-08-27
AI Technical Summary
The control and monitoring of heavy-duty robotic arms face challenges in precise control, environmental adaptability, and safety in practical applications. Traditional testing methods are costly and inefficient, and cannot meet actual needs.
Digital twin technology is used to build a real-time control and online monitoring system, including a real heavy-load robotic arm, a robot operating system and a virtual simulation engine. Motion trajectory control is achieved through sensor data collection, controller modules and communication modules, combined with reinforcement learning algorithms and fuzzy control. Algorithms for precise control and status monitoring.
It improves the stability and reliability of heavy-duty robotic arms in actual production, provides comprehensive and efficient testing and optimization tools, and promotes the development of the industrial automation field.
Smart Images

Figure CN118544346A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of robot control and state monitoring, and more specifically, to a digital twin heavy-load robotic arm real-time control and online monitoring system. Background Art
[0002] Digital twin technology is an innovative method to simulate, predict and optimize the behavior and performance of entities. It realizes the simulation and real-time monitoring of entities by building accurate digital models of entities in a virtual environment. In the industrial field, digital twin technology has been widely used in robot control and condition monitoring, providing a powerful tool for the testing and optimization of heavy-duty robotic arms.
[0003] Heavy-duty robotic arms are commonly used in industrial automation for carrying and manipulating heavy objects. However, in practical applications, the control and monitoring of heavy-duty robotic arms face many challenges, such as precise control, environmental adaptability, and safety. Traditional testing methods are often limited by cost and efficiency and cannot meet actual needs. Summary of the invention
[0004] In order to solve the shortcomings of the prior art, the present invention provides a digital twin heavy-load robotic arm real-time control and online monitoring system, which can help users more comprehensively understand the working status and performance characteristics of the heavy-load robotic arm during the test process, discover potential problems and optimize them, thereby improving its stability and reliability in actual production.
[0005] As a first aspect of the present invention, a digital twin heavy-load robotic arm real-time control and online monitoring system is provided, comprising: a real heavy-load robotic arm, a robot operating system, a virtual simulation engine and a database, wherein the robot operating system comprises a sensor data acquisition module, a controller module and a communication module, the virtual simulation engine comprises a visualization module and a simulated heavy-load robotic arm, the database comprises a data storage module, the sensor data acquisition module, the controller module, the visualization module and the data storage module are all connected to the communication module, the real heavy-load robotic arm is respectively connected to the sensor data acquisition module and the controller module, the simulated heavy-load robotic arm is respectively connected to the visualization module and the sensor data acquisition module, and the data storage module is connected to the visualization module; wherein,
[0006] The sensor data acquisition module is used to collect the real sensor data on the real heavy-load robotic arm and the simulated sensor data on the simulated heavy-load robotic arm, and transmit the collected real sensor data and simulated sensor data to the controller module, the data storage module and the visualization module respectively through the communication module; wherein, after receiving the real sensor data, the visualization module renders the state of the simulated heavy-load robotic arm in real time;
[0007] The visualization module is used to set task instruction data and transmit the task instruction data to the controller module through the communication module;
[0008] The controller module is used to generate motion trajectory control instructions according to the task instruction data, real sensor data and simulated sensor data, and then issue the motion trajectory control instructions to the real heavy-load robotic arm to control the motion state of the real heavy-load robotic arm.
[0009] Furthermore, the real heavy-load manipulator is equipped with a real sensor, which includes any one or more of a position sensor, a velocity sensor, an acceleration sensor, a force sensor, a torque sensor and an image sensor, and the simulated heavy-load manipulator based on the virtual simulation engine is equipped with a simulated sensor with the same function;
[0010] Using the ROS node and function package mechanism, a ROS driver function package of a real sensor is created; based on the simulated sensor data interface provided by the virtual simulation engine, a ROS driver function package of a simulated sensor is designed; wherein the ROS driver function package of the real sensor is based on the driver interface provided by the sensor data acquisition module and is designed through the ROS node and function package mechanism;
[0011] The sensor data acquisition module performs filtering processing on the collected real sensor data and simulated sensor data;
[0012] The sensor data acquisition module outputs the filtered sensor data through the data transmission interface.
[0013] Further, the communication module establishes a connection with the sensor data acquisition module based on the Socket method. Once the connection is successfully established, the communication module sends a data request to the sensor data acquisition module, including sending a specific command or request to trigger the sensor data acquisition module to start collecting sensor data and transmit it to the communication module through the ROS topic communication mechanism;
[0014] The data storage module sends a request to the communication module, and obtains the filtered sensor data after establishing a connection, so as to store the filtered sensor data in a database; wherein a data query and management interface is created in the database through ROS node and topic communication.
[0015] Furthermore, the communication module inserts the filtered sensor data into the database according to a predefined data model, including decomposing the data into fields in the database and ensuring that the data type of each field matches the predefined data model; wherein the data insertion operation is implemented by executing an INSERT INTO statement to insert the filtered sensor data one by one into the corresponding data table in the database.
[0016] Furthermore, the controller module processes the received real sensor data and simulated sensor data, including parsing data and coordinate system conversion; and performs joint trajectory planning based on the processed sensor data and the kinematic model of the heavy-duty manipulator, including the motion trajectory of each joint, to achieve the action or task of the real heavy-duty manipulator; and then generates corresponding motion trajectory control instructions according to the joint trajectory planning results, and the motion trajectory control instructions include joint position, velocity and acceleration;
[0017] The controller module outputs the generated motion trajectory control instructions to the real heavy-load robotic arm to control the movement of the real heavy-load robotic arm; wherein the motion trajectory control instructions are sent to the robot's actuator or driver motor in the form of digital signals or analog signals to achieve precise control of the real heavy-load robotic arm joints.
[0018] Furthermore, the control algorithm of the controller module includes a PID control algorithm, a fuzzy control algorithm, an adaptive control algorithm, a force control algorithm, a visual servo control algorithm or a reinforcement learning control algorithm, wherein the implementation steps of the reinforcement learning control algorithm include:
[0019] (1) Configure the simulation environment with the help of virtual simulation engine
[0020] First, obtain the relevant resources of the virtual simulation engine and import them into the virtual simulation engine project; then, create a new scene and add the components and resources of the virtual simulation engine, including the simulated heavy-loaded robotic arm, terrain, lighting, and simulated sensors; and configure the simulation parameters of the virtual simulation engine according to the simulation requirements, including the physical properties and joint constraints of the simulated heavy-loaded robotic arm; then, write a control script to realize the motion control of the simulated heavy-loaded robotic arm; then, start the simulation environment in the virtual simulation engine;
[0021] (2) Use the received sensor data to construct the state space for reinforcement learning
[0022] According to the application scenario and task requirements, appropriate state features are selected and relevant features are extracted from the sensor data. Then, a state space is constructed based on the extracted relevant features, and the sensor data is mapped to discrete or continuous states in the state space, where the dimension and granularity of the state space can be adjusted and optimized according to the complexity and requirements of the task.
[0023] (3) Using joint angle values to construct the action space for reinforcement learning
[0024] First, collect and preprocess the robot's joint angle data to ensure the accuracy and consistency of the data. The joint angle data is obtained through sensors or simulation environments, including the angle values of each joint of the robot. Second, select appropriate action parameters based on the robot's action space definition. The action parameters are the angle range or discrete action set of each joint of the robot, or the increment or speed of the joint angle. Then, construct the action space based on the selected action parameters, and map the joint angle values to discrete or continuous actions in the action space. The dimension and granularity of the action space can be adjusted and optimized according to the complexity and requirements of the task.
[0025] (4) Design reward function using Euclidean distance of the end-position of the heavy-duty manipulator
[0026] First, it is necessary to define the target position of the robot when performing the task. The target position can be a pre-set fixed position or a position that changes dynamically according to the specific task. At each time step, the current position and posture of the end of the heavy-duty robot arm are obtained through the robot's sensor or simulation environment. The current position of the end of the heavy-duty robot arm is compared with the target position, and the Euclidean distance between them is calculated. An enhanced reward function is designed based on the calculated Euclidean distance, that is, when the end position of the heavy-duty robot arm is close to the target position, the reward value increases; when the end position of the heavy-duty robot arm deviates from the target position, the reward value decreases.
[0027] (5) Training the model through reinforcement learning algorithm
[0028] Based on the designed state space, action space and reward function, select a suitable reinforcement learning algorithm; in a simulated environment or a real environment, use the current strategy to interact with the environment and collect training data; use the collected training data to train the model through the reinforcement learning algorithm; during the training process, the model selects actions based on the current state and updates according to the rewards fed back by the environment; during the training process, evaluate the convergence of the model by drawing a learning curve, and regularly evaluate the performance and learning effect of the model; according to the evaluation results, adjust the model parameters or algorithm hyperparameters in a timely manner to improve the performance and generalization ability of the model;
[0029] (6) Use the trained model to generate joint trajectory information
[0030] In a simulation environment or a real environment, use the trained model to interact with the environment; the model selects actions based on the current state and executes actions according to the strategy; based on the joint angle actions selected by the model, control the real heavy-load robotic arm to perform corresponding actions.
[0031] Furthermore, the reward function designed using the Euclidean distance of the end position of the heavy-duty manipulator also includes:
[0032] The reward function is defined using the following formula:
[0033] R(s,a,s')=exp(-α*distance(s',target))
[0034] Among them, R(s,a,s') represents the reward obtained by taking action a in state s to transfer to state s'; distance(s',target) represents the Euclidean distance between the current state s' and the target position; α is a tuning parameter that controls the rate at which the reward decays.
[0035] Further, the visualization module includes a graphics rendering area and a human-computer interaction area;
[0036] The graphic rendering area is used to display the simulated heavy-loaded mechanical arm, the simulation environment and the real-time data curve; in the virtual simulation engine, the simulated heavy-loaded mechanical arm can be imported, and its position and posture in the simulation environment can be set; at the same time, the rendering function of the virtual simulation engine can be used to render the simulated heavy-loaded mechanical arm on the screen; at the same time, the real-time data curve can be drawn in the graphic rendering area to display the curve of the end position of the simulated heavy-loaded mechanical arm changing with time, so as to monitor and analyze the motion state of the real heavy-loaded mechanical arm in real time;
[0037] The human-computer interaction area includes control command buttons, which are used to enable users to control and operate the real heavy-load robotic arm; through the user interface design function of the virtual simulation engine, buttons, sliders and input boxes are created in the human-computer interaction area, and corresponding logic codes are added.
[0038] As a second aspect of the present invention, a digital twin heavy-duty robotic arm real-time control and online monitoring system is provided, comprising: a real heavy-duty robotic arm, a robot operating system, a virtual simulation engine and a database, wherein the robot operating system comprises a sensor data acquisition module, a controller module and a communication module, the virtual simulation engine comprises a visualization module, the database comprises a data storage module, the sensor data acquisition module, the controller module, the visualization module and the data storage module are all connected to the communication module, and the real heavy-duty robotic arm is respectively connected to the sensor data acquisition module and the controller module; wherein,
[0039] The sensor data acquisition module is used to collect real sensor data on the real heavy-duty mechanical arm, and transmit the collected real sensor data to the controller module, the data storage module and the visualization module respectively through the communication module;
[0040] The visualization module is used to set task instruction data and transmit the task instruction data to the controller module through the communication module;
[0041] The controller module is used to generate motion trajectory control instructions according to the task instruction data and real sensor data, and then issue the motion trajectory control instructions to the real heavy-load robotic arm to control the motion state of the real heavy-load robotic arm.
[0042] As a third aspect of the present invention, a digital twin heavy-load robotic arm real-time control and online monitoring system is provided, comprising: a robot operating system, a virtual simulation engine and a database, the robot operating system comprising a sensor data acquisition module, a controller module and a communication module, the virtual simulation engine comprising a visualization module and a simulated heavy-load robotic arm, the database comprising a data storage module, the sensor data acquisition module, the controller module, the visualization module and the data storage module are all connected to the communication module, the simulated heavy-load robotic arm is respectively connected to the controller module, the visualization module and the sensor data acquisition module, and the data storage module is connected to the visualization module; wherein,
[0043] The sensor data acquisition module is used to collect the simulated sensor data on the simulated heavy-load mechanical arm, and transmit the collected simulated sensor data to the controller module, the data storage module and the visualization module respectively through the communication module;
[0044] The visualization module is used to set task instruction data and transmit the task instruction data to the controller module through the communication module;
[0045] The controller module is used to generate a motion trajectory control instruction according to the task instruction data and the simulation sensor data, and then issue the motion trajectory control instruction to the simulation heavy-load robotic arm to control the motion state of the simulation heavy-load robotic arm.
[0046] The digital twin heavy-load robotic arm real-time control and online monitoring system provided by the present invention has the following advantages: it is constructed using a modular method, providing users with a comprehensive and efficient heavy-load robotic arm testing and optimization tool, which helps to improve the stability and reliability of the heavy-load robotic arm in actual production, thereby promoting the development of the field of industrial automation. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present invention, but do not constitute a limitation of the present invention.
[0048] Figure 1 A structural diagram of the digital twin heavy-load robotic arm real-time control and online monitoring system provided by the present invention.
[0049] Figure 2 Another structural diagram of the digital twin heavy-load robotic arm real-time control and online monitoring system provided by the present invention.
[0050] Figure 3 Another structural diagram of the digital twin heavy-load robotic arm real-time control and online monitoring system provided by the present invention.
[0051] Figure 4 This is a flow chart for implementing the sensor data acquisition module provided by the present invention.
[0052] Figure 5 This is a flow chart of the implementation of the data storage module provided by the present invention.
[0053] Figure 6 This is a flow chart of the implementation of the controller module provided by the present invention.
[0054] Figure 7 A schematic diagram of the flow chart of the reinforcement learning control algorithm provided by the present invention.
[0055] Figure 8 This is a flow chart for implementing the communication module provided by the present invention.
[0056] Fig. 9 This is a schematic diagram of the interface of the visualization module provided by the present invention. DETAILED DESCRIPTION
[0057] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation method, structure, characteristics and effects of the real-time control and online monitoring system of the digital twin heavy-duty robotic arm proposed by the present invention are described in detail below in combination with the accompanying drawings and preferred embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the protection scope of the present invention.
[0058] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so as to describe the embodiments of the present invention described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0059] In the interpretation of the present invention, it should be noted that the terms "installed", "connected" and "connected" should be understood in a broad sense unless otherwise specified. For example, the connection can be a fixed connection, or it can be connected through a special interface, or it can be indirectly connected through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0060] In this embodiment, a digital twin heavy-duty robotic arm real-time control and online monitoring system is provided. Figure 1 As shown, the digital twin heavy-load robotic arm real-time control and online monitoring system includes a real heavy-load robotic arm, a robot operating system, a virtual simulation engine and a database. The robot operating system includes a sensor data acquisition module, a controller module and a communication module. The virtual simulation engine includes a visualization module and a simulated heavy-load robotic arm. The database includes a data storage module. The sensor data acquisition module, the controller module, the visualization module and the data storage module are all connected to the communication module. The real heavy-load robotic arm is respectively connected to the sensor data acquisition module and the controller module. The simulated heavy-load robotic arm is respectively connected to the visualization module and the sensor data acquisition module. The data storage module is connected to the visualization module; wherein,
[0061] The sensor data acquisition module is used to collect the real sensor data on the real heavy-load robotic arm and the simulated sensor data on the simulated heavy-load robotic arm, and transmit the collected real sensor data and simulated sensor data to the controller module, the data storage module and the visualization module respectively through the communication module; wherein, after receiving the real sensor data, the visualization module renders the state of the simulated heavy-load robotic arm in real time;
[0062] The visualization module is used to set task instruction data and transmit the task instruction data to the controller module through the communication module;
[0063] The controller module is used to generate motion trajectory control instructions according to the task instruction data, real sensor data and simulated sensor data, and then issue the motion trajectory control instructions to the real heavy-load robotic arm to control the motion state of the real heavy-load robotic arm.
[0064] In an embodiment of the present invention, a modular approach is adopted to construct the digital twin heavy-duty robotic arm real-time control and online monitoring system. Each module undertakes a specific task, and through close collaboration, real-time control and online monitoring of the heavy-duty robotic arm are achieved. The main equipment includes a real heavy-duty robotic arm device, a ROS system (robot operating system) built in a computer operating system A, a database built in a computer operating system B, and a simulated heavy-duty robotic arm device in a virtual simulation engine built in a computer operating system C. The computer operating system includes but is not limited to Linux, Windows, Mac, and HarmonyOS, and the database includes but is not limited to MySQL, Oracle, Access, Redis, etc. The simulated heavy-duty robotic arm device in the virtual simulation engine includes a simulated heavy-duty robotic arm, a simulated sensor, and a simulated heavy-duty robotic arm working environment.
[0065] The present invention uses a functional modularization method to reduce the coupling degree between different functions and builds a digital twin platform in a method similar to building blocks. The functional modules mainly include sensor data module, data storage module, controller module, communication module, and visualization module. Each module can be developed and debugged separately and can be deployed on different servers in a distributed manner to improve operating performance. After the development of each module is completed, it is integrated into a digital twin heavy-duty robotic arm real-time control and online monitoring system to improve development efficiency.
[0066] It should be noted that the servers mentioned above and below refer to computer devices equipped with different operating systems and corresponding software.
[0067] Preferably, if Figure 4 As shown, the implementation steps of the sensor data acquisition module mainly include the following aspects:
[0068] Step S401: The real heavy-load robotic arm is equipped with real sensors, including but not limited to position sensors, velocity sensors, acceleration sensors, force sensors, torque sensors, image sensors, etc. The simulated heavy-load robotic arm based on the virtual simulation engine is equipped with simulated sensors with the same functions;
[0069] Step S402: Create a ROS driver function package of the real sensor through the driver interface of the sensor data acquisition module and the ROS node and function package mechanism; design a ROS driver function package of the simulated sensor based on the simulated sensor data interface provided by the virtual simulation engine; the sensor data acquisition module has the characteristics of high-speed sampling and high precision, and is suitable for real-time acquisition and processing of sensor data. Among them, the driver interface of the real sensor uses the SDK (software development tool) provided by the data acquisition card to call the corresponding function to realize data acquisition and storage. During the data acquisition process, parameters such as sampling frequency, sampling channel, sampling accuracy, etc. can be set to meet the needs of different sensors.
[0070] It should be noted that the ROS driver function package uses the node and function package mechanism of ROS to encapsulate the above-mentioned driver interface into a ROS driver function package. First, create a function package in ROS, and then create a ROS node in the function package to communicate with the data acquisition card and send the collected data to the ROS topic. And some additional functions can also be added, such as parameter configuration, error handling, data visualization, etc., to improve the flexibility and ease of use of the driver package. At the same time, write a startup script to integrate the driver package with the ROS system so that it can be easily deployed and run in the ROS system.
[0071] Step S403: The sensor data acquisition module performs filtering processing on the collected real sensor data and simulated sensor data to ensure the accuracy and reliability of the data; in the actual production environment, the data collected by the sensor is often affected by various interferences and noises, which will reduce the quality and availability of the data and affect the accuracy of subsequent data analysis and application. Therefore, it is necessary to effectively process these noise data to improve the reliability and stability of the data.
[0072] It should be noted that, for the processing of noise data, the present invention adopts a filtering algorithm for processing. Filtering algorithm is a common signal processing technology. By filtering the signal, the noise component in the signal can be removed or weakened, thereby extracting the effective information of the target signal. Commonly used filtering algorithms include mean filtering, median filtering, Gaussian filtering, etc., and the appropriate filtering method is selected according to the specific application scenario and requirements. First, the collected data is analyzed and preprocessed to identify the noise component therein. Then, according to the pre-set filtering algorithm and parameters, the noise data is filtered to remove or weaken the influence of noise and retain the effective information of the target signal. Finally, the data after filtering is obtained for subsequent data analysis and application.
[0073] Step S404: The sensor data acquisition module outputs the filtered sensor data through the data transmission interface. The data transmission interface is an interface specially designed to conveniently realize data transmission between modules. Through this interface, modules can conveniently share data to realize information transmission and exchange. In the present invention, the data transmission interface still adopts the ROS node method to publish the data information after preliminary processing to the topic, so as to realize the transmission of data to the next module.
[0074] It should be noted that the design of the data transmission interface takes into account the needs of data interaction between modules, aiming to provide a simple and effective mechanism so that each module can easily obtain the required data and perform corresponding processing and operations. By creating ROS nodes and publishing data to topics, efficient data transmission is achieved, ensuring the real-time and stability of the system. The design of the data transmission interface makes the data transmission between different modules more flexible and controllable, which is conducive to the overall coordination and operation of the system. At the same time, by using ROS nodes and topics, asynchronous data transmission can also be achieved, further improving the concurrent processing capability of the system and meeting the data transmission requirements in complex scenarios.
[0075] Preferably, if Figure 5 As shown, the implementation steps of the data storage module mainly include the following aspects:
[0076] Step S501: Obtain the preliminarily processed sensor data through the communication module and the ROS topic communication mechanism. First, a connection with the sensor data acquisition module is established in the communication module based on the Socket method. Once the connection is successfully established, the communication module sends a data request to the sensor data acquisition module. It includes sending a specific command or request to trigger the sensor data acquisition module to start collecting data and transmit it to the communication module through the ROS topic communication mechanism. Then the data storage module also sends a request to the communication module, and obtains the filtered sensor data after establishing a connection, so as to store the filtered sensor data in the database; wherein, a data query and management interface is created in the database through ROS node and topic communication, which is convenient for users to analyze, count and debug the data.
[0077] Step S502: Store the collected sensor data in the database. First, you need to establish a connection with the database through the database connection library provided by the programming language, such as MySQL Connector. After the connection is established, you can create a corresponding data table for storing sensor data by executing SQL statements. When creating a data table, you need to consider the type and structure of the sensor data to ensure the efficiency of data storage and query. For example, create a form for a force sensor, the fields included in the form include the primary key id, the timestamp field timestamp, the sensor serial number sensor_id, the force value field force_value, the data unit field unit, the installation location field location, etc.
[0078] Step S503: Create a data query and management interface, which is similar to the data transmission interface of the sensor data acquisition module in step S404, and is implemented through ROS node and topic communication, which will not be repeated here.
[0079] It should be noted that the data storage module is used to store sensor data, algorithm log information and other related data. This module uses a database for data storage to ensure the security and accessibility of the data. During the data storage process, the data can be divided into tables, indexed and other optimization operations according to specific application requirements to improve the query efficiency and performance of the database. For example, the data can be stored in tables according to factors such as time or sensor type to reduce the amount of data during query. At the same time, indexes can be created for frequently queried fields to speed up the query.
[0080] Specifically, the communication module inserts the filtered sensor data into the database according to a predefined data model, including decomposing the data into fields in the database and ensuring that the data type of each field matches the predefined data model; wherein the data insertion operation is implemented by executing an INSERT INTO statement to insert the filtered sensor data one by one into the corresponding data table in the database.
[0081] Furthermore, in order to ensure the security and reliability of data, the transaction and rollback mechanism provided by the database can be used. A transaction can encapsulate a series of database operations into an atomic operation unit, which can either be executed successfully or rolled back if all failed. During data storage, the data insertion operation can be encapsulated in a transaction to ensure data consistency and integrity. If an exception occurs during the data insertion process, the database can be restored to its previous state through the transaction rollback operation to avoid data damage or loss.
[0082] Preferably, if Figure 6 As shown, the implementation steps of the controller module mainly include the following aspects:
[0083] Step S601: Acquire sensor data through the communication module. The data acquisition method is the same as step S501, and will not be repeated here.
[0084] Step S602: The controller module processes the sensor data to output joint trajectory control information. First, the controller module receives sensor data, which includes information such as position, velocity, force and acceleration. Then the controller module processes the received real sensor data and simulated sensor data, including parsing data and coordinate system conversion; and based on the processed sensor data and the kinematic model of the heavy-duty manipulator, performs joint trajectory planning, including the motion trajectory of each joint, to achieve the action or task of the real heavy-duty manipulator; then, according to the joint trajectory planning results, generates corresponding motion trajectory control instructions, which include joint position, velocity and acceleration, and are used to control the movement of the heavy-duty manipulator; the control algorithm generates the optimal control instructions according to the dynamic characteristics and control requirements of the system to achieve stable and precise motion control.
[0085] Step S603: The controller module outputs the generated motion trajectory control instructions to the real heavy-loaded robotic arm to control the movement of the real heavy-loaded robotic arm; wherein the motion trajectory control instructions are sent to the actuator or driver motor of the heavy-loaded robotic arm in the form of digital signals or analog signals to achieve precise control of the joints of the real heavy-loaded robotic arm.
[0086] Preferably, the control algorithm of the controller module includes but is not limited to PID control algorithm, fuzzy control algorithm, adaptive control algorithm, force control algorithm, visual servo control algorithm, reinforcement learning control algorithm, etc., and the control instructions of the heavy-duty manipulator are generated by the control algorithm, wherein, Figure 7 As shown, the implementation steps of the reinforcement learning control algorithm include:
[0087] Step S701: Change the default engine in the virtual simulation engine to one of the engines commonly used in reinforcement learning algorithms, such as Mujoco and ODE, and configure the simulation environment with the help of the virtual simulation engine
[0088] First, obtain the relevant resources of the virtual simulation engine and import them into the virtual simulation engine project; then, create a new scene and add the components and resources of the virtual simulation engine, including the simulated heavy-loaded robotic arm, terrain, lighting, and simulated sensors; and configure the simulation parameters of the virtual simulation engine according to the simulation requirements, including the physical properties and joint constraints of the simulated heavy-loaded robotic arm; then, write a control script to realize the motion control of the simulated heavy-loaded robotic arm; then, start the simulation environment in the virtual simulation engine;
[0089] Step S702: Use the received sensor data to construct the state space of reinforcement learning
[0090] According to the application scenario and task requirements, select appropriate state features and extract relevant features from the sensor data. These features can be the robot's position, speed, posture, obstacle information in the environment, etc. Then, construct the state space based on the extracted relevant features and map the sensor data to discrete or continuous states in the state space, where the dimension and granularity of the state space can be adjusted and optimized according to the complexity and requirements of the task;
[0091] Step S703: Use joint angle values to construct the action space for reinforcement learning
[0092] First, collect and preprocess the robot's joint angle data to ensure the accuracy and consistency of the data. The joint angle data is obtained through sensors or simulation environments, including the angle values of each joint of the robot. Second, select appropriate action parameters based on the robot's action space definition. The action parameters are the angle range or discrete action set of each joint of the robot, or the increment or speed of the joint angle. Then, construct the action space based on the selected action parameters, and map the joint angle values to discrete or continuous actions in the action space. The dimension and granularity of the action space can be adjusted and optimized according to the complexity and requirements of the task.
[0093] Step S704: Design a reward function using the Euclidean distance of the heavy-duty robot end position
[0094] First, it is necessary to define the target position of the robot when performing the task. The target position can be a pre-set fixed position or a position that changes dynamically according to the specific task. At each time step, the current position and posture of the end of the heavy-duty manipulator are obtained through the robot's sensor or simulation environment. The current position of the end of the heavy-duty manipulator is compared with the target position, and the Euclidean distance between them is calculated. The Euclidean distance refers to the straight-line distance between two points in Euclidean space. Design an enhanced reward function based on the calculated Euclidean distance, that is, when the end position of the heavy-duty manipulator is close to the target position, the reward value increases; when the end position of the heavy-duty manipulator deviates from the target position, the reward value decreases. For example, the following formula is used to define the reward function:
[0095] R(s,a,s')=exp(-α*distance(s',target))
[0096] Among them, R(s,a,s') represents the reward obtained by taking action a in state s to transfer to state s'; distance(s',target) represents the Euclidean distance between the current state s' and the target position; α is a tuning parameter that controls the rate at which the reward decays.
[0097] Step S705: Training the model through reinforcement learning algorithm
[0098] Based on the designed state space, action space and reward function, select the appropriate reinforcement learning algorithm, including Q-learning, DQN algorithm for discrete space, SAC, DDPG, TD3, PPO algorithm for continuous space; in a simulation environment or a real environment, use the current strategy to interact with the environment and collect training data; use the collected training data to train the model through the reinforcement learning algorithm; during the training process, the model selects actions according to the current state and updates according to the rewards fed back by the environment; during the training process, evaluate the convergence of the model by drawing the learning curve, and regularly evaluate the performance and learning effect of the model; according to the evaluation results, adjust the model parameters or algorithm hyperparameters in a timely manner to improve the performance and generalization ability of the model;
[0099] Step S706: Generate joint trajectory information using the trained model
[0100] In a simulation environment or a real environment, use the trained model to interact with the environment; the model selects actions based on the current state and executes actions according to the strategy; based on the joint angle actions selected by the model, control the real heavy-load robotic arm to perform corresponding actions.
[0101] Preferably, if Figure 8As shown in the figure, the communication module is implemented through the topic communication mechanism and socket method of ROS, and its implementation steps mainly include the following aspects:
[0102] Step S801: The communication module establishes TCP / IP or UDP communication between different servers through the socket method;
[0103] Step S802: After other servers successfully establish socket communication with the current server, communication between ROS nodes of different servers is established through the ROS topic communication mechanism.
[0104] It should be noted that the sensor data acquisition module creates a ROS publishing node and encapsulates different sensor data into different messages, and then publishes them to the corresponding different topics. For example, the force sensor data is encapsulated into force_msg and published to the corresponding topic / force_data. The same method is used for other sensors, which will not be described here one by one. The visualization module also creates a ROS publishing node, encapsulates the control instruction data and the simulation sensor data into different messages, and also publishes them to the corresponding topic
[0105] / control_data and / sensor_data. The control module and the data storage module obtain the required data by subscribing to the corresponding topics / control_data and / sensor_data. Based on this, the mutual transmission of real or simulated sensor data or control instruction data between different servers can be realized.
[0106] The / control_data and / sensor_data are unified names for topics corresponding to various control command data and various sensor data.
[0107] The topic communication mechanism of ROS is an asynchronous communication method based on the publish / subscribe model, which is used to transmit messages between ROS nodes. It is one of the most commonly used communication mechanisms in ROS and is very suitable for the transmission of real-time data. In ROS, a node can publish a message to a topic, and other nodes can subscribe to the topic to receive messages. The publisher and subscriber are loosely coupled, they do not need to know the existence of each other, they only need to pay attention to the same topic name.
[0108] The socket method is to use the socket library provided by the programming language when the communication module establishes a TCP / IP or UDP connection to establish a stable and reliable communication connection between different servers. Once the connection is successfully established, the communication module can send and receive data through the socket method. When sending data, the send function of the socket is called to encapsulate the data into a data packet and send it to the target server; when receiving data, the recv function of the socket is called to monitor the network port and receive data packets from other servers.
[0109] Preferably, through real-time data communication, the synchronization of the states of the simulated heavy-duty robotic arm and the real heavy-duty robotic arm is achieved, and the user is supported to control and monitor the robotic arm in real time in the virtual simulation engine. The visualization module realizes three-dimensional rendering of the robotic arm state in the virtual simulation engine, and designs an intuitive and friendly robotic arm control interface. This module utilizes the powerful graphics rendering and user interface design functions of the virtual simulation engine to realize real-time visualization of the robotic arm's motion trajectory, working status, and environmental changes, providing users with intuitive and convenient control and monitoring methods. At the same time, customized human-computer interaction functions can also be realized through programming scripts. Among them, Fig. 9 As shown, the visualization module includes a graphics rendering area and a human-computer interaction area;
[0110] The graphic rendering area is used to display the simulated heavy-loaded mechanical arm, the simulation environment and the real-time data curve; in the virtual simulation engine, the simulated heavy-loaded mechanical arm can be imported, and its position and posture in the simulation environment can be set; at the same time, the rendering function of the virtual simulation engine can be used to render the simulated heavy-loaded mechanical arm on the screen to achieve a realistic visual effect; at the same time, the real-time data curve can also be drawn in the graphic rendering area to display the curve of the end position of the simulated heavy-loaded mechanical arm changing with time, so as to monitor and analyze the motion state of the real heavy-loaded mechanical arm in real time;
[0111] The human-computer interaction area includes control command buttons, which are used to enable users to control and operate the real heavy-duty robotic arm. Through the user interface design function of the virtual simulation engine, buttons, sliders, input boxes and other controls are created in the human-computer interaction area, and corresponding logic codes are added. Users can send control commands by clicking buttons or adjusting parameters, such as controlling the motion trajectory of the robotic arm, setting the motion speed, etc. It is convenient to interact with the robotic arm and realize real-time control and monitoring of the robotic arm.
[0112] The human-computer interaction area can also implement more complex interaction logic. For example, you can design a specific action sequence to be triggered after a button is pressed, or adjust the movement of the robot arm in real time according to the parameters entered by the user. By writing logic code in the virtual simulation engine, you can implement various customized human-computer interaction functions to meet different needs.
[0113] The digital twin heavy-duty robotic arm real-time control and online monitoring system provided by the present invention can collect the status information of the heavy-duty robotic arm sensor in real time through ROS, and then transmit the data to the virtual simulation engine system through TCP / IP or UDP network communication protocol. The virtual simulation engine synchronizes the status of the heavy-duty robotic arm in real time, realizes the state synchronization of the simulated heavy-duty robotic arm and the real robotic arm, and can realize the motion control of the robotic arm through the virtual simulation engine. By constructing an accurate digital model of the entity in the simulation environment, the simulation and real-time monitoring of the entity are realized.
[0114] Based on a modular construction method, the digital twin heavy-load robotic arm real-time control and online monitoring system can be divided into two sub-platforms, namely the heavy-load robotic arm control system platform and the heavy-load robotic arm simulation platform, and the two sub-platforms work independently.
[0115] As another embodiment of the present invention, Figure 2 As shown, a digital twin heavy-duty robotic arm real-time control and online monitoring system is provided, comprising a real heavy-duty robotic arm, a robot operating system, a virtual simulation engine and a database, wherein the robot operating system comprises a sensor data acquisition module, a controller module and a communication module, the virtual simulation engine comprises a visualization module, the database comprises a data storage module, the sensor data acquisition module, the controller module, the visualization module and the data storage module are all connected to the communication module, and the real heavy-duty robotic arm is respectively connected to the sensor data acquisition module and the controller module; wherein,
[0116] The sensor data acquisition module is used to collect real sensor data on the real heavy-duty mechanical arm, and transmit the collected real sensor data to the controller module, the data storage module and the visualization module respectively through the communication module;
[0117] The visualization module is used to set task instruction data and transmit the task instruction data to the controller module through the communication module;
[0118] The controller module is used to generate motion trajectory control instructions according to the task instruction data and real sensor data, and then issue the motion trajectory control instructions to the real heavy-load robotic arm to control the motion state of the real heavy-load robotic arm.
[0119] As another embodiment of the present invention, Figure 3 As shown, a digital twin heavy-load robotic arm real-time control and online monitoring system is provided, including a robot operating system, a virtual simulation engine and a database, the robot operating system includes a sensor data acquisition module, a controller module and a communication module, the virtual simulation engine includes a visualization module and a simulated heavy-load robotic arm, the database includes a data storage module, the sensor data acquisition module, the controller module, the visualization module and the data storage module are all connected to the communication module, the simulated heavy-load robotic arm is respectively connected to the controller module, the visualization module and the sensor data acquisition module, and the data storage module is connected to the visualization module; wherein,
[0120] The sensor data acquisition module is used to collect the simulated sensor data on the simulated heavy-load mechanical arm, and transmit the collected simulated sensor data to the controller module, the data storage module and the visualization module respectively through the communication module;
[0121] The visualization module is used to set task instruction data and transmit the task instruction data to the controller module through the communication module;
[0122] The controller module is used to generate a motion trajectory control instruction according to the task instruction data and the simulation sensor data, and then issue the motion trajectory control instruction to the simulation heavy-load robotic arm to control the motion state of the simulation heavy-load robotic arm.
[0123] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technician familiar with this profession can make some changes or modifications to equivalent embodiments of equivalent changes using the technical contents disclosed above without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention still falls within the scope of the technical solution of the present invention.
Claims
1. A digital twin heavy-duty robotic arm real-time control and online monitoring system, It is characterized in that It includes a real heavy-loaded mechanical arm, a robot operating system, a virtual simulation engine and a database, wherein the robot operating system includes a sensor data acquisition module, a controller module and a communication module, the virtual simulation engine includes a visualization module and a simulated heavy-loaded mechanical arm, the database includes a data storage module, the sensor data acquisition module, the controller module, the visualization module and the data storage module are all connected to the communication module, the real heavy-loaded mechanical arm is respectively connected to the sensor data acquisition module and the controller module, the simulated heavy-loaded mechanical arm is respectively connected to the visualization module and the sensor data acquisition module, and the data storage module is connected to the visualization module; wherein, The sensor data acquisition module is used to collect the real sensor data on the real heavy-load robotic arm and the simulated sensor data on the simulated heavy-load robotic arm, and transmit the collected real sensor data and simulated sensor data to the controller module, the data storage module and the visualization module respectively through the communication module; wherein, after receiving the real sensor data, the visualization module renders the state of the simulated heavy-load robotic arm in real time; The visualization module is used to set task instruction data and transmit the task instruction data to the controller module through the communication module; The controller module is used to generate motion trajectory control instructions according to the task instruction data, real sensor data and simulated sensor data, and then issue the motion trajectory control instructions to the real heavy-load robotic arm to control the motion state of the real heavy-load robotic arm.
2. According to claim 1, a digital twin heavy-duty robotic arm real-time control and online monitoring system, It is characterized in that The real heavy-load mechanical arm is equipped with a real sensor, which includes any one or more of a position sensor, a velocity sensor, an acceleration sensor, a force sensor, a torque sensor and an image sensor, and the simulated heavy-load mechanical arm based on the virtual simulation engine is equipped with a simulated sensor with the same function; Use ROS nodes and function package mechanisms to create ROS driver function packages for real sensors; Based on the simulated sensor data interface provided by the virtual simulation engine, a ROS driver function package of the simulated sensor is designed; wherein the ROS driver function package of the real sensor is based on the driver interface provided by the sensor data acquisition module and is designed through the ROS node and function package mechanism; The sensor data acquisition module performs filtering processing on the collected real sensor data and simulated sensor data; The sensor data acquisition module outputs the filtered sensor data through the data transmission interface.
3. According to claim 1, a digital twin heavy-duty robotic arm real-time control and online monitoring system, It is characterized in that The communication module establishes a connection with the sensor data acquisition module based on the Socket method. Once the connection is successfully established, the communication module sends a data request to the sensor data acquisition module, including sending a specific command or request to trigger the sensor data acquisition module to start collecting sensor data and transmit it to the communication module through the ROS topic communication mechanism; The data storage module sends a request to the communication module, and obtains the filtered sensor data after establishing a connection, so as to store the filtered sensor data in a database; wherein a data query and management interface is created in the database through ROS node and topic communication.
4. A digital twin heavy-load robotic arm real-time control and online monitoring system according to claim 3, It is characterized in that The communication module inserts the filtered sensor data into the database according to a predefined data model, including decomposing the data into fields in the database and ensuring that the data type of each field matches the predefined data model; wherein the data insertion operation is implemented by executing an INSERT INTO statement to insert the filtered sensor data one by one into a corresponding data table in the database.
5. According to claim 1, a digital twin heavy-duty robotic arm real-time control and online monitoring system, It is characterized in that The controller module processes the received real sensor data and simulated sensor data, including parsing data and coordinate system conversion; and performs joint trajectory planning based on the processed sensor data and the kinematic model of the heavy-duty manipulator, including the motion trajectory of each joint, to achieve the action or task of the real heavy-duty manipulator; Then, according to the joint trajectory planning result, a corresponding motion trajectory control instruction is generated, wherein the motion trajectory control instruction includes joint position, velocity and acceleration; The controller module outputs the generated motion trajectory control instructions to the real heavy-load robotic arm to control the movement of the real heavy-load robotic arm; wherein the motion trajectory control instructions are sent to the robot's actuator or driver motor in the form of digital signals or analog signals to achieve precise control of the real heavy-load robotic arm joints.
6. A digital twin heavy-load robotic arm real-time control and online monitoring system according to claim 5, It is characterized in that The control algorithm of the controller module includes a PID control algorithm, a fuzzy control algorithm, an adaptive control algorithm, a force control algorithm, a visual servo control algorithm or a reinforcement learning control algorithm, wherein the implementation steps of the reinforcement learning control algorithm include: (1) Configure the simulation environment with the help of virtual simulation engine First, obtain the relevant resources of the virtual simulation engine and import them into the virtual simulation engine project; then, create a new scene and add the components and resources of the virtual simulation engine, including the simulated heavy-loaded robotic arm, terrain, lighting, and simulated sensors; and configure the simulation parameters of the virtual simulation engine according to the simulation requirements, including the physical properties and joint constraints of the simulated heavy-loaded robotic arm; then, write a control script to realize the motion control of the simulated heavy-loaded robotic arm; then, start the simulation environment in the virtual simulation engine; (2) Use the received sensor data to construct the state space for reinforcement learning According to the application scenario and task requirements, appropriate state features are selected and relevant features are extracted from the sensor data. Then, a state space is constructed based on the extracted relevant features, and the sensor data is mapped to discrete or continuous states in the state space, where the dimension and granularity of the state space can be adjusted and optimized according to the complexity and requirements of the task. (3) Using joint angle values to construct the action space for reinforcement learning First, collect and preprocess the robot's joint angle data to ensure the accuracy and consistency of the data. The joint angle data is obtained through sensors or simulation environments, including the angle values of each joint of the robot. Second, select appropriate action parameters based on the robot's action space definition. The action parameters are the angle range or discrete action set of each joint of the robot, or the increment or speed of the joint angle. Then, construct the action space based on the selected action parameters, and map the joint angle values to discrete or continuous actions in the action space. The dimension and granularity of the action space can be adjusted and optimized according to the complexity and requirements of the task. (4) Design reward function using Euclidean distance of the end-position of the heavy-duty manipulator First, it is necessary to define the target position of the robot when performing the task. The target position can be a pre-set fixed position or a position that changes dynamically according to the specific task. At each time step, the current position and posture of the end of the heavy-duty robot arm are obtained through the robot's sensor or simulation environment. The current position of the end of the heavy-duty robot arm is compared with the target position, and the Euclidean distance between them is calculated. An enhanced reward function is designed based on the calculated Euclidean distance, that is, when the end position of the heavy-duty robot arm is close to the target position, the reward value increases; when the end position of the heavy-duty robot arm deviates from the target position, the reward value decreases. (5) Training the model through reinforcement learning algorithm Based on the designed state space, action space and reward function, select a suitable reinforcement learning algorithm; in a simulated environment or a real environment, use the current strategy to interact with the environment and collect training data; use the collected training data to train the model through the reinforcement learning algorithm; during the training process, the model selects actions based on the current state and updates according to the rewards fed back by the environment; during the training process, evaluate the convergence of the model by drawing a learning curve, and regularly evaluate the performance and learning effect of the model; according to the evaluation results, adjust the model parameters or algorithm hyperparameters in a timely manner to improve the performance and generalization ability of the model; (6) Use the trained model to generate joint trajectory information In a simulation environment or a real environment, use the trained model to interact with the environment; the model selects actions based on the current state and executes actions according to the strategy; based on the joint angle actions selected by the model, control the real heavy-load robotic arm to perform corresponding actions.
7. A digital twin heavy-load robotic arm real-time control and online monitoring system according to claim 6, It is characterized in that The reward function designed using the Euclidean distance of the end-position of the heavy-duty manipulator also includes: The reward function is defined using the following formula: R(s,a,s')=exp(-α*distance(s',target)) Among them, R(s,a,s') represents the reward obtained by taking action a in state s to transfer to state s'; distance(s',target) represents the Euclidean distance between the current state s' and the target position; α is a tuning parameter that controls the rate at which the reward decays.
8. A digital twin heavy-duty robotic arm real-time control and online monitoring system according to claim 1, It is characterized in that The visualization module includes a graphics rendering area and a human-computer interaction area; The graphic rendering area is used to display the simulated heavy-loaded mechanical arm, the simulation environment and the real-time data curve; in the virtual simulation engine, the simulated heavy-loaded mechanical arm can be imported, and its position and posture in the simulation environment can be set; at the same time, the rendering function of the virtual simulation engine can be used to render the simulated heavy-loaded mechanical arm on the screen; at the same time, the real-time data curve can be drawn in the graphic rendering area to display the curve of the end position of the simulated heavy-loaded mechanical arm changing with time, so as to monitor and analyze the motion state of the real heavy-loaded mechanical arm in real time; The human-machine interaction area includes a control command button, and the control command button is used to enable the user to control and operate the real heavy-load robotic arm; Through the user interface design function of the virtual simulation engine, buttons, sliders and input boxes are created in the human-computer interaction area, and corresponding logic codes are added.
9. A digital twin heavy-duty robotic arm real-time control and online monitoring system, It is characterized in that It includes a real heavy-loaded mechanical arm, a robot operating system, a virtual simulation engine and a database, wherein the robot operating system includes a sensor data acquisition module, a controller module and a communication module, the virtual simulation engine includes a visualization module, the database includes a data storage module, the sensor data acquisition module, the controller module, the visualization module and the data storage module are all connected to the communication module, and the real heavy-loaded mechanical arm is connected to the sensor data acquisition module and the controller module respectively; wherein, The sensor data acquisition module is used to collect real sensor data on the real heavy-duty mechanical arm, and transmit the collected real sensor data to the controller module, the data storage module and the visualization module respectively through the communication module; The visualization module is used to set task instruction data and transmit the task instruction data to the controller module through the communication module; The controller module is used to generate motion trajectory control instructions according to the task instruction data and real sensor data, and then issue the motion trajectory control instructions to the real heavy-load robotic arm to control the motion state of the real heavy-load robotic arm.
10. A digital twin heavy-duty robotic arm real-time control and online monitoring system, It is characterized in that It includes a robot operating system, a virtual simulation engine and a database, wherein the robot operating system includes a sensor data acquisition module, a controller module and a communication module, the virtual simulation engine includes a visualization module and a simulated heavy-loaded mechanical arm, the database includes a data storage module, the sensor data acquisition module, the controller module, the visualization module and the data storage module are all connected to the communication module, the simulated heavy-loaded mechanical arm is respectively connected to the controller module, the visualization module and the sensor data acquisition module, and the data storage module is connected to the visualization module; wherein, The sensor data acquisition module is used to collect the simulated sensor data on the simulated heavy-load mechanical arm, and transmit the collected simulated sensor data to the controller module, the data storage module and the visualization module respectively through the communication module; The visualization module is used to set task instruction data and transmit the task instruction data to the controller module through the communication module; The controller module is used to generate a motion trajectory control instruction according to the task instruction data and the simulation sensor data, and then issue the motion trajectory control instruction to the simulation heavy-load robotic arm to control the motion state of the simulation heavy-load robotic arm.
Citation Information
Cited By
Mechanical arm control system of straw bale collecting machine
CN119036468A
Klystron state feedback control method based on reinforcement learning
CN119439756A
Servo control system for multi-axis robotic arm for coal mine drilling rig
WO2026184026A1
