An industrial robot control algorithm based on reinforcement learning
By extracting cross-domain invariant features from the industrial robot control system and combining them with a base controller and a residual policy network, the problem of dynamic differences between the simulation environment and the real environment is solved, achieving zero-sample, high-precision safety control and reducing the risk of robot collisions in real environments.
Patent Information
- Application Number
- CN202611338716.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-31
- Publication Date
- 2026-11-27
Smart Images

Figure CN123178928A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial robot control technology, specifically to an industrial robot control algorithm based on reinforcement learning. Background Technology
[0002] With the development of intelligent manufacturing technology, industrial robots are increasingly widely used in contact-intensive tasks such as precision flexible assembly, gear meshing, surface polishing and grinding, and cable plugging and unplugging. Since reinforcement learning methods can handle sequential decision-making problems in complex unstructured environments, the industry generally adopts the technical route of "simulation training and real machine deployment": a simulation model is built in a physical simulation engine, and simplified models such as rigid body penetration penalty function and static friction cone approximation are used to calculate contact force and deformation. The robot end position, joint angle, visual image and torque sensor readings are directly spliced and input into a deep reinforcement learning network, which directly outputs the joint desired torque or end-effector desired velocity command. By randomly perturbing the simulation physical parameters, the model's adaptability to the differences in real environment parameters is improved. After training convergence, the network parameters are directly transferred to the real robot to perform the task.
[0003] The existing technologies mentioned above have the following shortcomings: First, the simplified contact mechanics model used in the simulation engine cannot accurately depict complex physical phenomena such as flexible contact and nonlinear friction in the real world. Domain randomization only perturbs the parameter values and does not change the structural simplification of the simulation model. This causes the strategy to fail when the robot experiences a sudden contact change in a real robot because it has not seen the corresponding physical response mode. Second, the reinforcement learning network directly outputs torque or velocity commands. The internal decision-making process lacks constraints on kinematic and dynamic boundaries. In unfamiliar states, it is easy to output actions that exceed the robot's physical safety boundaries. Relying solely on external hard limits or emergency stop rules for post-event interception can easily cause mechanical impact. Third, there is an order of magnitude difference in the sampling frequency between visual sensors and force / tactile sensors. Directly splicing heterogeneous data into the network results in lag in feature fusion and time alignment, making it difficult to make timely compensation responses at the moment of contact. Therefore, it is necessary to propose an industrial robot control algorithm that can overcome the above defects. Summary of the Invention
[0004] The technical problem this invention aims to solve is that in existing reinforcement learning-based industrial robot control schemes, there are dynamic differences between the simulation environment and the real physical world due to the simplification of the contact mechanics model. This makes it difficult for reinforcement learning strategies to achieve zero-sample, high-precision deployment on real machines. The reinforcement learning network directly outputs control commands, and the decision-making process lacks physical safety constraints, which can easily lead to dangerous actions that violate the boundaries of robot kinematics and dynamics. In addition, the inconsistency of multimodal sensors in feature space and sampling frequency leads to a lag in perception and control at the moment of contact.
[0005] To address the aforementioned technical problems, this invention provides an industrial robot control algorithm based on reinforcement learning, comprising:
[0006] Acquire robot multimodal perception data, which includes visual image data, six-dimensional force sensor data, and tactile sensor data;
[0007] Based on the contact force data and position data in the multimodal sensing data, the contact center point features and contact stress distribution features are calculated, and the features output by the simulation domain feature encoder and the features output by the real domain feature encoder are aligned through a self-supervised comparative learning method to obtain cross-domain invariant feature vectors.
[0008] The base controller calculates the reference control torque based on the robot's current end-effector pose, target pose, and preset stiffness and damping parameters;
[0009] The residual policy network outputs a compensation torque based on the cross-domain invariant feature vector and the current joint state of the robot, and limits the compensation torque to a preset amplitude upper limit to obtain the residual control torque;
[0010] The reference control torque is added to the residual control torque to obtain the total control torque;
[0011] The residual policy network is trained and optimized using a restricted Markov decision process. The robot physical limit constraint is introduced into the optimization objective function in the form of Lagrange multipliers, and the Lagrange multipliers are adaptively updated according to the difference between the expected value of the constraint cost and the preset upper limit of the constraint cost.
[0012] The total control torque is sent to the robot joint actuator to drive the robot to perform actions.
[0013] Accordingly, the present invention also provides an industrial robot control system based on reinforcement learning corresponding to the above method, and a computer-readable storage medium storing a computer program that implements the above method.
[0014] Compared with the prior art, the beneficial effects of the present invention by adopting the above technical solution are as follows:
[0015] First, by extracting the contact center point features and contact stress distribution features that are strongly correlated with the laws of contact mechanics, and by using self-supervised contrastive learning to align the features of the simulation domain with those of the real domain, reinforcement learning decisions do not depend on the original perception data with structural differences. This reduces the impact of the dynamic differences between the simulation and the real environment on the performance of the strategy, which is conducive to achieving zero-sample, high-precision real-machine deployment.
[0016] Secondly, by using a traditional impedance controller or admittance controller as the base controller, the reinforcement learning policy network only outputs the residual compensation torque after amplitude limiting. The sum of the two constitutes the final control torque, which structurally limits the output range of the residual network within the safety boundary established by the base controller, thus avoiding the risk of the black-box policy directly outputting dangerous actions.
[0017] Third, by introducing the robot's physical limit constraints into the constrained optimization objective of reinforcement learning in the form of Lagrange multipliers, and combining it with an adaptive shrinkage mechanism based on the variance of the action distribution based on prediction costs, the strategy automatically converges away from action distributions that may violate physical boundaries during the exploration phase, achieving native safe exploration and reducing the risk of collisions, oscillations, and damage to execution components. Attached Figure Description
[0018] Figure 1 This is a diagram showing the overall architecture of the industrial robot control system of the present invention.
[0019] Figure 2 This is a flowchart of the cross-domain feature alignment mechanism of the present invention;
[0020] Figure 3 This is a flowchart of the residual reinforcement learning control algorithm of the present invention. Detailed Implementation
[0021] The following is in conjunction with the appendix Figure 1-3 The specific embodiments of the present invention will be further described below. It should be noted that the description of these embodiments is for the purpose of helping to understand the present invention, but does not constitute a limitation of the present invention.
[0022] Furthermore, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0023] I. System Overall Architecture
[0024] The industrial robot control system provided in this embodiment of the invention mainly includes a multimodal perception module, a physical causal representation extraction module, a base controller module, a residual reinforcement learning decision module, a safety constraint optimization module, and a robot body execution module. The multimodal perception module includes a vision sensor unit, a high-frequency six-dimensional force sensor, and a tactile sensor unit. These units collect data at different sampling frequencies and output the collected data to the physical causal representation extraction module. The physical causal representation extraction module contains two parallel branches: a simulation domain feature encoder and a real domain feature encoder. Through a self-supervised contrastive learning mechanism, it aligns and outputs a unified cross-domain invariant feature vector. This feature vector revolves around physical causal factors such as the contact center point and contact stress distribution. In the feature construction, the cross-domain invariant feature vector is simultaneously input to the base controller module and the residual reinforcement learning decision module. The base controller module receives the target pose and the current state to calculate the baseline control torque. The residual policy network in the residual reinforcement learning decision module outputs the residual control torque after amplitude limiting. The two torques are added at the torque fusion node to obtain the total control torque. This total control torque is input to the safety constraint optimization module for safety verification and then output to the robot body execution module to drive the joint motors to perform actions. The new state generated after the robot body performs actions is re-inputted to the multimodal perception module through the feedback loop to form a closed-loop control system. The signal flow relationship and feedback relationship between the above modules together constitute one of the overall protection scopes of this invention.
[0025] II. Cross-domain feature alignment mechanism based on physical causal representation
[0026] In the state-space feature extraction stage, this invention constructs a self-supervised comparative learning mechanism based on physical rules to extract cross-domain invariant features that coexist in the simulation domain and the real domain and are strongly correlated with the laws of contact mechanics.
[0027] For the high-frequency force sensor readings and visual image data generated during the contact between the robot's end effector and the work object, the contact center point is first calculated as one of the physical causal features. The calculation method is as follows:
[0028] ;
[0029] in, Indicates the coordinates of the contact center point. Indicates the number of sensing units within the contact area. Indicates the first The position coordinates of each sensing unit in the end effector coordinate system Indicates the first The above formula represents the equivalent point coordinates of the contact pressure distribution obtained by weighting the position coordinates of each sensor unit with the magnitude of the contact force detected by each sensor unit as the weight.
[0030] Based on this, a contact stress distribution characteristic is constructed, which is a stress distribution map formed by arranging the force values of each sensing unit in the contact area according to their spatial positions, in order to characterize the deformation and uneven stress characteristics of the contact surface.
[0031] The state data collected in the simulation environment is processed by the simulation domain feature encoder. Encoding yields features The real-world state data collected from the real environment, which corresponds to the same action and initial conditions as the simulation environment, is processed by a real-domain feature encoder. Encoding yields features The two constitute a positive sample pair, and the remaining non-corresponding samples in the same training batch constitute a negative sample pair. The contrastive learning loss function is defined as:
[0032] ;
[0033] in, Indicates the contrast learning loss. Indicates the coding features of the simulation domain. Indicates and The corresponding real-domain positive sample encoding features, Indicates the first in the batch The encoded features of each sample, the batch of samples contains one positive sample and One negative sample, Represents the cosine similarity function. This represents a temperature coefficient, used to adjust the smoothness of the similarity distribution. This represents the total number of samples included in the comparison calculation.
[0034] In a specific implementation, for the same preset action sequence, visual images, six-dimensional force sensor data, and tactile sensor data are collected in both the simulation and real environments to construct paired sets of simulated real-state samples. For each collected sample, the contact center point and contact stress distribution are calculated according to the aforementioned formula, and these, along with the original visual features, are input into a feature encoding network to obtain a preliminary physical causal representation vector. This vector is then passed through a simulation domain encoder. With the real domain encoder Simulated and real samples under the same action conditions are encoded to form positive sample pairs, while other mismatched samples within the same training batch form negative sample pairs. The loss value of the current batch is calculated based on the contrastive learning loss function, and the encoder is updated through backpropagation. and The network parameters are adjusted so that the distance between positive samples and features is continuously reduced, while the distance between negative samples and features is continuously increased. The above feature calculation, encoding, and parameter update process is repeated until the loss function converges. At this point, the feature vector output by the encoder is the cross-domain invariant feature, which serves as the state input for the subsequent reinforcement learning decision module.
[0035] III. Physics-Prior-Guided Residual Reinforcement Learning Control Architecture
[0036] This invention abandons the traditional end-to-end black-box reinforcement learning approach that directly outputs all control quantities, and designs the control architecture as a two-layer structure that combines a base controller and a residual policy network.
[0037] The base controller employs traditional industrial impedance control or admittance control algorithms to calculate the reference control torque based on the robot's current end-effector pose, target pose, and preset stiffness and damping parameters. The torque output strictly follows the preset kinematic and dynamic constraints to ensure the safety of the basic motion.
[0038] Residual Policy Network Using the aforementioned cross-domain invariant eigenvectors and the robot's current joint state as input, the output is a compensation torque that has been amplitude-limited. The specific relationship is as follows:
[0039] ;
[0040] ;
[0041] in, This represents the total control torque ultimately sent to the robot joints. This indicates the reference torque output by the base controller. This represents the compensation torque output by the residual policy network. The parameter is The policy network in state The original output below, This represents the truncation function. This represents the preset upper limit of the compensation torque amplitude, which is used to structurally limit the output range of the residual network so that it is only used to compensate for unmodeled nonlinear contact friction and assembly jamming, without violating the safety boundary established by the base controller.
[0042] In a specific implementation, the stiffness matrix, damping matrix, and other impedance control parameters of the base controller, as well as the residual strategy network, are first initialized. The initial network parameters are obtained, and in each control cycle, the robot's current end-effector pose, joint angles, and cross-domain invariant feature vectors are collected to form the current state. The base controller is based on the current state Calculate the reference torque according to the preset impedance control equation based on the target pose. The residual strategy network is based on the state. The original compensation value is output, and the residual torque is obtained after being limited by a truncation function. ,Will and The total control torque is obtained by adding them together. The data is sent to the robot joint actuator for execution. After execution, the new state, task completion rate, contact force and other information are collected to calculate the reward value, which is used to update the gradient of the residual policy network. The above process is repeated until the entire task sequence is completed or the preset control cycle limit is reached.
[0043] IV. Restricted Markov Decision Optimization Algorithm with Adaptive Torque Penalty
[0044] To achieve native safety exploration, this invention introduces robot physical limits (including joint torque boundaries, end-effector contact force thresholds, and joint velocity boundaries) into the constrained optimization objective of reinforcement learning, modeling the reinforcement learning problem as a constrained Markov decision process, with the following optimization objective:
[0045] ;
[0046] in, Indicates the policy network parameters, Indicates the discount factor. Indicates the first Step-by-step task rewards Indicates the first The constraint cost function for each step is determined by whether the current joint torque, end-effector contact force, and joint velocity exceed a preset physical limit threshold. The greater the degree to which the threshold is exceeded, the higher the cost. This represents the preset upper limit of constraint costs, which is the tolerance for cumulative security violations throughout the entire task sequence.
[0047] The constrained optimization problem described above can be transformed into an unconstrained optimization problem using the Lagrange multiplier method:
[0048] ;
[0049] in, Let the Lagrange objective function be represented. Let represent the Lagrange multipliers, whose values reflect the urgency of the current security constraints. The Lagrange multipliers are updated adaptively according to the following rules:
[0050] ;
[0051] in, Indicates the first The multiplier value after the next iteration. Indicates the first The multiplier value of the next iteration. This represents the step size for multiplier updates when the expected value of the constraint cost exceeds the tolerance limit. hour, The value increases, thus increasing the penalty for violations in the next round of policy updates. When the expected cost is lower than the tolerance limit, The value gradually decreases, restoring the freedom of strategy exploration.
[0052] The policy network parameters are updated according to the following policy gradient formula with a penalty term:
[0053] ;
[0054] in, Indicates the first The advantage function value corresponding to the step task reward. Indicates the first The advantage function value corresponding to the step constraint cost. Indicates the policy network in state Select action The probability of.
[0055] Furthermore, when the predicted constraint cost reaches a safety threshold, the algorithm adaptively converges to the variance of the action distribution:
[0056] ;
[0057] in, Indicates the first The variance of the step distribution This represents the initial baseline exploration variance. This represents the variance convergence rate coefficient. This represents the constraint cost predicted under the current state. This represents a preset safety cost threshold. This mechanism ensures that once a predicted action may violate the physical boundary, the variance of the action distribution immediately narrows, and the exploration range automatically shrinks to the vicinity of the safe area, achieving native safe exploration.
[0058] In a specific implementation, the policy network parameters are first initialized. Value network parameters, Lagrange multipliers Constraint cost ceiling and basic exploration variance In the current strategy Next, by combining the interaction between the base controller and the residual policy network with the environment, a batch of trajectory data is collected, and the state of each step is recorded. ,action Task Rewards Constraint Costs The cost prediction network estimates the predicted cost in the current state. The exploration variance for this step is calculated according to the adaptive formula for action distribution variance. Calculate the task reward advantage function respectively. With constraint cost advantage function The policy network parameters are adjusted according to the policy gradient formula with penalty terms. Perform gradient updates, and adjust the multipliers according to the Lagrange multiplier adaptive update formula. Repeat the above data collection and update process until the cumulative reward of the policy network converges and the constraint cost is stably lower than the preset upper limit. Once training is complete, the trained policy network parameters and base controller parameters are deployed together to the real robot control system.
[0059] V. Overall Implementation Process and Closed-Loop Learning
[0060] Based on the above three key technical solutions, the overall implementation process of this invention is as follows: First, multimodal data from the simulation environment and the real environment are collected. Then, cross-domain invariant feature vectors are obtained by extracting and aligning them across domains through physical causal representation. Then, a residual reinforcement learning control architecture is constructed based on the feature vectors to obtain the total control torque. Subsequently, safety constraint training is performed based on the restricted Markov decision process. The residual policy network and Lagrange multipliers are iteratively updated to determine whether the training has converged. If it has not converged, it returns to continue iterative training. If it has converged, the model parameters are deployed to the real robot. New state data generated by the real robot in the process of performing contact-intensive tasks are reused in the perception module through closed-loop feedback to support subsequent online fine-tuning and form a continuous learning closed loop.
[0061] VI. Alternative Implementation Methods
[0062] In another embodiment of the present invention, the physical causal representation extraction module may not adopt a self-supervised contrastive learning mechanism, but instead adopt a model-independent meta-learning approach to train an initial policy network with fast adaptability in a simulation environment. Only a small number of samples need to be collected in the real environment, and the policy fine-tuning is completed through a small number of gradient update steps to achieve cross-domain adaptation.
[0063] In another embodiment of the present invention, the safety constraint optimization module may not use the Lagrange multiplier adaptive penalty mechanism, but instead superimpose a safety projection layer based on convex optimization after the policy network output layer, and project the original output action of the policy network to the nearest point in the set of movable actions constituted by the robot's physical limit constraints in real time, thereby achieving the effect of native safety constraints.
[0064] The above-described alternative embodiments can achieve similar technical effects to the aforementioned embodiments and are within the scope of protection of this invention.
[0065] VII. Technical Effects Description
[0066] The control algorithm provided in this invention uses cross-domain invariant features strongly correlated with the laws of contact mechanics instead of raw perception data to reduce the impact of structural differences between simulation and real environments on strategy performance. The residual control architecture restricts the reinforcement learning output to the safety boundary established by the base controller, reducing the risk of dangerous action outputs. The restricted Markov decision optimization mechanism enables the strategy to automatically avoid action distributions that may violate physical boundaries during training, improving the safety of training and deployment.
[0067] Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of the present invention. Therefore, any modifications, equivalent changes and alterations 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 shall fall within the protection scope defined by the claims of the present invention.
Claims
1. A reinforcement learning-based industrial robot control algorithm for industrial robots performing contact-intensive tasks, characterized in that, include: Acquire robot multimodal perception data, which includes visual image data, six-dimensional force sensor data, and tactile sensor data; Based on the contact force data and position data in the multimodal sensing data, the contact center point features and contact stress distribution features are calculated, and the features output by the simulation domain feature encoder and the features output by the real domain feature encoder are aligned through a self-supervised comparative learning method to obtain cross-domain invariant feature vectors. The base controller calculates the reference control torque based on the robot's current end-effector pose, target pose, and preset stiffness and damping parameters; The residual policy network outputs a compensation torque based on the cross-domain invariant feature vector and the current joint state of the robot, and limits the compensation torque to a preset amplitude upper limit to obtain the residual control torque; The reference control torque is added to the residual control torque to obtain the total control torque; The residual policy network is trained and optimized using a restricted Markov decision process. The robot physical limit constraint is introduced into the optimization objective function in the form of Lagrange multipliers, and the Lagrange multipliers are adaptively updated according to the difference between the expected value of the constraint cost and the preset upper limit of the constraint cost. The total control torque is sent to the robot joint actuator to drive the robot to perform actions.
2. The control algorithm according to claim 1, characterized in that, The contact center point feature is obtained by calculating the weighted average of the position coordinates of each sensing unit in the contact area with the magnitude of the detected force as the weight. The contact stress distribution feature is a distribution map formed by arranging the force values of each sensing unit in the contact area according to their spatial positions.
3. The control algorithm according to claim 1, characterized in that, The process of feature alignment using self-supervised contrastive learning includes: encoding state data collected in the simulation environment into simulation domain features using a simulation domain feature encoder; encoding real state data in the real environment that corresponds to the state data collected in the simulation environment with the same action and the same initial conditions into real domain features using a real domain feature encoder; forming positive sample pairs with the simulation domain features and the corresponding real domain features; forming negative sample pairs with the remaining non-corresponding features in the same training batch; calculating the contrastive learning loss based on the similarity difference between the positive and negative sample pairs; and updating the network parameters of the simulation domain feature encoder and the real domain feature encoder based on the contrastive learning loss.
4. The control algorithm according to claim 1, characterized in that, Limiting the compensation torque within a preset amplitude upper limit includes: truncating the original compensation amount output by the residual strategy network so that the amplitude of the processed residual control torque does not exceed the preset amplitude upper limit, which is used to compensate for unmodeled contact friction and assembly jamming phenomena.
5. The control algorithm according to claim 1, characterized in that, The adaptive update of the Lagrange multiplier includes: increasing the value of the Lagrange multiplier when the expected value of the constraint cost exceeds the preset upper limit of the constraint cost, so as to increase the penalty for the violation in subsequent policy updates; and decreasing the value of the Lagrange multiplier when the expected value of the constraint cost is lower than the preset upper limit of the constraint cost, so as to restore the degree of freedom of policy exploration.
6. The control algorithm according to claim 1, characterized in that, Also includes: Based on the constraint cost value predicted by the cost prediction network in the current state, the exploration variance of the action distribution output by the residual policy network is adaptively adjusted. When the predicted constraint cost value reaches the preset safe cost threshold, the exploration variance is reduced, so that the exploration range of the action distribution is shrunk to the safe region.
7. The control algorithm according to claim 1, characterized in that, Also includes: The robot acquires new state data after performing actions, and feeds this new state data back to the multimodal perception data acquisition step to form a closed-loop control.
8. An industrial robot control system based on reinforcement learning, characterized in that, include: The multimodal perception module is used to acquire the robot's visual image data, six-dimensional force sensor data, and tactile sensor data; The physical causal characterization extraction module is used to calculate the contact center point features and contact stress distribution features based on the data obtained by the multimodal perception module, and to align the features output by the simulation domain feature encoder with the features output by the real domain feature encoder through a self-supervised contrastive learning method, and output cross-domain invariant feature vectors. The base controller module is used to calculate the reference control torque based on the robot's current end-effector pose, target pose, and preset stiffness and damping parameters. The residual reinforcement learning decision module is used to output the amplitude-limited residual control torque based on the cross-domain invariant feature vector and the current joint state of the robot. A torque fusion node is used to add the reference control torque and the residual control torque to obtain the total control torque; The safety constraint optimization module is used to train and optimize the residual reinforcement learning decision module using a restricted Markov decision process, and introduces the robot's physical limit constraints into the optimization objective function in the form of Lagrange multipliers. The robot body execution module is used to drive the robot joints to perform actions according to the total control torque.
9. The control system according to claim 8, characterized in that, The new state data generated after the robot body execution module performs an action is fed back to the multimodal perception module, forming a closed-loop control.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the control algorithm as described in any one of claims 1 to 7.
