Multi-segment software robot adaptive reinforcement learning control method fusing expert knowledge
By integrating the reinforcement learning method of expert knowledge and using MDP and DDPG algorithms, the modeling complexity and high-dimensional space challenges in traditional soft robot control methods are solved, and efficient and robust control effects of multi-segment soft robots are achieved.
Patent Information
- Application Number
- CN202410779185.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-06-17
AI Technical Summary
Traditional soft robot control methods face challenges in algorithm exploration efficiency due to high modeling complexity, narrow application range, and high-dimensional state and action spaces. Especially in multi-segment soft robots, it is difficult to effectively cope with complex control of compliant deformation and nonlinear characteristics. question.
A multi-segment soft robot adaptive reinforcement learning control method that integrates expert knowledge is used to characterize the interaction between the robot and the environment through the Markov Decision Process (MDP). It combines Q-Learning and the Deep Deterministic Policy Gradient (DDPG) algorithm to introduce expert knowledge to Design reward functions and guide the learning process, and build a model-free reinforcement learning framework.
It significantly improves the control accuracy and adaptability of soft robots, reduces the dependence on a large amount of training data, improves learning efficiency and robustness, achieves efficient and stable control performance, and adapts to different environments and task requirements.
Smart Images

Figure CN118700192A
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of rope-driven multi-segment soft robots, and in particular to an adaptive reinforcement learning control method for multi-segment soft robots integrating expert knowledge. Background Art
[0002] With the widespread application of robots in various fields, traditional rigid robots face many challenges, such as grasping fragile objects and interacting safely with people. In contrast, soft robots have become a research hotspot because they can adapt to unstructured environments. Soft robots have unique capabilities such as compliant deformation and adjustable morphology. They can flexibly adjust their morphology according to the environment and perform service tasks more efficiently. However, unlike traditional rigid robots, the control of soft robots faces new challenges. Especially for multi-segment soft robots, control becomes more difficult due to their highly nonlinear characteristics and sensitivity to external loads, as well as unlimited degrees of freedom and limited sensing means. Unlike rigid robots, which can be directly modeled and controlled with the help of mature theories and algorithms, soft robot control requires innovative strategies. Solving the control strategy problem of soft robots and improving control accuracy are crucial to promoting the further development of soft robot technology.
[0003] In view of the unique challenges in the control of soft robots, the current mainstream solution is the classical control method based on accurate analytical models. This type of method attempts to derive the corresponding control strategy by establishing a mathematical model of the soft robot. However, the modeling of soft robots itself faces many difficulties. First, the shape of the soft robot is easily affected by external loads, and the dynamic modeling tools of traditional rigid robots cannot be directly applied to this continuum structure. Second, for common cable-driven soft manipulators, the classical constant curvature approximation method often fails under coupled tendon conditions. In addition, although the Von Mises stress model can describe the elasticity of nonlinear fingers, it only considers normal contact and ignores the influence of diagonal contact. The fingertip origin force concentration model in the needle tip also lacks sufficient experimental verification. Accurate modeling requires complex physical analysis, and the model is usually only applicable to specific tasks. Once the environment or task changes, the applicability and accuracy of the model may be greatly reduced. In addition, the complex mechanical geometric models and simulators of soft robots often cannot fully reflect the real characteristics of the hardware. Therefore, although the model-based control strategy is effective, it still has certain limitations in terms of modeling complexity, control accuracy and scope of application.
[0004] In order to overcome these difficulties, it is necessary to explore a new model-free reinforcement learning framework. The biggest advantage of model-free reinforcement learning is that it does not require precise modeling of materials and structural details, which fundamentally avoids the huge difficulties of modeling. More importantly, reinforcement learning can be trained directly on the actual hardware system, and the various characteristics and nonlinearities of the hardware will be naturally reflected in the learning process, ensuring that the obtained control strategy is highly consistent with the actual system and achieving the true optimal control effect. Although traditional model-free reinforcement learning methods such as Q-learning have shown certain control capabilities, they are mainly limited to static position control tasks of planar operations and are difficult to cope with the many challenges brought by multi-segment soft robots. Due to the unique characteristics of multi-segment soft robots such as high degrees of freedom, significant nonlinearity and compliant deformation, their control problems are far more complex than single-degree-of-freedom or rigid body systems. In response to this problem, the deep reinforcement learning algorithm that has emerged in recent years has brought new opportunities to solve the continuous action space control of multi-segment soft robots. Among them, the Deep Deterministic Policy Gradient (DDPG) algorithm uses deep neural networks to parameterize the policy and value functions, showing its excellent ability to handle complex systems with large state action spaces.
[0005] Existing research results have shown that deep reinforcement learning algorithms have broad application prospects in dealing with complex control problems. Despite this, there are still certain difficulties in directly applying existing deep reinforcement learning algorithms to the control of multi-segment soft robots. On the one hand, the high-dimensional state and action space of multi-segment soft robots put forward higher requirements on the exploration efficiency of the algorithm, and the compliant characteristics of soft robots make their dynamic behaviors difficult to predict. Innovative learning algorithms are needed to obtain control strategies that are adapted to the actual hardware conditions. On the other hand, most of the existing deep reinforcement learning algorithms are aimed at continuous control problems, while the control of multi-segment soft robots often involves the selection of discrete actions. How to effectively integrate continuous and discrete action spaces is an urgent problem to be solved. Summary of the invention
[0006] In response to the above problems, the purpose of the present invention is to provide a multi-segment soft robot adaptive reinforcement learning control method that integrates expert knowledge. By introducing the experience and prior knowledge of domain experts to assist the learning process, the data utilization efficiency of the algorithm can be significantly improved, providing an efficient and robust solution for the control of complex soft robot systems.
[0007] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0008] On the one hand, a multi-segment soft robot adaptive reinforcement learning control method integrating expert knowledge is provided, the method comprising the following steps:
[0009] S1. Use Markov decision process MDP to characterize the interaction between multi-segment soft robots and the environment;
[0010] S2, using Q-Learning algorithm to identify the optimal action selection strategy of MDP;
[0011] S3. Construct a model-free reinforcement learning framework based on the deep deterministic policy gradient algorithm DDPG, wherein the model-free reinforcement learning framework includes an action network and an evaluation network;
[0012] S4. Introducing expert knowledge into the model-free reinforcement learning framework, including: introducing expert demonstration data into the sample pool, and using the expert demonstration data to design a reward function to guide the reinforcement learning process.
[0013] Optionally, the step S1 specifically includes:
[0014] Use MDP to characterize the interaction between a multi-segment soft robot and its environment, involving state s, action a, and state transition probability function and reward r, where s' is the next state after taking action a;
[0015] The tentacles of the multi-segment soft robot include three segments, each of which is driven and controlled by four cables; the action a is defined as the change in the length of each cable, expressed as a=(a1, a2, ..., a 12 ); the state s is defined as s=(p x ,p y ,p z ,a1,a2,...,a 12 ), where p x 、p y and p z are the errors of the end effector relative to the target in the Cartesian coordinate system x, y and z directions respectively; the reward r is used to quantify the impact of the action on the position of the manipulator relative to the target tip; a reward system with inductive bias is used, and the structure is described as follows:
[0016] (1)
[0017] Among them, err curr represents the deviation of the multi-segment soft robot relative to the target tip position, ε represents the threshold, which is set to 2mm here, describing that the control accuracy of subsequent tentacle end movement should be less than 2mm. curr When it is less than ε, the reward r is set to +100; P represents the effect of the current action on the position of the manipulator relative to the target tip, P max is the maximum value of the influence; iter represents the number of iterations or learning update steps that the algorithm has executed, iter maxis a specified maximum number of iterations or learning update steps; err prev Indicates the deviation of the multi-segment soft robot relative to the target tip position in the previous state.
[0018] Optionally, the step S2 specifically includes:
[0019] In the Q-Learning algorithm, the iterative update of the value of the Q function follows the following equation:
[0020] (2)
[0021] Among them, Q t (s t ,a t ) is the Q value corresponding to the current state action, Q t+1 (s t ,a t ) is the updated Q value, r t+1 is the reward obtained after performing the action; γ is a discount factor used to balance the importance of immediate rewards and future rewards; is in the next state s t+1 The maximum Q value of the action selected in the next step is to select the action with the maximum Q value; α is the learning rate, which controls the degree of update of the Q value by new information; where s t represents the state at time t, a t represents the action chosen at time t.
[0022] Optionally, the step S3 specifically includes:
[0023] The policy gradient and value-based methods are combined to construct a model-free reinforcement learning framework based on a deep deterministic policy gradient algorithm; the model-free reinforcement learning framework includes an Actor network and Critic Network ; The Actor network is used to receive observation data and output actions, and the Critic network is used to evaluate actions;
[0024] (3)
[0025] The Actor network and the Critic network are each increased through the policy gradient:
[0026] (4)
[0027] Defining the Target Actor Network and target critic network , update the target Critic network to minimize the loss of state-behavior evaluation to get closer to the real environment:
[0028] (5)
[0029] Among them, L(θ Q ) is the loss of state-action evaluation.
[0030] Optionally, the step S4 specifically includes:
[0031] The model-free reinforcement learning framework includes a true policy network and a target policy network;
[0032] The real policy network selects an action and applies it to the real environment to obtain the next state and reward; the real policy network calculates the Q value of the current state and the selected action and stores it in the sample pool; extracts data from the sample pool, uses the extracted data to calculate the mean square error of the Critic network, and updates the real policy network parameters μ; calculates the Actor network error and updates the real policy network parameters θ; throughout the process, the real policy network parameters are copied to the target policy network, i.e. θ' and μ';
[0033] The Actor network generates Gaussian distribution sampling actions through the observed state, processed by the fully connected layer and activation function, and sends them to the Critic network; the Critic network evaluates these actions and outputs the corresponding action value Q value to guide the strategy update of the Actor network;
[0034] The expert demonstration data is stored in the sample pool and mixed with the real collected data; through the expert demonstration strategy π d To guide the learning process, the expert demonstration data contains trajectory data in the following form: time series of demonstration states , demonstrating the time sequence of state-action , demonstrating the time sequence of state-action-reward , or the time sequence of demonstration state-action-reward-next demonstration state , where t represents the time;
[0035] Trajectory data demonstrated by experts Stored in the experience pool, used to modify the objective function of the reinforcement learning algorithm:
[0036] (6)
[0037] in, It is a hyperparameter that controls the weight of expert knowledge and is used to balance the influence of real environment rewards and expert knowledge; is the modified objective function, combining the real environment reward and expert knowledge The impact of It is an objective function based on the real environment reward, generated by the reinforcement learning algorithm when it is executed in the real environment. It is an objective function based on expert knowledge, which represents the performance of the reinforcement learning algorithm in imitating the expert demonstration strategy, which is achieved by minimizing the behavior cloning loss;
[0038] During the optimization process, the policy parameters θ are updated via gradient ascent to maximize the modified objective function ,
[0039] (7)
[0040] Among them, η is the learning rate, which controls the step size of parameter update; is the corrected objective function The gradient with respect to the policy parameters θ.
[0041] Optionally, the real policy network selects an action and applies the action in the real environment to obtain a next state, including the end position coordinates of the multi-segment soft robot tentacles.
[0042] On the other hand, a multi-segment soft robot adaptive reinforcement learning control device integrating expert knowledge is provided, which is used to implement any of the above methods, and the device comprises:
[0043] MDP module, used to characterize the interaction between multi-segment soft robots and the environment using Markov decision process MDP;
[0044] Q-Learning module, used to identify the optimal action selection strategy of MDP using Q-Learning algorithm;
[0045] DDPG module, used to build a model-free reinforcement learning framework based on the deep deterministic policy gradient algorithm DDPG, the model-free reinforcement learning framework includes an action network and an evaluation network;
[0046] The expert knowledge module is used to introduce expert knowledge into the model-free reinforcement learning framework, including: introducing expert demonstration data into the sample pool, and using the expert demonstration data to design a reward function to guide the reinforcement learning process.
[0047] In another aspect, an electronic device is provided, the electronic device comprising:
[0048] processor;
[0049] A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are loaded and executed by the processor, the steps of the above-mentioned multi-segment soft robot adaptive reinforcement learning control method are implemented.
[0050] On the other hand, a computer-readable storage medium is provided, in which program code is stored. The program code can be called by a processor to execute the steps of the above-mentioned multi-segment soft robot adaptive reinforcement learning control method.
[0051] The beneficial effects brought about by the technical solution provided by the present invention include at least:
[0052] (1) Improved control accuracy and adaptability of soft robots. The present invention provides a multi-segment soft robot model-free reinforcement learning control method that integrates expert knowledge. By introducing experts' understanding and experience of the task, it provides more effective learning signals and guidance for the reinforcement learning algorithm, accelerates strategy convergence, and improves control performance. At the same time, the method can be adjusted and optimized in real time according to actual conditions, so that the soft robot can better adapt to different environments and task requirements, and show excellent robustness and flexibility. Compared with traditional model-free reinforcement learning methods, the present invention has significant improvements in control accuracy, response speed, and adaptability, providing a new solution for achieving efficient and stable control of soft robots.
[0053] (2) Reduce the algorithm's dependence on large amounts of training data and improve learning efficiency. Traditional reinforcement learning methods usually require a lot of trial and error and exploration to converge to the optimal strategy, which leads to inefficiency in the learning process and waste of resources. The present invention introduces expert knowledge into the learning process and mixes expert demonstration data with data collected by the agent system itself, effectively reducing dependence on large data sets and significantly improving sample utilization and learning efficiency. The integration of expert knowledge not only speeds up the convergence of the algorithm, but also provides a better initial strategy for the soft robot system, avoids blind exploration, and reduces trial and error costs. In addition, expert knowledge also gives the control system better interpretability and credibility, which is conducive to the engineering application and promotion of the algorithm. In summary, the present invention provides a novel and effective approach to solving the key problem of low data efficiency in the field of reinforcement learning. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0055] Figure 1 is a flow chart of a multi-segment soft robot adaptive reinforcement learning control method integrating expert knowledge provided by an embodiment of the present invention;
[0056] Figure 2It is a schematic diagram of the framework of the multi-segment soft robot adaptive reinforcement learning control method integrating expert knowledge provided by an embodiment of the present invention;
[0057] Figure 3 It is a schematic diagram of the structure of a multi-segment soft robot adaptive reinforcement learning control device integrating expert knowledge provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0059] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the word "exemplary" is used to present concepts in a specific way.
[0060] The embodiment of the present invention provides a multi-segment soft robot adaptive reinforcement learning control method integrating expert knowledge, which can be implemented by an electronic device, which can be a terminal or a server. Figure 1 As shown, the method comprises the following steps:
[0061] S1. Use Markov decision process MDP to characterize the interaction between multi-segment soft robots and the environment;
[0062] S2, using Q-Learning algorithm to identify the optimal action selection strategy of MDP;
[0063] S3. Construct a model-free reinforcement learning framework based on the deep deterministic policy gradient algorithm DDPG, wherein the model-free reinforcement learning framework includes an action network and an evaluation network;
[0064] S4. Introducing expert knowledge into the model-free reinforcement learning framework, including: introducing expert demonstration data into the sample pool, and using the expert demonstration data to design a reward function to guide the reinforcement learning process.
[0065] Specifically, the method of the present invention is based on the DDPG algorithm, and integrates expert knowledge in two main ways to improve the performance and efficiency of the algorithm. First, the reward function is designed using expert knowledge to give different reward values to different state-action pairs. By reasonably introducing experts' understanding and experience of the task, the reward function can more accurately evaluate the pros and cons of the state-action pair, provide a more effective learning signal for the algorithm, significantly accelerate strategy convergence, and shorten training time. Second, actively intervene and optimize the sample pool in the early stage of the algorithm, introduce high-quality demonstration data provided by experts and training data for specific location points, so that the algorithm can quickly obtain a better initial strategy, improve stability in the early stage, reduce unnecessary exploration, and reduce dependence on massive empirical data, which is better suitable for actual scenarios where data is scarce.
[0066] The present invention cleverly integrates expert knowledge into the model-free reinforcement learning framework. Through reward function design and sample pool intervention, it greatly enhances the performance and efficiency of multi-segment soft robot control systems. It has significant advantages over traditional reinforcement learning methods in terms of training speed, early stability and data dependence, and provides an efficient and robust solution for the control of complex soft robot systems. At the same time, it provides better interpretability and credibility, which is convenient for engineering application and promotion.
[0067] Using reinforcement learning on a robot system requires abstracting it and expressing it as a Markov decision process (MDP). In an embodiment of the present invention, step S1 specifically includes:
[0068] Use MDP to characterize the interaction between a multi-segment soft robot and its environment, involving state s, action a, and state transition probability function and reward r, where s' is the next state after taking action a;
[0069] The tentacles of the multi-segment soft robot include three segments, each of which is driven and controlled by four cables; the action a is defined as the change in the length of each cable, expressed as a=(a1, a2, ..., a 12 ); the state s is defined as s=(p x ,p y ,p z ,a1,a2,...,a 12 ), where p x 、p y and p z are the errors of the end effector relative to the target in the Cartesian coordinate system x, y and z directions respectively; the reward r is used to quantify the impact of the action on the position of the manipulator relative to the target tip; in order to accelerate the learning process, a reward system with inductive bias is used, and the structure is described as follows:
[0070] (1)
[0071] Among them, err curr represents the deviation of the multi-segment soft robot relative to the target tip position, ε represents the threshold; if the current deviation err curr When it is less than ε, the reward r is set to +100; P represents the effect of the current action on the position of the manipulator relative to the target tip, P max is the maximum value of the influence; iter represents the number of iterations or learning update steps that the algorithm has executed, iter max is a specified maximum number of iterations or learning update steps; err prev Indicates the deviation of the multi-segment soft robot relative to the target tip position in the previous state.
[0072] Furthermore, Q-Learning is a model-free reinforcement learning technique that can identify the optimal action selection strategy for a given finite MDP. Q-Learning is based on an action-value function that gives the expected utility of a given action when the system is in a specific state. The step S2 specifically includes:
[0073] In the Q-Learning algorithm, the iterative update of the value of the Q function follows the following equation:
[0074] (2)
[0075] Among them, Q t (s t ,a t ) is the Q value corresponding to the current state action, Q t+1 (s t ,a t ) is the updated Q value, r t+1 is the reward obtained after performing the action; γ is a discount factor used to balance the importance of immediate rewards and future rewards; is in the next state s t+1 The maximum Q value of the action selected in the next step is to select the action with the maximum Q value; α is the learning rate, which controls the degree of update of the Q value by new information; where s t represents the state at time t, a t represents the action chosen at time t.
[0076] DDPG is a model-free reinforcement learning algorithm designed for continuous control. In the embodiment of the present invention, the policy gradient and value-based methods are combined. The step S3 specifically includes:
[0077] Construct a model-free reinforcement learning framework based on a deep deterministic policy gradient algorithm; the model-free reinforcement learning framework includes an Actor network and Critic Network ; The Actor network is used to receive observation data and output actions, and the Critic network is used to evaluate actions;
[0078] (3)
[0079] The Actor network and the Critic network are each increased through the policy gradient:
[0080] (4)
[0081] Defining the Target Actor Network and target critic network , update the target Critic network to minimize the loss of state-behavior evaluation to get closer to the real environment:
[0082] (5)
[0083] Among them, L(θ Q ) is the loss of state-action evaluation.
[0084] The reinforcement learning algorithm framework that integrates expert knowledge is as follows: Figure 2 As shown, the step S4 specifically includes:
[0085] The model-free reinforcement learning framework includes a real policy network and a target policy network. The real policy network selects actions and applies them to the real environment to obtain the next state and reward, i.e., the coordinates of the end position of the tentacle; the real policy network calculates the Q value of the current state and the selected action and stores them in the sample pool; extracts data from the sample pool, uses the extracted data to calculate the mean square error of the Critic network, and updates the real policy network parameters μ; calculates the Actor network error, and updates the real policy network parameters θ; and copies the real policy network parameters to the target policy network, i.e., θ' and μ', throughout the process.
[0086] Among them, the Actor network generates Gaussian distribution sampling actions through the observed state, processed by the fully connected layer and activation function, and sent to the Critic network; the Critic network evaluates these actions and outputs the corresponding action value Q value to guide the strategy update of the Actor network. In the whole process, the activation function includes ReLU, and the fully connected layer is responsible for processing the input data and passing it to the next layer. Through such an interactive and optimization process, multi-segment soft robots can continuously improve their strategies and achieve better performance in reinforcement learning tasks.
[0087] In order to solve the problem of low sampling efficiency that may be faced when collecting experience in a real physical system, the present invention introduces expert knowledge. The introduction of expert knowledge can more effectively guide the learning of the algorithm during the training process, thereby improving learning efficiency and performance.
[0088] Specifically, the expert demonstration data is stored in the sample pool and mixed with the real collected data; through the expert demonstration strategy π d To guide the learning process, the expert demonstration data contains trajectory data in the following form: time series of demonstration states , demonstrating the time sequence of state-action , demonstrating the time sequence of state-action-reward , or the time sequence of demonstration state-action-reward-next demonstration state , where t represents the time;
[0089] Trajectory data demonstrated by experts Stored in the experience pool, used to modify the objective function of the reinforcement learning algorithm:
[0090] (6)
[0091] in, It is a hyperparameter that controls the weight of expert knowledge and is used to balance the influence of real environment rewards and expert knowledge; is the modified objective function, combining the real environment reward and expert knowledge The impact of It is an objective function based on the real environment reward, generated by the reinforcement learning algorithm when it is executed in the real environment. It is an objective function based on expert knowledge, which represents the performance of the reinforcement learning algorithm in imitating the expert demonstration strategy, which is achieved by minimizing the behavior cloning loss.
[0092] During the optimization process, the policy parameters θ are updated via gradient ascent to maximize the modified objective function ,
[0093] (7)
[0094] Among them, η is the learning rate, which controls the step size of parameter update; is the corrected objective function The gradient of the policy parameter θ. By using the modified objective function and optimization algorithms such as gradient ascent, the policy parameters can be updated so that the Actor can maximize the real environment reward and the degree of matching with the expert behavior at the same time, improving learning efficiency and performance.
[0095] In summary, the present invention aims to address the many deficiencies of existing multi-segment soft robot control methods and provides a model-free reinforcement learning control method that integrates expert knowledge, which has the following advantages:
[0096] 1. Traditional model-based control methods face difficulties such as high modeling complexity and narrow application scope, making it difficult to give full play to the advantages of the compliant adaptability and flexibility of multi-segment soft robots. To address this problem, the present invention adopts a model-free reinforcement learning framework to learn the optimal control strategy through direct interaction between the multi-segment soft robot and the environment, without the need for precise modeling of the robot, which greatly reduces the complexity of controller design and improves the versatility and robustness of the control method.
[0097] 2. Although existing model-free reinforcement learning methods perform well in continuous control tasks, they often require a lot of trial and error and exploration to converge to the optimal strategy when faced with challenges such as high-dimensional observation space and sparse rewards. The learning efficiency is low and it is difficult to meet the needs of practical applications. To address this problem, the present invention innovatively introduces expert knowledge into the reinforcement learning framework, accelerates strategy learning through prior experience guidance and constrained exploration process, improves data utilization efficiency and sample complexity, enables the algorithm to adapt to new environments and tasks more quickly, and has stronger practical value.
[0098] 3. Traditional reinforcement learning methods usually rely on a large amount of environmental interaction data. However, in actual robot systems, the data collection cost is high and the sample sampling rate is low, which limits the application of reinforcement learning in the field of robot control. To address this problem, this paper cleverly uses expert demonstration data to guide the reinforcement learning process. Through techniques such as imitation learning and experience replay, it maximizes the use of prior knowledge and reduces blind exploration. While ensuring the quality of strategy optimization, it greatly reduces the dependence on environmental data and improves the practicality and robustness of the algorithm.
[0099] Therefore, the present invention has made significant progress in improving control accuracy, adaptability, sample efficiency, interpretability, etc., and provides a new solution for achieving efficient, robust and safe control of soft robots, which has broad application prospects and promotion value.
[0100] Accordingly, an embodiment of the present invention further provides a multi-segment soft robot adaptive reinforcement learning control device integrating expert knowledge, such as Figure 3 As shown, the device comprises:
[0101] MDP module 201, used to characterize the interaction between the multi-segment soft robot and the environment using a Markov decision process MDP;
[0102] Q-Learning module 202, used to identify the optimal action selection strategy of the MDP using the Q-Learning algorithm;
[0103] DDPG module 203, used to build a model-free reinforcement learning framework based on the deep deterministic policy gradient algorithm DDPG, wherein the model-free reinforcement learning framework includes an action network and an evaluation network;
[0104] The expert knowledge module 204 is used to introduce expert knowledge into the model-free reinforcement learning framework, including: introducing expert demonstration data into the sample pool, and using the expert demonstration data to design a reward function to guide the reinforcement learning process.
[0105] For ease of explanation, Figure 3 Only the main components of the device are shown. The device of this embodiment can be used to perform Figure 1 The technical solution of the method embodiment shown has similar implementation principles and technical effects, which will not be repeated here.
[0106] In an exemplary embodiment, the present invention further provides an electronic device, the electronic device comprising:
[0107] processor;
[0108] A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are loaded and executed by the processor, the steps of the above-mentioned multi-segment soft robot adaptive reinforcement learning control method are implemented.
[0109] In an exemplary embodiment, the present invention further provides a computer-readable storage medium, wherein at least one instruction is stored in the computer-readable storage medium, and the at least one instruction is loaded and executed by a processor to implement the steps of the above-mentioned multi-segment soft robot adaptive reinforcement learning control method. For example, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0110] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0111] References in the specification to "one embodiment", "an embodiment", "an exemplary embodiment", "some embodiments", etc. indicate that the described embodiments may include a particular feature, structure, or characteristic, but not every embodiment may include the particular feature, structure, or characteristic. In addition, when a particular feature, structure, or characteristic is described in conjunction with an embodiment, it should be within the knowledge of a person skilled in the relevant art to implement such feature, structure, or characteristic in conjunction with other embodiments (whether or not explicitly described).
[0112] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.
[0113] In the present invention, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0114] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0115] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0116] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0117] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0118] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.
[0119] The present invention covers any substitution, modification, equivalent method and scheme made on the essence and scope of the present invention. In order to make the public have a thorough understanding of the present invention, specific details are described in detail in the following preferred embodiments of the present invention, but those skilled in the art can fully understand the present invention without the description of these details. In addition, in order to avoid unnecessary confusion about the essence of the present invention, well-known methods, processes, procedures, components and circuits are not described in detail.
[0120] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A multi-stage soft robot adaptive reinforcement learning control method integrating expert knowledge, characterized in that: The following steps are involved: S1. Use Markov decision process MDP to characterize the interaction between multi-segment soft robots and the environment; S2, using Q-Learning algorithm to identify the optimal action selection strategy of MDP; S3. Construct a model-free reinforcement learning framework based on the deep deterministic policy gradient algorithm DDPG, wherein the model-free reinforcement learning framework includes an action network and an evaluation network; S4. Introducing expert knowledge into the model-free reinforcement learning framework, including: introducing expert demonstration data into the sample pool, and using the expert demonstration data to design a reward function to guide the reinforcement learning process.
2. The multi-segment soft robot adaptive reinforcement learning control method integrating expert knowledge according to claim 1 is characterized in that: The step S1 specifically includes: Use MDP to characterize the interaction between a multi-segment soft robot and its environment, involving state s, action a, and state transition probability function and reward r, where s' is the next state after taking action a; The tentacles of the multi-segment soft robot include three segments, each of which is driven and controlled by four cables; the action a is defined as the change in the length of each cable, expressed as a=(a1, a2, ..., a 12 ); the state s is defined as s=(p x ,p y ,p z ,a1,a2,...,a 12 ), where p x 、p y and p z are the errors of the end effector relative to the target in the Cartesian coordinate system x, y and z directions respectively; the reward r is used to quantify the impact of the action on the position of the manipulator relative to the target tip; a reward system with inductive bias is used, and the structure is described as follows: (1) Among them, err curr represents the deviation of the multi-segment soft robot relative to the target tip position, ε represents the threshold; if the current deviation err curr When it is less than ε, the reward r is set to +100; P represents the effect of the current action on the position of the manipulator relative to the target tip, P max is the maximum value of the influence; iter represents the number of iterations or learning update steps that the algorithm has executed, iter max is a specified maximum number of iterations or learning update steps; err prev Indicates the deviation of the multi-segment soft robot relative to the target tip position in the previous state.
3. The multi-segment soft robot adaptive reinforcement learning control method integrating expert knowledge according to claim 1 is characterized in that: The step S2 specifically includes: In the Q-Learning algorithm, the iterative update of the value of the Q function follows the following equation: (2) Among them, Q t (s t ,a t ) is the Q value corresponding to the current state action, Q t+1 (s t ,a t ) is the updated Q value, r t+1 is the reward obtained after performing the action; γ is a discount factor used to balance the importance of immediate rewards and future rewards; is in the next state s t+1 The maximum Q value of the action selected in the next step is to select the action with the maximum Q value; α is the learning rate, which controls the degree of update of the Q value by new information; where s t represents the state at time t, a t represents the action chosen at time t.
4. The multi-segment soft robot adaptive reinforcement learning control method integrating expert knowledge according to claim 1 is characterized in that: The step S3 specifically includes: The policy gradient and value-based methods are combined to construct a model-free reinforcement learning framework based on a deep deterministic policy gradient algorithm; the model-free reinforcement learning framework includes an Actor network and Critic Network ; The Actor network is used to receive observation data and output actions, and the Critic network is used to evaluate actions; (3) The Actor network and the Critic network are each increased through the policy gradient: (4) Defining the Target Actor Network and target critic network , update the target Critic network to minimize the loss of state-behavior evaluation to get closer to the real environment: (5) Among them, L(θ Q ) is the loss of state-action evaluation.
5. The multi-segment soft robot adaptive reinforcement learning control method integrating expert knowledge according to claim 1 is characterized in that: The step S4 specifically includes: The model-free reinforcement learning framework includes a true policy network and a target policy network; The real policy network selects an action and applies it to the real environment to obtain the next state and reward; the real policy network calculates the Q value of the current state and the selected action and stores it in the sample pool; extracts data from the sample pool, uses the extracted data to calculate the mean square error of the Critic network, and updates the real policy network parameters μ; calculates the Actor network error and updates the real policy network parameters θ; throughout the process, the real policy network parameters are copied to the target policy network, i.e. θ' and μ'; The Actor network generates Gaussian distribution sampling actions through the observed state, processed by the fully connected layer and activation function, and sends them to the Critic network; the Critic network evaluates these actions and outputs the corresponding action value Q value to guide the strategy update of the Actor network; The expert demonstration data is stored in the sample pool and mixed with the real collected data; through the expert demonstration strategy π d To guide the learning process, the expert demonstration data contains trajectory data in the following form: time series of demonstration states , demonstrating the time sequence of state-action , demonstrating the time sequence of state-action-reward , or the time sequence of demonstration state-action-reward-next demonstration state , where t represents the time; Trajectory data demonstrated by experts Stored in the experience pool, used to modify the objective function of the reinforcement learning algorithm: (6) in, It is a hyperparameter that controls the weight of expert knowledge and is used to balance the influence of real environment rewards and expert knowledge; is the modified objective function, combining the real environment reward and expert knowledge The impact of It is an objective function based on the real environment reward, generated by the reinforcement learning algorithm when it is executed in the real environment. It is an objective function based on expert knowledge, which represents the performance of the reinforcement learning algorithm in imitating the expert demonstration strategy, which is achieved by minimizing the behavior cloning loss; During the optimization process, the policy parameters θ are updated via gradient ascent to maximize the modified objective function , (7) Among them, η is the learning rate, which controls the step size of parameter update; is the corrected objective function The gradient with respect to the policy parameters θ.
6. The multi-segment soft robot adaptive reinforcement learning control method integrating expert knowledge according to claim 5 is characterized in that: The real policy network selects actions and applies them in the real environment to obtain the next state, including the end position coordinates of the multi-segment soft robot tentacles.
7. A multi-segment soft robot adaptive reinforcement learning control device integrating expert knowledge, the device is used to implement the method according to any one of claims 1 to 6, characterized in that: The device comprises: MDP module, used to characterize the interaction between multi-segment soft robots and the environment using Markov decision process MDP; Q-Learning module, used to identify the optimal action selection strategy of MDP using Q-Learning algorithm; DDPG module, used to build a model-free reinforcement learning framework based on the deep deterministic policy gradient algorithm DDPG, the model-free reinforcement learning framework includes an action network and an evaluation network; The expert knowledge module is used to introduce expert knowledge into the model-free reinforcement learning framework, including: introducing expert demonstration data into the sample pool, and using the expert demonstration data to design a reward function to guide the reinforcement learning process.
8. An electronic device, characterized in that: The electronic device comprises: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are loaded and executed by the processor, the method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program code, which can be called by a processor to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Multimode fusion robot sewing method and system based on depth reinforcement learning
CN111633647A
Robot control method based on offline model pre-training learning DDPG algorithm
CN112668235A
Micro-grid frequency control method and system based on depth deterministic strategy gradient
CN114784823A
Unmanned ship path following system and method based on deep reinforcement learning
CN114859910A
Unmanned aerial vehicle path planning method based on reverse reinforcement learning
CN115826601A
Cited By
Sea wave multi-model fusion method based on reinforcement learning
CN119249366A
Knowledge acceleration-based decision-making method and system for mobile device
CN119472309A
