Method for controlling robot

By collecting environmental data and image processing in real time, combining reinforcement learning and genetic algorithms, dynamically adjusting robot control strategies, the problem of insufficient security in the existing technology is solved, security and flexibility in complex environments are achieved, and user experience is improved .

CN119260709AActive Publication Date: 2025-01-07TIETECH SUZHOU CO LTD

Patent Information

Application Number
CN202411357029.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-01-07
Estimated Expiration
2044-09-27

AI Technical Summary

Technical Problem

When existing robot control systems interact with humans, it is difficult to dynamically adjust the distance safety threshold and the applied force safety threshold, resulting in insufficient security in different users and scenarios and unable to adapt to complex and changeable environments.

Method used

Through multiple preset sensors, image processing is performed to identify user locations, real-time distance between computer robots and users and applied forces, and optimize control strategies using reinforcement learning and genetic algorithms, dynamically adjust security thresholds, and trigger early warnings. mechanism to ensure security.

Benefits of technology

It significantly improves the security of the robot and user interaction process, provides a personalized interactive experience, improves user satisfaction and interaction comfort, and ensures that the robot maintains optimal operating status in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119260709A_ABST
    Figure CN119260709A_ABST
Patent Text Reader

Abstract

The invention discloses a method for controlling a robot, and particularly relates to the technical field of robot control, and the method comprises the following steps: collecting robot operation environment data in real time through a sensor, and recognizing the position and size of a user interacting with the robot; the distance and contact force between the robot and the user are calculated, and the applied force is adjusted in real time; when the distance or the force exceeds a safety range, an early warning mechanism is triggered; based on historical interaction data, using reinforcement learning to optimize a control strategy, and dynamically adjusting a distance safety threshold and an applied force safety threshold to ensure safety and adaptability in an interaction process; according to the method, the safety in the interaction process of the robot and the user can be remarkably improved, the control strategy can be dynamically adjusted according to the feedback of different users, personalized interaction experience is achieved, the robot can be optimized according to the requirements and safety sensitivity of different users, and therefore the satisfaction degree and the interaction comfort degree of the users are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of robot control, and more particularly, to a method for controlling a robot. Background Art

[0002] With the rapid development of robotics, robots are increasingly used in industrial automation, service industries, and the medical field. However, existing robot control systems still face the contradiction between safety and flexibility when interacting with humans. Traditional fixed threshold control methods are difficult to adapt to complex and changing environments, which may lead to insufficient safety under different users and scenarios. The prior art urgently needs an optimization method that can dynamically adjust the distance safety threshold and the applied force safety threshold to ensure the safety of the robot during interaction with the user, and can be personalized according to different user and environmental requirements. This requires the introduction of a more flexible and adaptively optimized control method to improve the reliability and user experience of the robot system in practical applications. Therefore, a method for controlling a robot is proposed herein. Summary of the invention

[0003] To achieve the above object, the present invention provides the following technical solutions:

[0004] A method for controlling a robot, comprising the following steps:

[0005] Step 1: Collect environmental data of the robot's operating environment in real time through multiple preset sensors to obtain an operating environment data set;

[0006] Step 2: Based on the operating environment dataset, image processing is performed to identify the position and size of the user currently interacting with the robot;

[0007] Step 3: Calculate the distance between the robot and the current interactive user in real time, obtain the contact force during the interactive action, and adjust the force applied by the robot in real time;

[0008] Step 4: When the distance between the robot and the current interactive user or the force applied by the robot exceeds the safety range, the early warning mechanism is triggered;

[0009] Step 5: Based on historical interaction data, use reinforcement learning to optimize the robot control strategy, obtain the robot's interactive operation status and interaction status, and dynamically adjust the distance safety threshold and the applied force safety threshold.

[0010] In a preferred embodiment, performing image processing to identify the position and size of the user currently interacting with the robot refers to:

[0011] Use the pre-trained convolutional neural network to perform image recognition and classification on the image data in the operating environment dataset to locate the user position. The output result of the target detection box of the convolutional neural network is: (x, y, w, h); x represents the X-axis coordinate of the center point of the user currently interacting with the robot, y represents the Y-axis coordinate of the center point of the user currently interacting with the robot, w represents the width of the rectangular box established by the user currently interacting with the robot, and h represents the height of the rectangular box established by the user currently interacting with the robot. Then obtain the depth data z detected by the depth camera, and summarize them to obtain the joint result: (x, y, z, w, h); the depth data z represents the Z-axis coordinate of the center point of the user currently interacting with the robot.

[0012] In a preferred embodiment, calculating the distance between the robot and the current interactive user in real time refers to:

[0013] Get the coordinate points of the robot and the joint results (x, y, z, w, h), and then use the Euclidean distance formula to calculate the distance D between the robot and the user.

[0014] In a preferred embodiment, obtaining the force applied during contact in an interactive action and adjusting the force applied by the robot in real time refers to:

[0015] The force when the robot contacts the user is obtained. When the force does not exceed the safety range, the force is adjusted in real time. The force when the robot contacts the user and the contact speed are used as input variables and converted into fuzzy values. The adjustment factor is used as the output variable. Then, fuzzy rules are formulated to map multiple input fuzzy values ​​to output fuzzy values. The output fuzzy sets of multiple rules are synthesized to obtain the final fuzzy output set.

[0016] Use the centroid method for defuzzification. The centroid method formula is expressed as:

[0017] μ sc (x) represents the membership function of the output fuzzy set, x is the value of the output variable, xmin and xmax represent the minimum and maximum values ​​of the output variable x, and μ represents the adjustment factor;

[0018] The expression for regulating the force applied by the robot is:

[0019] F0=Fi*μ; Fi represents the force when the robot contacts the user, and F0 represents the force applied by the robot after adjustment.

[0020] In a preferred embodiment, when the early warning mechanism is triggered, a warning signal is issued or the current action is actively withdrawn or switched to a safe mode. When the distance between the robot and the current interactive user or the force applied by the robot exceeds a safe range, the distance between the current robot and the current interactive user and the force applied by the current robot are obtained and used together as input data for fuzzy reasoning. The response type entered when the early warning mechanism is triggered is used as output data, and fuzzy reasoning is used to determine the response type that should be entered and execute it.

[0021] In a preferred embodiment, optimizing the robot control strategy using reinforcement learning based on historical interaction data refers to:

[0022] The robot senses the state of the environment s, and then selects an action a according to the current strategy. The robot then performs action a in the environment. After the robot performs the action, it obtains the new state s′ of the environment and obtains the corresponding reward r, and updates the Q value. The expression is:

[0023] α is the learning rate, which controls the balance between new and old information, γ is the discount factor, which determines the importance of future rewards, and Q new (s,a) represents the new Q value of taking action a in the environment state s after this update. old (s,a) represents the old Q value of taking action a in the environment state s before this update;

[0024] The new state s′ is used as the current state for update loop until the termination condition is reached. When the Q-value function converges, the robot chooses the action with the largest Q value in each environmental state, which is the optimal strategy.

[0025] In a preferred embodiment, a genetic algorithm is used to dynamically adjust the distance safety threshold and the applied force safety threshold in the robot control strategy optimized by reinforcement learning.

[0026] In a preferred embodiment, the specific steps of the genetic algorithm are as follows:

[0027] Coding and initial population: randomly generate a group of initial individuals (population), each of which represents a combination of a distance safety threshold and an applied force safety threshold;

[0028] Fitness evaluation: The fitness value of each chromosome is measured using the comfort index;

[0029] Selection operation: Use the roulette wheel selection method to select offspring as new parents;

[0030] Crossover operation: randomly exchange data in chromosomes of different parents;

[0031] Mutation operation: randomly select data of different offspring chromosomes for adjustment;

[0032] The selection operation, crossover operation and mutation operation are repeated until the preset termination condition is reached, and the individual with the lowest fitness is output as the combination of the optimal distance safety threshold and the applied force safety threshold.

[0033] In a preferred embodiment, the comfort index refers to:

[0034] The feedback data of interactive users are collected to obtain a feedback data set. The number of times the interactive users press the feedback button per unit time, the average strength, the average depth, and the average change in skin conductivity are extracted from the feedback data set. The weighted sum is then performed to obtain a comfort index.

[0035] Technical effects and advantages of the present invention:

[0036] The present invention can significantly improve the safety of the robot-user interaction process by collecting environmental data in real time and making dynamic adjustments. The triggering conditions of the early warning mechanism ensure that when the distance or applied force exceeds the safe range, the robot can respond quickly to avoid potential harm to the user. The present invention uses reinforcement learning and genetic algorithms to dynamically adjust the control strategy according to the feedback of different users to achieve a personalized interactive experience. The robot can be optimized according to the needs and safety sensitivity of different users, thereby improving user satisfaction and interaction comfort.

[0037] By using deep learning, fuzzy logic control systems and genetic algorithms, the present invention enables the robot to adaptively adjust control parameters in complex and changing environments. Whether in a changing environment or facing different users, the robot can maintain the best operating state to ensure the stability and effectiveness of the operation. Through the combination of reinforcement learning and genetic algorithms, the present invention can continuously optimize the robot control strategy. Reinforcement learning is used to learn and improve operating strategies, while genetic algorithms are used to fine-tune key safety thresholds, making the control strategy more flexible and accurate, ensuring that the robot can operate efficiently while ensuring safety.

[0038] The fitness function designed in the present invention can effectively reduce the discomfort and insecurity that may occur to users during the interaction process. By counting user feedback data and optimizing it, the robot can provide a smoother and more natural interactive experience, which is suitable for application scenarios with high requirements for user experience. The method of the present invention is not only suitable for specific robot control scenarios, but also has a wide range of application potential. Whether in the field of industrial automation, home services or medical care, this method can provide reliable security and personalized interactive experience to meet the needs of different application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to facilitate understanding by those skilled in the art, the present invention is further described below in conjunction with the accompanying drawings;

[0040] Figure 1 The schematic diagram is a method for controlling a robot in the present invention. DETAILED DESCRIPTION

[0041] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments 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.

[0042] Reference Figure 1 The following embodiments are obtained:

[0043] Embodiment 1: A method for controlling a robot, comprising the following steps:

[0044] Step 1: Collect environmental data of the robot's operating environment in real time through multiple preset sensors such as force sensors, proximity sensors, cameras, ultrasonic sensors, etc. to obtain an operating environment data set;

[0045] Step 2: Based on the operating environment data set, image processing is performed to identify the position and size of the user currently interacting with the robot; performing image processing to identify the position and size of the user currently interacting with the robot refers to:

[0046] Use the pre-trained convolutional neural network to perform image recognition and classification on the image data in the operating environment dataset to locate the user position. The output result of the target detection frame of the convolutional neural network is: (x, y, w, h); x represents the X-axis coordinate of the center point of the user currently interacting with the robot, y represents the Y-axis coordinate of the center point of the user currently interacting with the robot, w represents the width of the rectangular frame established by the user currently interacting with the robot, and h represents the height of the rectangular frame established by the user currently interacting with the robot. These parameters together describe a rectangular frame that frames the area of ​​the target object in the image. Through this rectangular frame, the robot can identify the two-dimensional plane position of the target object in the image and the area it occupies. In traditional 2D image processing, the image itself has only two dimensions (i.e., height and width), so the detection frame output by CNN also has only four parameters (x, y, w, h), which are specifically used to describe the position information on the two-dimensional plane. Since there is no depth information (i.e., the third dimension z) in the image, CNN can only provide information on the plane. Therefore, in order to obtain the depth information z (i.e., distance) of the target object relative to the robot, additional sensors are usually required, such as: a depth camera can directly provide the depth information z of the object; a laser radar (LIDAR): measures distance information and generates 3D coordinates in combination with 2D images; and a stereoscopic vision: calculates the depth information through the parallax of two cameras. In the embodiment of the present invention, the depth data z detected by the depth camera is selected and then summarized to obtain the joint result: (x, y, z, w, h); the depth data z represents the Z-axis coordinate of the center point of the user currently interacting with the robot. Such an operation can enable the robot to expand its perception range, not only to identify objects on the plane, but also to know the distance of the object, forming a complete three-dimensional space perception. At this time, z as depth information will be included in the output result, forming a complete description of the joint result (x, y, z, w, h).

[0047] Step 3: Calculate the distance between the robot and the current interactive user in real time, obtain the contact force during the interactive action and adjust the force applied by the robot in real time; obtain the coordinate points of the robot and the joint results (x, y, z, w, h), and then use the Euclidean distance formula to calculate the distance D between the robot and the user. (x r ,y r , z r ) represents the coordinate position of the robot, (x u ,y u , z u ) represents the coordinate position of the current interactive user. The larger the distance D between the robot and the user, the safer it is.

[0048] Fuzzy logic control system is a control method based on fuzzy set theory, which is particularly suitable for dealing with systems with uncertainty or ambiguity. In the regulation of the force applied by the robot, the fuzzy logic control system can determine the appropriate output force based on sensor input and user feedback. The following details this process and explains how the regulation factor is obtained:

[0049] The fuzzy logic control system determines the output through the following steps:

[0050] Fuzzification: Convert the precise value of the sensor input into a fuzzy value. The input usually involves multiple variables, such as the current contact force detected by the force sensor, the contact speed, the distance between the user and the robot, etc. Fuzzy reasoning: According to the preset fuzzy rules, the fuzzy output is calculated in combination with the input fuzzy value. Defuzzification: Convert the result of fuzzy reasoning into a specific numerical output, that is, the adjustment factor of the output.

[0051] The force when the robot contacts the user is obtained. When the force does not exceed the safety range, the force is adjusted in real time. The force when the robot contacts the user and the contact speed are used as input variables and converted into fuzzy values. The adjustment factor is used as the output variable. Then, fuzzy rules are formulated to map multiple input fuzzy values ​​to output fuzzy values. The output fuzzy sets of multiple rules are synthesized to obtain the final fuzzy output set.

[0052] In the present invention, an example is given as follows: assuming that the system has two input variables: contact force E: the currently detected contact force between the user and the robot; contact speed V: the currently detected contact speed between the user and the robot, these input variables are converted into fuzzy values. For example, the contact force E can be defined as "low", "medium", and "high", and the contact speed V can be defined as "fast", "moderate", and "slow". Each fuzzy value is a fuzzy set, usually represented by a membership function (such as a triangular membership function). Based on experience and system requirements, fuzzy rules are formulated, for example: Rule 1: If E is "high" and V is "fast", then μ should be "reduced". Rule 2: If E is "low" and V is "slow", then μ should be "maintained". Rule 3: If E is "medium" and V is "moderate", then μ should be "slightly reduced". These rules map multiple input fuzzy values ​​to output fuzzy values.

[0053] Through the fuzzy inference system, the input fuzzy value is matched with the preset fuzzy rules, and the output fuzzy set is calculated. The process includes: Calculating rule activation strength: Determine which rules are activated and calculate the activation strength based on the input fuzzy value. Synthesize fuzzy output: Synthesize the output fuzzy sets of multiple rules to obtain the final fuzzy output set.

[0054] The defuzzification process converts the result of fuzzy reasoning into a specific numerical output μ. Common defuzzification methods include the centroid method, which calculates the centroid of the fuzzy set to obtain the specific value of μ. The centroid method formula is expressed as:

[0055] μ sc (x) represents the membership function of the output fuzzy set, x is the value of the output variable, xmin and xmax represent the minimum and maximum values ​​of the output variable x, and μ represents the adjustment factor;

[0056] The expression for adjusting the force applied by the robot is: F0 = Fi * μ; Fi represents the force when the robot contacts the user, and F0 represents the force applied by the robot after adjustment. Through the fuzzy logic control system, the adjustment factor μ is obtained based on the input sensor data and preset rules. In actual operation, μ enables the robot to make reasonable force output adjustments in a complex and fuzzy environment, thereby achieving the predetermined task goals and ensuring the safety of the user during the interaction process.

[0057] Step 4. When the distance between the robot and the current interactive user or the force applied by the robot exceeds the safety range, the early warning mechanism is triggered. When the early warning mechanism is triggered, a warning signal is issued or the current action is actively withdrawn or switched to the safety mode. When the distance between the robot and the current interactive user or the force applied by the robot exceeds the safety range, the distance between the current robot and the current interactive user and the force applied by the current robot are obtained and used together as the input data of the fuzzy reasoning. The response type entered when the early warning mechanism is triggered is used as the output data, and the fuzzy reasoning is used to determine the response type that should be entered and execute it.

[0058] The triggering condition of the early warning mechanism is when the distance between the robot and the user is too close or the force applied by the robot exceeds the safety threshold. When triggered, the robot needs to respond immediately to prevent harm to the user. Once the early warning mechanism is triggered, the system will immediately obtain the current distance between the robot and the user and the force applied by the robot. These data are the key inputs for determining how to respond next.

[0059] The acquired distance and force data are used as inputs to the fuzzy inference system. The fuzzy inference system converts these precise data into fuzzy variables, such as distance can be described as "close" or "far", and force can be described as "high" or "low". This fuzzification process can better deal with uncertainty and ambiguity. The fuzzy inference system determines the response measures based on preset fuzzy rules. For example, if the distance is detected to be very close and the applied force is high, the system may think that the current situation is very dangerous and decide to switch to safe mode. If the distance is detected to be close but the applied force is low, it may only need to issue a warning signal. If the distance is far and the applied force is low, no special response measures may be taken. Based on the output of the fuzzy inference system, the system will determine the most suitable response type for the current situation. Possible response types include: issuing a warning signal, actively withdrawing the current action, or switching to safe mode. Finally, according to the results of fuzzy inference, the corresponding response measures are executed. When issuing a warning signal, the robot may remind the user through sound, light signals, etc.; if the action is withdrawn, the robot will pause the current operation and return to a safe position; when switching to safe mode, the robot will reduce the operation speed or stop all high-risk actions to ensure the safety of the user.

[0060] Step 5: Based on historical interaction data, use reinforcement learning to optimize the robot control strategy, obtain the robot's interactive operation status and interaction status, and dynamically adjust the distance safety threshold and the applied force safety threshold.

[0061] Based on historical interaction data, using reinforcement learning to optimize the robot control strategy means:

[0062] Reinforcement learning is a trial-and-error based learning method where the robot performs actions in the environment, updates its strategy based on the results (rewards or penalties) of the actions, and gradually learns how to choose the best actions in different states to maximize long-term benefits.

[0063] The basic components of reinforcement learning: State s: the state of the robot's environment, such as the current distance, applied force, speed, etc. Action a: the operation that the robot can perform in the current state, such as moving, turning, grabbing, stopping, etc. Reward r: the feedback the robot gets from the environment after performing an action, which can be positive (reward) or negative (penalty). Strategy π(s): a mapping from state to action, indicating the probability that the robot chooses action a in state s. Function Q(s,a): evaluates the cumulative reward that may be obtained in the future under a certain state or state-action pair.

[0064] Initialize the Q-value function Q(s,a), which represents the expected return of taking action a in state s. Usually, the Q-value can be initialized randomly. Set the learning rate α, discount factor γ, and exploration rate ∈,

[0065] The robot senses the state of the environment s (for example, obtains environmental information through sensors), and then selects an action a according to the current strategy. The commonly used method is the ∈-greedy strategy, that is, randomly selects an action with a probability of ∈, selects the action with the highest current Q value with a probability of 1-∈, and then the robot performs action a in the environment. After the robot performs the action, it obtains the new state s′ of the environment and obtains the corresponding reward r, and updates the Q value. The expression is:

[0066] a is the learning rate, which controls the balance between new and old information, γ is the discount factor, which determines the importance of future rewards, and Q new (s,a) represents the new Q value of taking action a in the environment state s after this update. old (s,a) represents the old Q value of taking action a in the environment state s before this update;

[0067] The new state s′ is used as the current state for update loop, that is, the above steps are repeated until the termination condition is reached (such as completing the task or reaching the maximum number of steps). The above process is continuously iterated to gradually update the Q value function until it converges to the optimal strategy. When the Q value function converges, the robot chooses the action with the largest Q value in each environmental state, which is the optimal strategy.

[0068] This means that in state s, the robot will choose action a that can obtain the maximum long-term reward. This action refers to the interactive action in the interaction process, which can better interact with the user. The robot can continuously optimize its strategy in the process of constantly accumulating experience, especially in a dynamically changing environment. Reinforcement learning can adaptively adjust strategies to meet new challenges. New challenges can refer to different interactive users. Different interactive users will have different levels of interest in different interactive actions. Based on reinforcement learning, personalized interactions of different interactive users can be formed, rather than fixed interactive actions, which can stimulate more interactive users' desire for interaction and ensure a good interactive experience.

[0069] Genetic algorithms are used to dynamically adjust the distance safety threshold and force safety threshold in the robot control strategy optimized by reinforcement learning. The primary purpose of dynamically adjusting the distance safety threshold and force safety threshold is to ensure safety during the interaction process. Reinforcement learning has optimized the robot's control strategy in many situations, but in actual applications, individual differences in the environment and users may lead to different safety requirements. Genetic algorithms can further fine-tune these thresholds to adapt to the safety requirements of specific scenarios, thereby minimizing danger.

[0070] Each user has different needs and safety sensitivities, and the genetic algorithm can achieve personalized adjustments by evaluating and optimizing these thresholds. The genetic algorithm can automatically adjust the distance safety threshold and force safety threshold when the robot interacts with a specific user based on the feedback data of different users, so that the robot can better adapt to the personalized needs of each user, thereby providing a safer and more comfortable interaction experience.

[0071] Another important purpose of dynamic adjustment is to enhance the adaptability of the robot control system. In complex and changing environments, the preset fixed thresholds may not meet the needs of all scenarios. By continuously evolving and adjusting these thresholds, the genetic algorithm enables the robot to maintain the best operating state in different environments, ensuring safety. By optimizing the distance safety threshold and the applied force safety threshold, the robot can achieve a more effective and natural interaction process while ensuring safety. This optimization enables the robot to be more flexible and effective in actual operation. In this way, the robot can not only better protect the safety of users, but also provide more customized and flexible operations according to the needs of different users and environments, thereby improving the overall user experience and the control performance of the robot.

[0072] The specific steps of the genetic algorithm are as follows:

[0073] Coding and initial population: randomly generate a group of initial individuals (population), each individual represents a combination of a distance safety threshold and an applied force safety threshold; chromosome representation: assuming that the distance safety threshold dnew and the applied force safety threshold Fnew are used as optimization targets, the two are represented by real numbers respectively, then an individual (chromosome) Individual can be expressed as: Individual = [dnew, Fnew].

[0074] Fitness evaluation: The comfort index is used to measure the fitness value of each chromosome, and a fitness function is defined to evaluate the pros and cons of each individual (i.e., each set of thresholds). The fitness function should reflect the safety and effectiveness of the robot's operation. Effectiveness refers to the degree of interaction acceptance that meets the interactive user's needs.

[0075] Selection operation: Use the roulette wheel selection method to select offspring as new parents; retain the individuals with the lowest fitness in the current population to ensure that the optimal solution is not lost.

[0076] Crossover operation: randomly exchange data in different parent chromosomes; mutation operation: randomly select data from different daughter chromosomes for adjustment; repeat selection operation, crossover operation and mutation operation until the preset termination condition is reached. Common termination conditions include: reaching the preset maximum number of iterations or the rate of change of population fitness is lower than a certain threshold (that is, population fitness convergence), and outputting the individual with the lowest fitness as the combination of the optimal distance safety threshold and the applied force safety threshold.

[0077] During the robot operation, a real-time feedback button or touch interface is provided. Users can press the button at any time to express their discomfort or safety concerns about the current operation. Data processing: Count the number of times and time points when the user presses the button. If the button is pressed frequently or concentrated in a specific operation period, it means that the operation may have a comfort problem. At the same time, the user's physiological parameters are monitored through wearable devices. Higher skin conductivity may indicate that the user is in a state of tension. The feedback data of the interactive users are collected to obtain a feedback data set. Then, the number of times the interactive user presses the feedback button per unit time, the average force F, the average depth D, and the average change amplitude of the skin conductivity ΔG are extracted from the feedback data set. The fitness function should combine these factors to optimize the robot control strategy. A weighted comprehensive fitness function can be designed, in which each indicator is assigned a different weight according to its importance. The goal of the fitness function is to minimize the manifestation of these insecurity and discomfort, so we hope that the value of the fitness function is as low as possible. The comfort index Fitness refers to: the number of times the interactive user presses the feedback button per unit time, the average force, the average depth, and the average change in skin conductivity extracted from the feedback data set are weighted and summed to obtain the comfort index, Fitness = w1*N+w2*F+w3*S+w4*ΔG; w1, w2, w3, and w4 represent the preset weight coefficients of the number of times the interactive user presses the feedback button per unit time N, the average force F, the average depth S, and the average change in skin conductivity ΔG, respectively, which are used to adjust the degree of influence on the comfort index, and w1, w2, w3, and w4 are all positive values.

[0078] The smaller the comfort index is, the higher the acceptance of the interactive user to the current interactive behavior is. Therefore, the goal is to minimize the fitness function value. The genetic algorithm will adjust the parameters of the robot control strategy to find the best solution that can minimize the user's discomfort and insecurity. Optimization process: In each generation of the genetic algorithm, individuals are selected, crossed, and mutated according to the value of the fitness function, and the control strategy is gradually optimized to reduce the frequency, strength, speed of the user's button presses, and the amplitude of the change in skin conductivity, ultimately improving the safety and comfort of the robot interaction. Through this fitness function, the robot control strategy can gradually reduce the user's negative reactions during the optimization process, improve the operating experience, and ensure that a safe and comfortable interactive experience can be provided in different operating scenarios. This design method is particularly suitable for application scenarios where safety is critical or user experience is crucial.

[0079] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.

[0080] It should be understood that in the various embodiments of the present application, 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 application.

[0081] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0082] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0083] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for controlling a robot, characterized in that: The following steps are involved: Step 1: Collect environmental data of the robot's operating environment in real time through multiple preset sensors to obtain an operating environment data set; Step 2: Based on the operating environment dataset, image processing is performed to identify the position and size of the user currently interacting with the robot; Step 3: Calculate the distance between the robot and the current interactive user in real time, obtain the contact force during the interactive action, and adjust the force applied by the robot in real time; Step 4: When the distance between the robot and the current interactive user or the force applied by the robot exceeds the safety range, the warning mechanism is triggered; Step 5: Based on historical interaction data, use reinforcement learning to optimize the robot control strategy, obtain the robot's interactive operation status and interaction status, and dynamically adjust the distance safety threshold and the applied force safety threshold.

2. A method for controlling a robot according to claim 1, characterized in that: Image processing to identify the position and size of the user currently interacting with the robot refers to: Use the pre-trained convolutional neural network to perform image recognition and classification on the image data in the operating environment dataset to locate the user position. The output result of the target detection box of the convolutional neural network is: (x, y, w, h); x represents the X-axis coordinate of the center point of the user currently interacting with the robot, y represents the Y-axis coordinate of the center point of the user currently interacting with the robot, w represents the width of the rectangular box established by the user currently interacting with the robot, and h represents the height of the rectangular box established by the user currently interacting with the robot. Then obtain the depth data z detected by the depth camera, and summarize them to obtain the joint result: (x, y, z, w, h); the depth data z represents the Z-axis coordinate of the center point of the user currently interacting with the robot.

3. A method for controlling a robot according to claim 2, characterized in that: Real-time calculation of the distance between the robot and the current interactive user refers to: Get the coordinate points of the robot and the joint results (x, y, z, w, h), and then use the Euclidean distance formula to calculate the distance D between the robot and the user.

4. A method for controlling a robot according to claim 3, characterized in that: Obtaining the forces at contact during interaction and adjusting the forces applied by the robot in real time means: The force when the robot contacts the user is obtained. When the force does not exceed the safety range, the force is adjusted in real time. The force when the robot contacts the user and the contact speed are used as input variables and converted into fuzzy values. The adjustment factor is used as the output variable. Then, fuzzy rules are formulated to map multiple input fuzzy values ​​to output fuzzy values. The output fuzzy sets of multiple rules are synthesized to obtain the final fuzzy output set. Use the centroid method for defuzzification. The centroid method formula is expressed as: μ sc (x) represents the membership function of the output fuzzy set, x is the value of the output variable, xmin and xmax represent the minimum and maximum values ​​of the output variable x, and μ represents the adjustment factor; The expression for regulating the force applied by the robot is: F0=Fi*μ; Fi represents the force when the robot contacts the user, and F0 represents the force applied by the robot after adjustment.

5. A method for controlling a robot according to claim 4, characterized in that: When the early warning mechanism is triggered, a warning signal is issued or the current action is actively withdrawn or switched to safe mode. When the distance between the robot and the current interactive user or the force applied by the robot exceeds the safe range, the distance between the current robot and the current interactive user and the force applied by the current robot are obtained and used as input data for fuzzy reasoning. The response type entered when the early warning mechanism is triggered is used as output data, and fuzzy reasoning is used to determine the response type that should be entered and execute it.

6. A method for controlling a robot according to claim 5, characterized in that: Based on historical interaction data, using reinforcement learning to optimize the robot control strategy means: The robot perceives the state of the environment s, and then selects an action a according to the current strategy. The robot then performs action a in the environment. After the robot performs the action, it obtains the new state s′ of the environment and obtains the corresponding reward r, and updates the Q value. The expression is: α is the learning rate, which controls the balance between new and old information, γ is the discount factor, which determines the importance of future rewards, and Q new (s,a) represents the new Q value of taking action a in the environment state s after this update. old (s,a) represents the old Q value of taking action a in the environment state s before this update; The new state s′ is used as the current state for update loop until the termination condition is reached. When the Q-value function converges, the robot chooses the action with the largest Q value in each environmental state, which is the optimal strategy.

7. A method for controlling a robot according to claim 6, characterized in that: A genetic algorithm is used to dynamically adjust the distance safety threshold and force safety threshold in the robot control strategy optimized by reinforcement learning.

8. A method for controlling a robot according to claim 7, characterized in that: The specific steps of the genetic algorithm are as follows: Coding and initial population: randomly generate a group of initial individuals (population), each of which represents a combination of a distance safety threshold and an applied force safety threshold; Fitness evaluation: The fitness value of each chromosome is measured using the comfort index; Selection operation: Use the roulette wheel selection method to select offspring as new parents; Crossover operation: randomly exchange data in chromosomes of different parents; Mutation operation: randomly select data of different offspring chromosomes for adjustment; The selection operation, crossover operation and mutation operation are repeated until the preset termination condition is reached, and the individual with the lowest fitness is output as the combination of the optimal distance safety threshold and the applied force safety threshold.

9. A method for controlling a robot according to claim 8, characterized in that: The comfort index refers to: The feedback data of interactive users are collected to obtain a feedback data set. The number of times the interactive users press the feedback button per unit time, the average strength, the average depth, and the average change in skin conductivity are extracted from the feedback data set. The weighted sum is then performed to obtain a comfort index.

Citation Information

Patent Citations

  • Kinect-based man-machine interaction method for two-arm robot

    CN102814814A

  • Method of cooperative flexible attitude control for motion capture robot

    CN105252532A

  • Robot real time control method based on environmental interaction

    CN107292344A

  • AUV action plan and operation control method based on reinforcement learning

    JP2021034050A

Cited By

  • Optimization method of robot control model and related equipment

    CN120715901A