Robot control method and device, electronic equipment and storage medium

By initializing and optimizing robot control parameters using an improved particle swarm optimization algorithm, the problem of dependence on manually preset parameters is solved, thereby improving the convenience and stability of robot control.

CN119501955AInactive Publication Date: 2025-02-25HARBIN SIZHERUI INTELLIGENT MEDICAL EQUIP CO LTD
View PDF 14 Cites 0 Cited by

Patent Information

Application Number
CN202510089248.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-21
Publication Date
2025-02-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing robot control methods rely on preset parameters, which can affect robot performance and stability when operators lack skills and experience.

Method used

An improved particle swarm optimization algorithm is adopted. By obtaining the preset parameter range of robot control parameters, the position and velocity of particles in the swarm are initialized, the target position of the particles is determined, and thus the robot control parameters are obtained.

Benefits of technology

It enables convenient and effective robot control, improving the robot's performance and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119501955A_ABST
    Figure CN119501955A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a robot control method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring a preset parameter range of robot control parameters of a target robot, setting an initial position and an initial speed of each particle in a pre-created population according to the preset parameter range, and setting an initial individual target position of each particle and an initial population target position of the population, each particle represents a group of potential robot control parameters; determining the target individual target position of each particle based on the initial position, the initial speed and the initial individual target position of each particle by adopting an improved particle swarm algorithm, and determining the target population target position of the population based on the target individual target positions of all particles and the initial population target position; the robot control parameters in the parameter range are obtained based on the target position of the target individual and the target position of the target population, and the robot can be controlled more conveniently and effectively based on the robot control parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of control technology, and in particular, to a robot control method, device, electronic device and storage medium. Background Art

[0002] With the rapid progress of robot technology, it is widely used in industrial production, medical health and daily life, showing great potential. Among them, control technology plays a vital role as the basis for the realization of robot functions and the measure of intelligence level.

[0003] In related technologies, robot control is often achieved by manually setting parameters. The effectiveness of manually setting control parameters depends largely on the skills and experience of the operator. If the operator does not have a deep understanding of robot control technology or lacks experience, the parameters may not be set correctly, which will affect the performance and stability of the robot. Summary of the invention

[0004] The present invention provides a robot control method, device, electronic equipment and storage medium to achieve relatively convenient and effective control of the robot, thereby improving the performance and stability of the robot.

[0005] According to one aspect of the present invention, there is provided a robot control method, the method comprising:

[0006] Obtaining a preset parameter range of a robot control parameter of a target robot, and setting an initial position and an initial velocity of each particle in a pre-created population according to the preset parameter range, and setting an initial individual target position of each particle and an initial population target position of the population, wherein each particle represents a set of potential robot control parameters;

[0007] Using an improved particle swarm algorithm, a target individual target position of each particle is determined based on the initial position, initial velocity and initial individual target position of each particle, and a target population target position of the population is determined based on the target individual target positions of all particles and the initial population target position;

[0008] Based on the target individual target position and the target population target position, a robot control parameter within the parameter range is obtained, and the target robot is controlled based on the robot control parameter.

[0009] According to another aspect of the present invention, there is provided a robot control device, the device comprising:

[0010] a parameter initial setting module, for obtaining a preset parameter range of a robot control parameter of a target robot, and setting an initial position and an initial velocity of each particle in a pre-created population according to the preset parameter range, and setting an initial individual target position of each particle and an initial population target position of the population, each of the particles representing a set of potential robot control parameters;

[0011] A target parameter determination module is used to determine the target individual target position of each particle based on the initial position, initial velocity and initial individual target position of each particle by using an improved particle swarm algorithm, and determine the target population target position of the population based on the target individual target positions of all particles and the initial population target position;

[0012] The robot control module is used to obtain robot control parameters within the parameter range based on the target individual target position and the target population target position, and control the target robot based on the robot control parameters.

[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0014] at least one processor; and

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the robot control method described in any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the robot control method described in any embodiment of the present invention when executed.

[0018] The technical solution of the embodiment of the present invention obtains the preset parameter range of the robot control parameters of the target robot, initializes the current position and current speed of each particle in the pre-created population according to the preset parameter range, and sets the current particle individual target position and the current population target position, wherein the particle is the robot control parameter. Based on the current position and current speed of each particle, the preset fitness function, the current particle individual target position and the current population target position, the target individual target position and the target population target position are determined. Based on the target individual target position and the target population target position, the robot control parameters within the parameter range are obtained, and the target robot is controlled based on the robot control parameters. The technical solution of the embodiment of the present invention realizes a relatively convenient and effective control of the robot, and improves the performance and stability of the robot.

[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] 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.

[0021] Figure 1 A schematic flow chart of a robot control method provided by an embodiment of the present invention;

[0022] Figure 2 A schematic flow chart of a robot control method provided by an embodiment of the present invention;

[0023] Figure 3 A schematic diagram of the structure of a robot control device provided by an embodiment of the present invention;

[0024] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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 should fall within the scope of protection of the present invention.

[0026] It should be noted that the terms "including" and "having" and any variations thereof in the specification and claims of the present invention and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or apparatus.

[0027] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0028] Figure 1 The present invention provides a flowchart of a robot control method. This embodiment is applicable to the case of controlling a robot. The method can be executed by a robot control device. The robot control device can be implemented in the form of hardware and / or software. The robot control device can be configured in an electronic device such as a computer or a server. Figure 1 As shown, the method of this embodiment includes:

[0029] S110. Obtain a preset parameter range of the robot control parameters of the target robot, and according to the preset parameter range, set an initial position and an initial velocity of each particle in a pre-created population, as well as set an initial individual target position of each particle and an initial population target position of the population, wherein each of the particles represents a set of potential robot control parameters.

[0030] Among them, the target robot can be understood as a robot to be controlled. The robot control parameter can be understood as a control parameter for controlling the target robot. In an embodiment of the present invention, the robot control parameter may include a PID controller (Proportion Integration Differentiation, proportional-integral-differential controller) parameter. The PID controller may include a proportional unit, an integral unit, and a differential unit. The PID controller parameters may include a proportional gain (Kp), an integral time constant (Ti), and a differential time constant (Td). In an embodiment of the present invention, there are multiple ways to obtain a preset parameter range of the robot control parameter of the target robot. For example, in response to a parameter range setting operation for the robot control parameter of the target robot, the preset parameter range of the robot control parameter of the target robot can be obtained; or, in response to a parameter range input operation for the robot control parameter of the target robot, the preset parameter range of the robot control parameter of the target robot can be obtained. It should be noted that the preset parameter range can be obtained through a large number of experiments.

[0031] In an embodiment of the present invention, each particle in the pre-created population represents a set of potential robot control parameters. A set of potential robot control parameters may include a proportional gain, an integral time constant, and a differential time constant. It should be noted that in an embodiment of the present invention, the number of particles in the pre-created population may be set according to actual needs, which is not specifically limited here, for example, 50, 100 or 300, etc. In an embodiment of the present invention, the initial position of the particle may be obtained by initializing the position of the particle based on the preset parameter range. Among them, the method for obtaining the initial position of the particle may specifically be that, for each particle, the position of the particle may be randomly initialized based on the preset parameter range, and the initialized position may be used as the initial position of the particle.

[0032] The initial velocity of the particle can be obtained by initializing the velocity of the particle based on the preset parameter range. The way to obtain the initial velocity of the particle can be, for each particle, the velocity of the particle can be initialized based on the preset parameter range, and the initialized velocity is used as the initial velocity of the particle. The initial individual target position can be understood as the individual optimal position of each particle, or a position that meets preset conditions. The initial population target position can be understood as the best individual optimal position in the entire population, or a position that meets preset conditions, that is, the global optimal position. The position that meets the preset conditions can be set according to actual needs and is not specifically limited here.

[0033] In an embodiment of the present invention, a population is created in advance, that is, a pre-created population is obtained, wherein the pre-created population includes a plurality of particles. Then, the initial position and initial velocity of each particle in the population can be set based on a preset parameter range. Specifically, the initial position and initial velocity of each particle in the population can be randomly set based on the preset parameter range to limit the initial position and initial velocity of each particle by the preset parameter range. After the initial position and initial velocity of each particle are set, the initial individual target position of each particle and the initial population target position of the population can be set based on the initial position of each particle.

[0034] In an embodiment of the present invention, setting the initial individual target position of each particle and the initial population target position of the population based on the initial position of each particle may include: first setting the initial individual target position of each particle based on the initial position of each particle; then setting the initial population target position of the population based on the initial position of each particle; or, setting the initial population target position of the population based on the initial individual target position of each particle.

[0035] Wherein, the step of setting the initial individual target position of each particle based on the initial position of each particle may specifically include, for each particle, determining the initial position of the particle as the initial individual target position of the particle. The step of setting the initial population target position of the population based on the initial position of each particle may include, randomly selecting a particle from the population, and setting the initial position of the selected particle as the initial population target position of the population. The step of setting the initial population target position of the population based on the initial individual target position of each particle may include, randomly selecting a particle from the population, and setting the initial individual target position of the selected particle as the initial population target position of the population.

[0036] S120. Using an improved particle swarm algorithm, determine the target individual target position of each particle based on the initial position, initial velocity and initial individual target position of each particle, and determine the target population target position of the population based on the target individual target positions of all particles and the initial population target position.

[0037] In an embodiment of the present invention, the target individual target position can be understood as the individual optimal position for calculating the robot control parameters of the target robot, or a position that meets preset conditions. The target population target position can be understood as the population optimal position for calculating the robot control parameters of the target robot, or a position that meets preset conditions. In an embodiment of the present invention, the preset fitness function of the improved particle swarm algorithm can be constructed based on the error integral function and the overshoot function of the control system of the target robot. The preset fitness function can be understood as a pre-set function for evaluating the quality of the particle position. Optionally, the preset fitness function can be expressed by the following formula:

[0038] ;

[0039] ;

[0040] ;

[0041] ;

[0042] in, It can be expressed as an error integral function. g(∆e) can be expressed as the overshoot function of the control system of the target robot. e(t) can be expressed as the deviation between the actual output and the expected output. is the actual value of the system indicator, is the target value of the system indicator. It can be expressed as the weight factor of the error integral function, It can be expressed as the weight factor of the overshoot function of the control system of the target robot. It should be noted that and It can be set according to actual needs and is not limited here.

[0043] In the embodiment of the present invention, the fitness function of the improved particle swarm algorithm can be set, that is, the preset fitness function of the improved particle swarm algorithm can be obtained. Then, the preset fitness function of the improved particle swarm algorithm can be used to determine the target individual target position of each particle based on the initial position, initial velocity and initial individual target position of each particle. Thus, the target population target position of the population can be determined based on the target individual target positions of all particles and the initial population target position.

[0044] In the embodiment of the present invention, the target population target position of the population is determined based on the target individual target positions of all particles and the initial population target position. Specifically, after determining the target individual target positions of all particles, a target individual target position can be selected from the target individual target positions of all particles. Then, the target population target position of the population can be determined based on the selected target individual target position and the initial population target position.

[0045] It should be noted that, in the embodiment of the present invention, the improved particle swarm algorithm is used to determine the target individual target position of each particle and the target population target position of the population, which can not only reduce the number of iterations, but also more accurately determine the parameters of machine control.

[0046] S130. Based on the target individual target position and the target population target position, obtain robot control parameters within the parameter range, and control the target robot based on the robot control parameters.

[0047] In the embodiment of the present invention, after obtaining the target individual target position and the target population target position, the target individual target position and the target population target position can be brought into the method for robot control parameters. Thus, the robot control parameters within the parameter range can be obtained. Then, the target robot can be controlled according to the robot control parameters so that the target robot performs a preset task.

[0048] Wherein, based on the target individual target position and the target population target position, obtaining the robot control parameters within the parameter range may include: for multiple parameters in the robot control parameters, respectively bringing the target individual target position and the target population target position into the method for calculating the corresponding parameters. Thus, each parameter value within the parameter range can be obtained, that is, the robot control parameters within the parameter range can be obtained.

[0049] The technical solution of the embodiment of the present invention obtains the preset parameter range of the robot control parameters of the target robot, sets the initial position and initial speed of each particle in the pre-created population according to the preset parameter range, and sets the initial individual target position of each particle and the initial population target position of the population, wherein each particle represents a set of potential robot control parameters; adopts an improved particle swarm algorithm, determines the target individual target position of each particle based on the initial position, initial speed and initial individual target position of each particle, and determines the target population target position of the population based on the target individual target position of all particles and the initial population target position; obtains the robot control parameters within the parameter range based on the target individual target position and the target population target position, and controls the target robot based on the robot control parameters. The technical solution of the embodiment of the present invention realizes a more convenient and effective control of the robot, and improves the performance and stability of the robot.

[0050] Figure 2 A flowchart of a robot control method provided by an embodiment of the present invention is provided. On the basis of the above-mentioned embodiment, the steps of using an improved particle swarm algorithm to determine the target individual target position of each particle based on the initial position, initial velocity and initial individual target position of each particle, and determining the target population target position of the population based on the target individual target positions of all particles and the initial population target position are further refined. Among them, the technical features that are the same or similar to the above-mentioned embodiments are not repeated here.

[0051] like Figure 2 As shown, the method of this embodiment specifically includes:

[0052] S210. Obtain a preset parameter range of the robot control parameters of the target robot, and set an initial position and an initial velocity of each particle in a pre-created population according to the preset parameter range, as well as an initial individual target position of each particle and an initial population target position of the population, wherein each of the particles represents a set of potential robot control parameters.

[0053] S220, taking the initial position, initial velocity and initial individual target position of each particle as the current position, current velocity and current individual target position of each particle, and taking the initial population target position of the population as the current population target position of the population.

[0054] Among them, the current position of the particle can be understood as the position of the particle at the current moment. The current speed of the particle can be understood as the speed of the particle at the current moment. The current individual target position of the particle can be understood as the individual optimal position of the particle at the current moment, or a position that meets the preset conditions. The current population target position can be understood as the optimal individual optimal position of the entire population at the current moment, or a position that meets the preset conditions.

[0055] Specifically, for each particle, the initial position of the particle can be set to the current position of the particle, the initial velocity of the particle can be set to the current velocity of the particle, and the initial individual target position of the particle can be set to the current individual target position of the particle. Based on this, the initial population target position of the population can be set to the current population target position of the population.

[0056] S230, based on the preset fitness function, the current position of each particle and the current individual target position, update the current individual target position of each particle, and update the current population target position of the population based on the current individual target positions of all particles and the current population target position.

[0057] In an embodiment of the present invention, the updating of the current individual target position of each particle based on the preset fitness function, the current position of each particle and the current individual target position may include: for each particle, the current position of the particle and the current individual target position of the particle may be respectively brought into the preset fitness function. Thus, a first fitness value of the particle at the current position and a second fitness value of the current individual target position may be obtained. When the first fitness value is less than the second fitness value, the current individual target position of the particle may be updated to the current position.

[0058] The first fitness value may be understood as the fitness value of each particle at the current position of the particle. The second fitness value may be understood as the fitness value of each particle at the current individual target position of the particle. In an embodiment of the present invention, when the first fitness value is not less than the second fitness value, the current individual target position of the particle may not need to be updated again.

[0059] In an embodiment of the present invention, updating the current population target position of the population based on the current individual target positions of all particles and the current population target position may include: obtaining a reference population target position of the population based on the current individual target positions of all particles; calculating a third fitness value of the reference population target position and a fourth fitness value of the current population target position; and when the third fitness value is less than the fourth fitness value, the reference population target position may be determined as the current population target position of the population.

[0060] Wherein, the reference population target position of the population can be calculated based on the current individual target positions of all particles. Specifically, the fitness values ​​of all particles at the current individual target positions are calculated. The minimum fitness value among all fitness values ​​is determined, and the current individual target position of the particle corresponding to the minimum fitness value is used as the reference population target position of the population. The third fitness value can be understood as the fitness value of the reference population target position. The fourth fitness value can be understood as the fitness value of the current population target position.

[0061] In the embodiment of the present invention, the calculating of the third fitness value of the reference population target position and the fourth fitness value of the current population target position may specifically include: bringing the reference population target position into a preset fitness function to obtain the fitness value of the reference population target position, i.e., the third fitness value. Also, bringing the current population target position into a preset fitness function to obtain the fitness value of the current population target position, i.e., the fourth fitness value.

[0062] It can be understood that, when the third fitness value is not less than the fourth fitness value, the reference population target position is not the target position of the current population, that is, there is no need to update the current population target position of the population.

[0063] S240. When the preset number of updates is not reached, the current speed of each particle is updated based on the improved particle swarm algorithm, and the current position of each particle is updated based on the current speed of each particle, and the current individual target position of each particle is updated based on the preset fitness function, the current position of each particle and the current individual target position, and the current population target position of the population is updated based on the current individual target positions of all particles and the current population target position.

[0064] The preset number of updates can be set according to actual needs, which is not specifically limited here, for example, 50, 100 or 500, etc. In an embodiment of the present invention, the current speed of each particle is updated based on the improved particle swarm algorithm, and the current position of each particle is updated based on the current speed of each particle, which may include: for each particle, the current speed of the particle may be updated using the improved particle swarm algorithm, and the current position of the particle is calculated based on the current speed.

[0065] Optionally, the method of updating the current velocity of the particle by using the improved particle swarm algorithm and calculating the current position of the particle based on the current velocity may specifically be as follows: the current velocity of the particle may be updated according to the following formula, and the current position of the particle may be calculated based on the current velocity:

[0066] ;

[0067] ;

[0068] ;

[0069] in, and represents the learning factor; represents the velocity of the particle; and Represents a random number between (0,1); represents the position of the particle; represents the shrinkage factor coefficient, t represents the current time, Indicates the current individual particle target position, Indicates the current population target position.

[0070] It should be noted that, in an embodiment of the present invention, based on the improved particle swarm algorithm, the movement speed of the particles is limited by setting the contraction factor coefficient to ensure that the entire particle swarm can converge to the local optimal solution, thereby finding the optimal robot control parameters more quickly within the limited range.

[0071] S250. When the preset number of updates is reached, the updated individual target position of each particle is used to determine the target individual target position of each particle, and the updated population target position is used as the target population target position of the population.

[0072] Specifically, when the preset number of updates is reached, the updated individual target position of each particle and the updated population target position of the population can be obtained. Then, the updated individual target position of each particle can be used as the target individual target position of each particle. And the updated population target position of the population can be used as the target population target position of the population.

[0073] S260: Based on the target individual target position and the target population target position, obtain robot control parameters within the parameter range, and control the target robot based on the robot control parameters.

[0074] The technical solution of the embodiment of the present invention is as follows: the initial position, initial speed and initial individual target position of each particle are used as the current position, current speed and current individual target position of each particle, and the initial population target position of the population is used as the current population target position of the population; based on the preset fitness function, the current position of each particle and the current individual target position, the current individual target position of each particle is updated, and the current population target position of the population is updated based on the current individual target positions of all particles and the current population target position; if the preset number of updates is not reached, the current speed of each particle is updated based on the improved particle swarm algorithm, and the current speed of each particle is updated based on the current speed of each particle. The method comprises the following steps: a) updating the current position of each particle and repeating the operation of updating the current individual target position of each particle based on the preset fitness function, the current position of each particle and the current individual target position, and updating the current population target position of the population based on the current individual target positions of all particles and the current population target position; and b) determining the target individual target position of each particle based on the updated individual target position of each particle when the preset number of updates is reached, and using the updated population target position as the target population target position of the population, thereby further improving the function of using the improved particle swarm algorithm to determine the target individual target position of each particle as the target population target position of the population.

[0075] Figure 3 Schematic diagram of the structure of a robot control device provided by an embodiment of the present invention. Figure 3 As shown, the device includes: a parameter initialization module 310, a target parameter determination module 320 and a robot control module 330.

[0076] Among them, the parameter initial setting module 310 is used to obtain the preset parameter range of the robot control parameters of the target robot, and according to the preset parameter range, set the initial position and initial speed of each particle in the pre-created population, as well as set the initial individual target position of each particle and the initial population target position of the population, each of which represents a set of potential robot control parameters; the target parameter determination module 320 is used to adopt an improved particle swarm algorithm to determine the target individual target position of each particle based on the initial position, initial speed and initial individual target position of each particle, and determine the target population target position of the population based on the target individual target positions of all particles and the initial population target position; the robot control module 330 is used to obtain the robot control parameters within the parameter range based on the target individual target position and the target population target position, and control the target robot based on the robot control parameters.

[0077] The technical solution of the embodiment of the present invention obtains the preset parameter range of the robot control parameters of the target robot through the parameter initial setting module, sets the initial position and initial speed of each particle in the pre-created population according to the preset parameter range, and sets the initial individual target position of each particle and the initial population target position of the population, each of which represents a set of potential robot control parameters; uses the improved particle swarm algorithm through the target parameter determination module to determine the target individual target position of each particle based on the initial position, initial speed and initial individual target position of each particle, and determines the target population target position of the population based on the target individual target position of all particles and the initial population target position; obtains the robot control parameters within the parameter range based on the target individual target position and the target population target position through the robot control module, and controls the target robot based on the robot control parameters. The technical solution of the embodiment of the present invention realizes a more convenient and effective control of the robot, and improves the performance and stability of the robot.

[0078] Optionally, the preset fitness function of the improved particle swarm algorithm is constructed based on an error integral function and an overshoot function of the control system of the target robot.

[0079] Optionally, the target parameter determination module 320 includes a current parameter setting unit, a current parameter updating unit, a first judgment unit and a second judgment unit; wherein,

[0080] a current parameter setting unit, configured to use the initial position, initial velocity and initial individual target position of each particle as the current position, current velocity and current individual target position of each particle, and use the initial population target position of the population as the current population target position of the population;

[0081] A current parameter updating unit, configured to update the current individual target position of each particle based on the preset fitness function, the current position of each particle and the current individual target position, and to update the current population target position of the population based on the current individual target positions of all particles and the current population target position;

[0082] A first judgment unit is used to update the current speed of each particle based on the improved particle swarm algorithm, and update the current position of each particle based on the current speed of each particle, and repeatedly perform the operations of updating the current individual target position of each particle based on the preset fitness function, the current position of each particle and the current individual target position, and updating the current population target position of the population based on the current individual target positions of all particles and the current population target position, if the preset update times are not reached.

[0083] The second judgment module is used to determine the target individual target position of each particle using the updated individual target position of each particle when the preset update times are reached, and use the updated population target position as the target population target position of the population.

[0084] Optionally, the current parameter updating unit is used to, for each particle, bring the current position of the particle and the current individual target position into the preset fitness function respectively, obtain a first fitness value of the particle at the current position and a second fitness value of the current individual target position, and when the first fitness value is less than the second fitness value, update the current individual target position of the particle to the current position.

[0085] Optionally, a first judgment unit is used to obtain a reference population target position of the population based on the current individual target positions of all particles; calculate a third fitness value of the reference population target position and a fourth fitness value of the current population target position; and when the third fitness value is less than the fourth fitness value, determine the reference population target position as the current population target position of the population.

[0086] Optionally, the first judgment unit is used to update the current speed of each particle by using an improved particle swarm algorithm, and calculate the current position of the particle based on the current speed.

[0087] Optionally, the first judgment unit is used to update the current speed of the particle according to the following formula, and calculate the current position of the particle based on the current speed:

[0088] ;

[0089] ;

[0090] ;

[0091] in, and represents the learning factor; represents the velocity of the particle; and Represents a random number between (0,1); represents the position of the particle; represents the shrinkage factor coefficient, t represents the current time, Indicates the current individual particle target position, Indicates the current population target position.

[0092] The robot control device provided in the embodiment of the present invention can execute the robot control method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0093] It is worth noting that the various units and modules included in the above-mentioned robot control device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present invention.

[0094] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0095] like Figure 4As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11 in communication, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the random access memory (RAM) 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the read-only memory (ROM) 12, and the random access memory (RAM) 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.

[0096] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0097] The processor 11 may be a variety of general and / or dedicated processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a robot control method.

[0098] In some embodiments, the robot control method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via a read-only memory (ROM) 12 and / or a communication unit 19. When the computer program is loaded into a random access memory (RAM) 13 and executed by the processor 11, one or more steps of the robot control method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the robot control method in any other appropriate manner (e.g., by means of firmware).

[0099] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0100] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0101] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0102] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0103] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0104] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0105] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0106] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A robot control method, characterized in that: The method comprises: Obtaining a preset parameter range of a robot control parameter of a target robot, and setting an initial position and an initial velocity of each particle in a pre-created population according to the preset parameter range, and setting an initial individual target position of each particle and an initial population target position of the population, wherein each particle represents a set of potential robot control parameters; Using an improved particle swarm algorithm, a target individual target position of each particle is determined based on the initial position, initial velocity and initial individual target position of each particle, and a target population target position of the population is determined based on the target individual target positions of all particles and the initial population target position; Based on the target individual target position and the target population target position, a robot control parameter within the parameter range is obtained, and the target robot is controlled based on the robot control parameter.

2. The robot control method according to claim 1, characterized in that: The preset fitness function of the improved particle swarm algorithm is constructed based on the error integral function and the overshoot function of the control system of the target robot.

3. The robot control method according to claim 2, characterized in that: The improved particle swarm algorithm is used to determine the target individual target position of each particle based on the initial position, initial velocity and initial individual target position of each particle, and to determine the target population target position of the population based on the target individual target positions of all particles and the initial population target position, including: Using the initial position, initial velocity and initial individual target position of each particle as the current position, current velocity and current individual target position of each particle, and using the initial population target position of the population as the current population target position of the population; Based on the preset fitness function, the current position of each particle and the current individual target position, updating the current individual target position of each particle, and updating the current population target position of the population based on the current individual target positions of all particles and the current population target position; If the preset number of updates is not reached, the current speed of each particle is updated based on the improved particle swarm algorithm, and the current position of each particle is updated based on the current speed of each particle, and the current individual target position of each particle is updated based on the preset fitness function, the current position of each particle and the current individual target position, and the current population target position of the population is updated based on the current individual target positions of all particles and the current population target position. When the preset number of updates is reached, the updated individual target position of each particle is used to determine the target individual target position of each particle, and the updated population target position is used as the target population target position of the population.

4. The robot control method according to claim 3, characterized in that: The updating of the current individual target position of each particle based on the preset fitness function, the current position of each particle and the current individual target position comprises: For each particle, the current position of the particle and the current individual target position are respectively brought into the preset fitness function to obtain a first fitness value of the particle at the current position and a second fitness value of the particle at the current individual target position; when the first fitness value is less than the second fitness value, the current individual target position of the particle is updated to the current position.

5. The robot control method according to claim 3, characterized in that: The updating of the current population target position of the population based on the current individual target positions of all particles and the current population target position comprises: Obtaining a reference population target position of the population based on current individual target positions of all particles; Calculating a third fitness value of the reference population target position and a fourth fitness value of the current population target position; In a case where the third fitness value is less than the fourth fitness value, the reference population target position is determined as the current population target position of the population.

6. The robot control method according to claim 3, characterized in that: The method of updating the current speed of each particle based on the improved particle swarm algorithm and updating the current position of each particle based on the current speed of each particle includes: For each particle, an improved particle swarm algorithm is used to update the current velocity of the particle, and the current position of the particle is calculated based on the current velocity.

7. The robot control method according to claim 6, characterized in that: The method of updating the current velocity of the particle by using the improved particle swarm algorithm and calculating the current position of the particle based on the current velocity includes: The current velocity of the particle is updated according to the following formula, and the current position of the particle is calculated based on the current velocity: ; ; ; in, and represents the learning factor; represents the velocity of the particle; and Represents a random number between (0,1); represents the position of the particle; represents the shrinkage factor coefficient, t represents the current time, Indicates the current individual particle target position, Indicates the current population target position.

8. A robot control device, characterized in that: The device comprises: a parameter initial setting module, for obtaining a preset parameter range of a robot control parameter of a target robot, and setting an initial position and an initial velocity of each particle in a pre-created population according to the preset parameter range, and setting an initial individual target position of each particle and an initial population target position of the population, each of the particles representing a set of potential robot control parameters; A target parameter determination module is used to determine the target individual target position of each particle based on the initial position, initial velocity and initial individual target position of each particle by using an improved particle swarm algorithm, and determine the target population target position of the population based on the target individual target positions of all particles and the initial population target position; The robot control module is used to obtain robot control parameters within the parameter range based on the target individual target position and the target population target position, and control the target robot based on the robot control parameters.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the robot control method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the robot control method according to any one of claims 1 to 7 when executed.

Citation Information

Patent Citations

  • Fuzzy control method for visual axis stabilizing loop of photoelectric tracer

    CN104199287A

  • Multi-machine system speed governor PID parameter optimization method and device, equipment and medium

    CN109038643A

  • Robot kinematic calibrating method selected based on optimal measurement configuration

    CN110900608A

  • Wireless charging PID controller optimization design method based on particle swarm algorithm

    CN112346345A

  • PID (Proportion Integration Differentiation) controller gain parameter design method and device, electronic equipment and medium

    CN117389133A