CN112596379B - Robot controller design method - Google Patents
Robot controller design method Download PDFInfo
- Publication number
- CN112596379B CN112596379B CN202011483935.1A CN202011483935A CN112596379B CN 112596379 B CN112596379 B CN 112596379B CN 202011483935 A CN202011483935 A CN 202011483935A CN 112596379 B CN112596379 B CN 112596379B
- Authority
- CN
- China
- Prior art keywords
- robot
- network structure
- optimal
- controller
- neural network
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B13/00—Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion
- G05B13/02—Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric
- G05B13/0265—Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric the criterion being a learning criterion
- G05B13/027—Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric the criterion being a learning criterion using neural networks only
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B13/00—Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion
- G05B13/02—Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric
- G05B13/04—Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric involving the use of models or simulators
Landscapes
- Engineering & Computer Science (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Computation (AREA)
- Health & Medical Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Automation & Control Theory (AREA)
- Feedback Control In General (AREA)
Abstract
The invention provides a robot controller design method, which is used for designing a neural network controller corresponding to a form-variable robot with variable sensor quantity so as to enable the neural network controller to control the form-variable robot to complete a task, and is characterized by comprising the following steps: step S1, the form-variable robot acquires the received value through a preset number of sensors; and step S2, inputting the received value into a preset optimal neural network controller and outputting the value as the motor rotating speed of the shape-variable robot so as to control the shape-variable robot to complete the task. Wherein, the optimal neural network controller is obtained by a preset coding method. The encoding method comprises the following steps: and numbering all sensors, and then sequentially evolving the network structures of the neural network controllers in different forms according to the sensor numbers by using an evolution algorithm to obtain the optimal neural network controller.
Description
Technical Field
The invention relates to the technical field of self-adaptive control systems, in particular to a design method of a robot controller.
Background
The design of a robot controller is one of the core problems in the field of robots, which need to sense the surrounding environment in order to produce reasonable actions. The existing controller design is carried out under the condition of fixed form, the reasonable action of the robot is generated not only depending on the controller but also depending on the form of the robot, and the applicable form in different environments is different, for example, the applicable form of the modular robot is different when different tasks are completed.
The traditional robot controller design is carried out under the condition that the robot shape is fixed, so that the robot controller is limited to a specific shape, and meanwhile, the optimization space is influenced. Ideally, the form of the robot can change with the change of the environment, and the robot can adapt to the environment continuously. This requires that the form change of the robot is also taken into account in the process of designing the controller, so that the controller has the form adaptive capability, and is not only designed for a fixed structure.
Existing form-changeable robot designs focus on modular robots[1]The method does not extend to other common robot forms, and a corresponding control method for the form-variable robot is lacked.
Reference to the literature
[1]Weel B,D'Angelo M,Haasdijk E,et al.Online gait learning for modular robots with ar-bitrary shapes and sizes[J].Artificial life,2017,23(1):80-104.
Disclosure of Invention
In order to solve the problems, the invention provides a controller design method which uses an evolutionary algorithm to enable a neural network controller in a robot to learn different forms gradually so as to consider the form change of the robot, and the invention adopts the following technical scheme:
the invention provides a robot controller design method, which is used for designing a neural network controller corresponding to a form-variable robot with variable sensor quantity so as to enable the neural network controller to control the form-variable robot to complete a task, and is characterized by comprising the following steps: step S1, the form-variable robot acquires the received value through a preset number of sensors; step S2, inputting the received value into a preset optimal neural network controller and using the output as the motor rotating speed of the form-variable robot so as to control the form-variable robot to complete the task, wherein the optimal neural network controller is obtained through preset direct coding, and the direct coding comprises the following steps: step T1, numbering all sensors in the form-variable robot to obtain sensor numbers; step T2, making one sensor pause according to the sensor number, and setting the rest sensors as working sensors; step T3, constructing a neural network controller according to the working sensor; step T4, optimizing the initial network structure of the neural network controller by using a predetermined first evolutionary algorithm until reaching a predetermined evolutionary algebra, and storing the initial network structure obtained by the last generation as an evolutionary network structure; step T5, judging whether the sensor number is the maximum value, if not, taking the evolved network structure as a new initial network structure, and repeating the steps T2 to T5 to carry out evolution; step T6, when the judgment in the step T5 is yes, a new neural network controller is built according to all the sensors, and the evolved network structure is used as the network structure of the new neural network controller; step T7, optimizing the network structure by using a first evolutionary algorithm until reaching an evolutionary algebra, and finding out an optimal network structure from a plurality of network structures generated in the evolutionary process as an optimal network structure; and step T8, determining the corresponding neural network controller according to the optimal network structure, and outputting the neural network controller as the optimal neural network controller.
The robot controller design method provided by the invention can also have the technical characteristics that the first evolutionary algorithm is any one of a neural evolutionary algorithm or an EA algorithm cluster.
The method for designing the robot controller provided by the invention can also have the technical characteristics that the neural evolution algorithm is NEAT.
The invention provides a robot controller design method, which is used for designing a neural network controller corresponding to a form-variable robot with variable sensor quantity so as to enable the neural network controller to control the form-variable robot to complete a task, and is characterized by comprising the following steps: step S1, the form-variable robot acquires the received value through a preset number of sensors; step S2, inputting the received value into a preset optimal neural network controller and using the output as the motor rotating speed of the form-variable robot so as to control the form-variable robot to complete the task, wherein the optimal neural network controller is obtained through preset indirect coding, and the indirect coding comprises the following steps: step E1, numbering all sensors in the form-variable robot to obtain sensor numbers; step E2, making one sensor pause according to the sensor number, setting the rest sensors as working sensors, and recording the positions of the working sensors in the form-variable robot as the positions of the working sensors; step E3, using the position of the working sensor and the position of the motor in the form-variable robot as the base; step E4, constructing CPPN according to the substrate; step E5, utilizing a predetermined second evolution algorithm to evolve the initial network structure in the CPPN until reaching a predetermined evolution algebra, and storing a plurality of initial network structures obtained from the last generation as an evolved network structure; step E6, judging whether the sensor number is the maximum value, if not, taking the evolved network structure as a new initial network structure, and repeating the steps E2 to E6 to carry out evolution; step E7, when the judgment in the step E6 is yes, a new CPPN is constructed according to the substrates corresponding to the positions of all the working sensors, and the evolved network structure is used as the network structure of the new CPPN; e8, optimizing the network structure by using a second evolutionary algorithm until an evolutionary algebra is reached, and finding out an optimal network structure as the optimal network structure in the process; step E9, determining the network structure of the CPPN according to the optimal network structure, and outputting the network structure as the optimal CPPN; and E10, inputting the substrate corresponding to the shape-variable robot in the using state into the optimal CPPN to generate the optimal neural network controller.
The robot controller design method provided by the invention can also have the technical characteristics that the second evolutionary algorithm is HyperNEAT.
Action and Effect of the invention
According to the robot controller design method, one sensor is made to stop working according to the sensor number, the initial network structure of the neural network controller is optimized by using an evolution algorithm until a preset evolution algebra is reached, and the initial network structure obtained by the last generation is used as the evolution network structure to be stored, so that the evolution network structure comprises the form information of the robot missing the sensor. And because the corresponding robot form is evolved by using an evolution algorithm when each sensor stops working until a preset evolution algebra is reached and the robot form is evolved on the evolution network structure output by the last form, the finally obtained evolution network structure also has all form information of the form-variable robot except the normal form. In addition, because a new neural network controller is constructed according to all the sensors, the evolved network structure is used as the network structure of the new neural network controller, the network structure is optimized by using an evolutionary algorithm until the evolution algebra is reached, the optimal network structure is found out from a plurality of network structures generated in the evolutionary process and is used as the optimal network structure, and further, the corresponding neural network controller is determined according to the optimal network structure and is output as the optimal neural network controller, the finally obtained optimal neural network controller has all the forms, and is good in robustness and strong in self-adaptive form change capability.
The robot controller design method can enable the robot with the variable form to have higher self-adaptive capacity, and has larger optimization space and stronger practicability compared with the controller designed under the situation that the robot is fixed in form.
Drawings
FIG. 1 is a flow chart of direct encoding according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a neural network crossing process according to an embodiment of the present invention;
FIG. 3 is an exemplary diagram of the state of neurons after neural network crossing according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an indirect encoding workflow according to an embodiment of the present invention;
FIG. 5 is a flow chart of indirect encoding according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a configuration-changeable robot according to an embodiment of the present invention;
FIG. 7 is a schematic illustration of the evolution process in a comparative experiment of an embodiment of the present invention;
FIG. 8 is a diagram illustrating a task process of a configuration-changeable robot according to an embodiment of the present invention;
FIG. 9 is a graph comparing experimental results of examples of the present invention; and
fig. 10 is a schematic diagram of a robot position based on a fitness value according to an embodiment of the invention.
Detailed Description
In order to make the technical means, the creation features, the achievement purposes and the effects of the invention easy to understand, the design method of the robot controller of the invention is specifically described below with reference to the embodiments and the accompanying drawings.
< example one >
The Controller in the embodiment of the invention is a neural network Controller (ANN-Controller) which has the task of moving to a target point, and the neural network Controller predicts the rotating speed of the final output motor according to the received value of the sensor so as to control the robot to move to the target point. The method specifically comprises the following steps:
in step S1, the variable geometry robot acquires the received values from a predetermined number of sensors.
The form-variable robot is a robot with the number of sensors changing according to a set rule, and the form-variable robot is assumed to have n sensors in total, and the number of the sensors actually working at each time is n-1, and at the moment, the form-variable robot can still control the robot to move to a target point according to receiving values received by the n-1 sensors.
In this embodiment, the predetermined number is a value smaller than the total number of sensors in the configuration-variable robot, and specifically, the predetermined number is equal to the total number of sensors — 1.
And step S2, inputting the received value into a preset optimal neural network controller and outputting the value as the motor rotating speed of the shape-variable robot so as to control the shape-variable robot to complete the task.
Wherein, the optimal neural network controller is obtained by preset direct coding.
FIG. 1 is a flow chart of direct encoding according to an embodiment of the present invention.
As shown in fig. 1, the direct encoding includes the steps of:
and step T1, numbering all the sensors in the form-variable robot to obtain sensor numbers, and then entering step T2.
In step T2, one sensor is suspended according to the sensor number and the remaining sensors are set as active sensors, and the process proceeds to step T3.
When one sensor in the variable-form robot does not work, the form of the robot is another form compared with the state that all the sensors work, and when different sensors are in the non-working state, the robot corresponds to one form.
Specifically, one sensor is made to pause one by one according to the sequence of the sensor numbers from small to large, so that different forms of the form-variable robot are formed.
And step T3, constructing the neural network controller according to the working sensors, and then entering step T4.
And T4, optimizing the initial network structure of the neural network controller by using a predetermined first evolutionary algorithm until a predetermined evolutionary algebra is reached, and storing a plurality of initial network structures obtained from the last generation as the evolutionary network structures.
Wherein, the first evolutionary algorithm may be any one of neural evolutionary algorithm or EA algorithm cluster, such as NEAT algorithm[1]The ant colony algorithm and the bee colony algorithm in the EA algorithm cluster.
In this embodiment, the neural evolution algorithm is a NEAT algorithm, and the evolution algebra is 100.
The NEAT algorithm (neural evolution of growing strategies) is a popular neural evolution method, and makes the neural network gradually become complex from the minimum structure, and meanwhile, the crossing operation can be performed on the neural networks with different structures.
FIG. 2 is a schematic diagram of a neural network crossing process according to an embodiment of the present invention; and
FIG. 3 is an exemplary diagram of the state of the neurons after neural network crossing according to an embodiment of the present invention.
As shown in fig. 2 and 3, parent 1 and parent 2 are crossed to generate "child". The circles in fig. 2 represent neurons, the numbers around the circles represent the numbers of the neurons in "parent 1", "parent 2", and "offspring", two neurons are connected by a directional line segment, the connection number of the directional line segment is represented by num, the connection number is unique in NEAT, and the start point and the end point of the directional line segment are represented by pos, for example: pos between the neuron number 1 and the neuron number 4 in fig. 2 and "parent 1" in fig. 3 can be expressed as pos 1,4, and num 1. If the identification of pos is del (as shown in FIG. 3), it indicates that the corresponding connection has been deleted. The interleaving operation is specifically explained with reference to fig. 2 and 3:
(1) when a connection of "parent 1" and "parent 2" in fig. 2 is present, the child retains the connection, for example, the connection numbered 1 in fig. 3.
(2) A linkage in both "parent 1" and "parent 2" may not be present due to a variation in the number of linkages, etc., in which case the linkage will not be present in the progeny, such as the linkage numbered 2 in fig. 3.
(3) When a connection exists only in "parent 1" or "parent 2", the child retains the connection, such as the connection numbered 8 in fig. 3.
(4) When the structures linked in "parent 1" and "parent 2" are different, the progeny will retain more complex structures. For example, the junction numbered 5 in FIG. 3, in "parent 1", it connects the neuron numbered 5 and the neuron numbered 4; the reason why the connection No. 5 was replaced with the connection No. 6 and the connection No. 7 was analyzed as an addition of one neuron No. 6 between the neuron No. 5 and the neuron No. 4. Since the structure of "parent 2" is more complex, the progeny will retain the structure of "parent 2".
And step T5, judging whether the sensor number is the maximum value, taking the evolved network structure as a new initial network structure if the sensor number is not the maximum value, repeating the steps T2 to T5 to carry out evolution, and entering the step T6 if the sensor number is judged to be the maximum value.
Specifically, when the sensor with the sensor number of 1 stops working, the initial network structure of the ANN-Controller in the form is evolved by using a near algorithm to obtain a population, and when the population is evolved to 100 generations, a plurality of evolved network structures of the 100 th generation are stored as evolved network structures (namely individuals), and the population is composed of the individuals.
And step T6, constructing a new neural network controller according to all the sensors, taking the evolved network structure as the network structure of the new neural network controller, and then entering step T7.
And T7, optimizing the network structure by using a first evolutionary algorithm until an evolutionary algebra is reached, finding out an optimal network structure from a plurality of network structures generated in the evolutionary process as the optimal network structure, and then entering T8.
And step T8, determining the corresponding neural network controller according to the optimal network structure, outputting the neural network controller as the optimal neural network controller, and entering an end state.
< example two >
In the first embodiment, the direct coding already takes the form change of the robot into account and enables the neural network controller to have the form adaptive capability, however, in the second embodiment, in order to obtain higher adaptive capability, the network structure of the neural network controller is evolved in an indirect coding manner so as to obtain a better optimal neural network controller.
For convenience of expression, the same description as in the first embodiment is omitted in the second embodiment.
Fig. 4 is a schematic diagram of an indirect encoding workflow according to an embodiment of the present invention.
As shown in fig. 4, the base input CPPN is given a corresponding weight and offset, which are directly used as the weight and offset of the ANN-Controller,
when the network structure of the ANN-Controller is evolved by using the indirect coding, the genotypes and the phenotypes of the robots are not in one-to-one correspondence, so that the robot Controller and the robots can be dynamically decoupled by carrying out the indirect coding on the ANN-Controller, and the two robots do not need to be in one-to-one correspondence. When indirect coding is used, the genotype is not ANN-Controller, but rather the self-information of the complex pattern generation network (CPPN for short). The CPPN functions like a function, and records the mapping relationship between the robot shape and the ANN-Controller, so as to generate the corresponding ANN-Controller according to different shape information of the robot, that is, in fig. 4, the base input CPPN obtains the corresponding weight and offset, and the weight and offset are directly used as the weight and offset of the ANN-Controller, so as to complete the generation of the ANN-Controller, and this generation process can be regarded as one-time coding.
As shown in fig. 4, the substrate includes the positions of the various sensors in the robot, the hidden layer neuron positions, and the motor positions.
When the CPPN generates the ANN-Controller based on the substrate, the sensor receiving value is input into the ANN-Controller to obtain the predicted motor rotating speed so as to control the robot to complete the task (as shown in FIG. 4).
And HyperNEAT is an algorithm specifically optimizing CPPN. The genotype in HyperNEAT comprises four parts: the number of neurons, the connections between neurons, the weights, and the activation functions of neurons. The activation function is variable in the optimization of CPPN, a property that makes CPPN good at finding patterns in neural networks. For example, a neural network may have various modes such as convolution, repetition and symmetry, the discovery of convolution enables deep learning to be successful, theoretically, any mode can be discovered through the neural network obtained by HyperNEAT evolution, and rules which cannot be obtained by a conventional neural network learning algorithm can be learned. For the aforementioned module robot and the running task of the robot in the simulation environment, the generation of the ANN-Controller for the robot with a fixed form through HyperNEAT has a good effect.
FIG. 5 is a flowchart of indirect encoding according to an embodiment of the present invention.
As shown in fig. 5, the indirect encoding includes the following steps:
and E1, numbering all the sensors in the form-variable robot to obtain sensor numbers.
Step E2 is to suspend the operation of one sensor according to the sensor number, set the remaining sensors as operation sensors, and record the position of the operation sensor in the configuration-variable robot as the operation sensor position.
Step E3, the position of the operation sensor and the position of the motor in the configuration-variable robot are used as the basis.
And E4, constructing the CPPN according to the substrate.
And E5, evolving the initial network structures in the CPPN by using a second evolutionary algorithm until a preset evolutionary algebra is reached, and storing a plurality of initial network structures obtained by the last generation as evolved network structures.
Wherein, the second evolutionary algorithm is HyperNEAT.
And E6, judging whether the sensor number is the maximum value, if not, taking the evolved network structure as a new initial network structure, repeating the steps E2 to E6 for evolution, and if so, entering the step E7.
And E7, when the judgment in the step E6 is yes, constructing a new CPPN according to the substrates corresponding to the positions of all the working sensors, and taking the evolved network structure as the network structure of the new CPPN.
And E8, optimizing the network structure by using a second evolutionary algorithm until an evolutionary algebra is reached, and finding out the optimal network structure as the optimal network structure in the process.
And E9, determining the network structure of the CPPN according to the optimal network structure, and outputting the network structure as the optimal CPPN.
And E10, inputting the substrate corresponding to the shape-variable robot in the using state into the optimal CPPN to generate the optimal neural network controller.
In order to verify the effect of the optimal neural network controller obtained by the direct coding in the first embodiment and the indirect coding in the second embodiment of the present invention, the experiment was performed, wherein the form-variable robot in the experimental part (as shown in fig. 6) includes 4 distance sensors and two motors (i.e., wheels), and the 4 distance sensors are respectively a number 1 left sensor, a number 2 right sensor, a number 3 front sensor, and a number 4 rear sensor.
FIG. 7 is a schematic diagram of the evolution process in a comparative experiment of an embodiment of the present invention.
As shown in fig. 7, in the present evolution process, only the robot shape corresponding to the missing sensor No. 1, the robot shape corresponding to the missing sensor No. 2, and the robot shape corresponding to all the sensors working normally are selected, and the specific evolution process is as follows:
And step 2, when the evolution generation is 101-200, the Robot with the variable form is a Robot without the sensor on the Right side of No. 2 (namely No-Right-Robot). In the direct encoding, the original 5 Inputs (left sensor input, front sensor input, right sensor input, back sensor input, bias) of the ANN-Controller become (left sensor input,0.0, front sensor input, right sensor input, back sensor input, bias), the 3 rd "Inputs" are set to "0.0" in the 101 th to 200 th generations of fig. 7, and the ANN-Controller, the 100 th generations, and finally the 200 th generation population are reserved on the basis of the 100 th generation population directly encoded in step 1 by EA and NEAT; in indirect coding, the base of the shape-variable Robot changes due to the absence of the Right sensor No. 2 (as in fig. 7, the 101 th to 200 th generations partially use non-solid circles to represent the absence of the Right sensor No. 2), that is, No-Right-Robot corresponds to the base of the Right sensor No. 2 absent, and uses the base as the input of CPPN, then uses HyperNEAT to evolve the CPPN on the basis of the 100 th generation population obtained by indirect coding in step 1, evolves 100 generations, and finally reserves the 200 th generation population.
And step 3, when the evolution generation is 201 st generation and 300 th generation, the shape-variable Robot is a Normal Robot (i.e. Normal-Robot). In the direct encoding, 5 inputs of the ANN-Controller are all in a normal state, namely, (left sensor input, front sensor input, right sensor input, back sensor input, bias), and the ANN-Controller is evolved and evolved for 100 generations respectively by using EA and NEAT on the basis of the 200 th generation population obtained by the direct encoding in the step 2, and the optimal individual is found out in the evolution process to be used as the optimal ANN-Controller output. In the indirect coding, the base of the Normal-Robot is the base when all sensors normally work, the base is used as the input of the CPPN, then the CPPN is evolved on the basis of the 200 th generation population obtained by the indirect coding in the step 2 by using hyper, the generation is evolved for 100, the optimal individual is found out in the evolution process to be the optimal CPPN, and the optimal ANN-Controller can be generated by the optimal CPPN and the base of the variable-form Robot.
In the above evolution process, when EA is used for evolution, each calculation parameter is: the population size was set to 50, the evolution generation number was set to 100, the crossover probability was set to 0.7, the tournament size for tournament selection was set to 4, and the weight variation probability was set to 0.9.
When utilizing NEAT evolution, the various calculation parameters are: the population size was set to 50, the evolution algebra was set to 200, the crossover probability was set to 0.7, the race scale for championship selection was set to 4, the weight variation probability was set to 0.9, the probability of increasing neuron connections was set to 0.08, the probability of deleting neuron connections was set to 0.02, and the neuron number variation probability was set to 0.01.
When HyperNEAT evolution is used, the various calculation parameters are: the population size is set to 50, the evolution algebra is set to 200, the cross probability is set to 0.7, the competition scale of championship selection is set to 4, the weight variation probability is set to 0.9, the probability of increasing neuron connection is set to 0.08, the probability of deleting neuron connection is set to 0.02, the neuron number variation probability is set to 0.01, the activation function type variation probability is set to 0.03, and the selectable types of activation functions are Thanh, signedStep, signedGauss, signedSine, Linear.
Fig. 8 is a schematic diagram of a task process of a configuration-changeable robot according to an embodiment of the present invention.
As shown in fig. 8, the ANN-Controller and CPPN obtained in the above evolution process are applied to the task of moving to the target point in this embodiment, where the black solid circle is the initial position of the shape-variable robot, the white hollow circle is the target point position, the black straight line is an obstacle (such as a wall), and the black dotted line is a representative robot moving path.
For the task of moving to the target point, the effect of the form-variable robot to complete the task is evaluated through the fitness value f:
in the formula, length is the length of diagonal line of field and xtargetAnd ytargetIs the abscissa and ordinate, x, of the target pointendAnd yendThe abscissa and ordinate of the dwell point are shown.The distance between the stopping point and the target point at the end of the simulation time of the robot is smaller, the smaller the distance is, the better the performance of the Controller is, and correspondingly, the larger the adaptability value f is, the better the performance of the ANN-Controller is.
FIG. 9 is a graph comparing the results of experiments conducted in the examples of the present invention.
As shown in fig. 9, the direct encoding is divided into an optimal ANN-Controller based on EA evolution and an optimal ANN-Controller based on NEAT evolution.
The optimal ANN-Controller obtained based on EA evolution in the evolution process is applied to the No-Left-Robot lacking the No. 1 Left sensor, the No-Right-Robot lacking the No. 2 Right sensor and the Normal-Robot respectively.
The optimal ANN-Controller obtained based on NEAT evolution in the evolution process is applied to the No-Left-Robot lacking the No. 1 Left sensor, the No-Right-Robot lacking the No. 2 Right sensor and the Normal-Robot respectively.
And the indirect coding is the optimal CPPN obtained based on HyperNEAT evolution, and the bases in three states of No-Left-Robot lacking the No. 1 Left sensor, No-Right-Robot lacking the No. 2 Right sensor and Normal-Robot are used as the input of the optimal CPPN, so that the corresponding optimal ANN-Controller is obtained.
The fitness value and the fall width shown in fig. 9 are calculated for robots of different encoding systems and different forms. It can be seen from FIG. 9 that the fitness value f is 0.637 when the indirect coding HyperNEAT is applied to the No-Left-Robot and 0.625 when applied to the No-Right-Robot.
In addition, when the optimal ANN-Controller obtained by the indirect coding mode is applied to the robot with the sensor missing, the performance reduction range is smaller than that of the direct coding.
In summary, the optimal ANN-Controller obtained by the indirect coding method has better adaptive morphology capability, while the optimal ANN-Controller obtained by the direct coding method is limited to a specific morphology and is only applicable to a single morphology. Therefore, when the robot shape changes (for example, a certain sensor stops working), the optimal ANN-Controller performance obtained by the direct coding method is greatly reduced, and the robustness is poor.
Fig. 10 is a schematic diagram of a robot position based on a fitness value according to an embodiment of the invention.
Taking the application of indirect coding to the No-Right-Robot as an example, in fig. 10, the black solid circle is the initial position of the Robot with variable form, the white hollow circle is the target point position, the black solid curve is the staying point of the Robot when the fitness value f is 0.625, the black solid straight line is the obstacle, and the other black curved dotted lines are the staying points corresponding to the Robot under different fitness values f.
From the above, even if the fitness value is low, the robot adopting indirect coding has a strong tendency of moving towards the target point, and in addition, the final stopping point of the robot is closer to the target point, so that the ANN-Controller embodies strong form self-adaptive capacity; the difference between the final stopping point and the initial point of the robot using the direct coding is not large, and the performance of the ANN-Controller is seriously degraded.
Examples effects and effects
According to the robot controller design method provided by the embodiment, since one sensor is made to pause according to the sensor number, the initial network structure of the neural network controller is optimized by using the evolution algorithm until a preset evolution algebra is reached, and the initial network structure obtained by the last generation is stored as the evolved network structure, the evolved network structure comprises the form information of the robot missing the sensor. And because the corresponding robot form is evolved by using an evolution algorithm when each sensor stops working until a preset evolution algebra is reached and the robot form is evolved on the evolution network structure output by the last form, the finally obtained evolution network structure also has all form information of the form-variable robot except the normal form. In addition, because a new neural network controller is constructed according to all the sensors, the evolved network structure is used as the network structure of the new neural network controller, the network structure is optimized by using an evolutionary algorithm until the evolution algebra is reached, the optimal network structure is found out from a plurality of network structures generated in the evolutionary process and is used as the optimal network structure, and further, the corresponding neural network controller is determined according to the optimal network structure and is output as the optimal neural network controller, the finally obtained optimal neural network controller has all the forms, and is good in robustness and strong in self-adaptive form change capability.
In addition, according to the robot controller design method provided by this embodiment, since CPPN is constructed according to the substrate, and then CPPN in different states is evolved by using the HyperNEAT algorithm to obtain the optimal CPPN, and finally the working sensor positions corresponding to each working sensor in the robot with a variable form in an actual use state are input to the optimal CPPN to generate the optimal neural network controller, the optimal neural network controller obtained finally is in a decoupled state from the robot form, and thus has better robustness and stronger self-adaptive form change capability.
The above-described embodiments are merely illustrative of specific embodiments of the present invention, and the present invention is not limited to the description of the above-described embodiments.
In the embodiment, the experimental part only evolves the robot shape corresponding to the missing of the left sensor No. 1, the robot shape corresponding to the missing of the right sensor No. 2, and the robot shape corresponding to the normal operation of all the sensors, but in another aspect of the present invention, the robot shape corresponding to the missing of the left sensor No. 1, the robot shape corresponding to the missing of the right sensor No. 2, the robot shape corresponding to the missing of the front sensor No. 3, the robot shape corresponding to the missing of the rear sensor No. 4, and the robot shape corresponding to the normal operation of all the sensors may evolve. The evolution may also be performed for a neural network controller of a configuration-variable robot in which the number of sensors is not limited to 5.
In an embodiment, the task is to move to the target point, and in another embodiment of the present invention, the variable form robot may be controlled to perform other tasks than moving to the target point, such as transporting an article.
Claims (3)
1. A robot controller design method is used for designing a neural network controller corresponding to a form-variable robot with variable sensor quantity, and is characterized by comprising the following steps:
step S1, the form-changeable robot acquiring a reception value by a predetermined number of the sensors;
step S2, inputting the received value into a preset optimal neural network controller and outputting the value as the motor rotating speed of the shape-variable robot so as to control the shape-variable robot to complete the task,
wherein the optimal neural network controller is obtained by a predetermined direct coding,
the direct encoding includes the steps of:
step T1, numbering all the sensors in the form-variable robot to obtain sensor numbers;
a step T2 of suspending operation of one of the sensors in accordance with the sensor number and setting the remaining sensors as operating sensors;
step T3, constructing the neural network controller according to the working sensor;
step T4, optimizing the initial network structure of the neural network controller by using a predetermined neural evolution algorithm until reaching a predetermined evolution algebra, and storing the initial network structure obtained by the last generation as an evolution network structure;
step T5, judging whether the sensor number is the maximum value, if not, taking the evolved network structure as a new initial network structure, and repeating the steps T2 to T5 to carry out evolution;
a step T6 of constructing a new neural network controller according to all the sensors and using the evolved network structure as the network structure of the new neural network controller when the judgment of the step T5 is yes;
step T7, optimizing the network structure by using the neural evolution algorithm until the evolutionary algebra is reached, and finding out the optimal network structure from a plurality of network structures generated in the evolutionary process as the optimal network structure;
and T8, determining the corresponding neural network controller according to the optimal network structure, and outputting the neural network controller as the optimal neural network controller.
2. The robot controller designing method according to claim 1, characterized in that:
wherein, the neural evolution algorithm is any one of NEAT algorithm, ant colony algorithm and bee colony algorithm.
3. A robot controller design method is used for designing a neural network controller corresponding to a form-variable robot with variable sensor quantity, and is characterized by comprising the following steps:
step S1, the form-changeable robot acquiring a reception value by a predetermined number of the sensors;
step S2, inputting the received value into a preset optimal neural network controller and outputting the value as the motor rotating speed of the shape-variable robot so as to control the shape-variable robot to complete the task,
wherein the optimal neural network controller is obtained through predetermined indirect encoding,
the indirect encoding comprises the following steps:
step E1, numbering all the sensors in the form-variable robot to obtain sensor numbers;
step E2 of suspending operation of one of the sensors according to the sensor number, setting the remaining sensors as operation sensors, and recording the positions of the operation sensors in the robot as operation sensor positions;
a step E3 of using the position of the operation sensor and the position of the motor in the robot as a base;
step E4, constructing a composite mode generation network according to the substrate;
step E5, utilizing a HyperNEAT algorithm to evolve the initial network structure in the composite mode generation network until reaching a preset evolution algebra, and storing a plurality of initial network structures obtained from the last generation as an evolved network structure;
step E6, judging whether the sensor number is the maximum value, if not, taking the evolved network structure as a new initial network structure, and repeating the steps E2 to E6 to carry out evolution;
step E7, when the judgment in the step E6 is yes, constructing a new compound pattern generation network according to the substrates corresponding to the positions of all the working sensors, and taking the evolved network structure as the network structure of the new compound pattern generation network;
step E8, the HyperNEAT algorithm is used for optimizing the network structure until the evolutionary algebra is reached, and an optimal network structure is found out in the process as an optimal network structure;
step E9, determining the network structure of the compound mode generation network according to the optimal network structure, and generating the network output as the optimal compound mode;
and E10, inputting the substrate corresponding to the shape-variable robot in the use state into the optimal composite mode generation network to generate the optimal neural network controller.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011483935.1A CN112596379B (en) | 2020-12-16 | 2020-12-16 | Robot controller design method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011483935.1A CN112596379B (en) | 2020-12-16 | 2020-12-16 | Robot controller design method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112596379A CN112596379A (en) | 2021-04-02 |
CN112596379B true CN112596379B (en) | 2022-02-22 |
Family
ID=75196087
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011483935.1A Active CN112596379B (en) | 2020-12-16 | 2020-12-16 | Robot controller design method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112596379B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114879494A (en) * | 2022-04-25 | 2022-08-09 | 复旦大学 | Robot self-adaptive design method based on evolution and learning |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112060082A (en) * | 2020-08-19 | 2020-12-11 | 大连理工大学 | Online stable control humanoid robot based on bionic reinforcement learning type cerebellum model |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5493631A (en) * | 1993-11-17 | 1996-02-20 | Northrop Grumman Corporation | Stabilized adaptive neural network based control system |
EP1901212A3 (en) * | 2006-09-11 | 2010-12-08 | Eörs Szathmáry | Evolutionary neural network and method of generating an evolutionary neural network |
US9630318B2 (en) * | 2014-10-02 | 2017-04-25 | Brain Corporation | Feature detection apparatus and methods for training of robotic navigation |
CN111757822B (en) * | 2018-02-26 | 2024-04-02 | 联邦快递服务公司 | Systems and methods for enhanced collision avoidance on logistical ground support devices using multisensor detection fusion |
CN111965976B (en) * | 2020-08-06 | 2021-04-23 | 北京科技大学 | Robot joint sliding mode control method and system based on neural network observer |
-
2020
- 2020-12-16 CN CN202011483935.1A patent/CN112596379B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112060082A (en) * | 2020-08-19 | 2020-12-11 | 大连理工大学 | Online stable control humanoid robot based on bionic reinforcement learning type cerebellum model |
Non-Patent Citations (6)
Title |
---|
Exploiting inherent regularity in control of multilegged robot locomotion by evolving neural fields;Benjamin Inden 等;《2011 Third World Congress on Nature and Biologically Inspired Computing》;20111231;第401-408页 * |
Intelligent position/force control for uncertain robot using neural network compensation;Hong-Rui Wang 等;《2005 International Conference on Machine Learning and Cybernetics》;20051231;第2卷;第1175-1179页 * |
一种基于NEAT的智能体路径规划方法;吴雷 等;《计算机与数字工程》;20180720;第46卷(第07期);第1320-1326页 * |
基于NEAT的多机器人协调围捕问题研究;赵金;《中国硕士学位论文全文数据库 信息科技专辑》;20130731(第7期);第1-52页 * |
进化神经网络的编码方法与应用;赵吉昌 等;《软件》;20160515;第37卷(第05期);第77-80页 * |
递归神经网络的进化机器人路径规划方法;宋勇 等;《哈尔滨工程大学学报》;20090815;第30卷(第08期);第898-902页 * |
Also Published As
Publication number | Publication date |
---|---|
CN112596379A (en) | 2021-04-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Stanley et al. | Evolving neural networks through augmenting topologies | |
Stanley et al. | Efficient reinforcement learning through evolving neural network topologies | |
Leng et al. | Design for self-organizing fuzzy neural networks based on genetic algorithms | |
Higashi et al. | Particle swarm optimization with Gaussian mutation | |
Abraham | Adaptation of fuzzy inference system using neural learning | |
Abraham | Intelligent systems: Architectures and perspectives | |
CN112801281A (en) | Countermeasure generation network construction method based on quantization generation model and neural network | |
CN112596379B (en) | Robot controller design method | |
Khan et al. | Evolution of Optimal ANNs for Non-Linear Control Problems using Cartesian Genetic Programming. | |
CN113917925B (en) | Mobile robot path planning method based on improved genetic algorithm | |
CN111832725A (en) | Multi-robot multi-task allocation method and device based on improved genetic algorithm | |
CN113687654A (en) | Neural network training method and path planning method based on evolutionary algorithm | |
CN102063640B (en) | Robot behavior learning model based on utility differential network | |
CN117521491A (en) | Permanent magnet motor multi-parameter identification method based on holographic improved sparrow algorithm | |
Downing | Adaptive genetic programs via reinforcement learning | |
CN113141272B (en) | Network security situation analysis method based on iteration optimization RBF neural network | |
Grosan et al. | Hybrid intelligent systems | |
Showalter et al. | Lamarckian inheritance in neuromodulated multiobjective evolutionary neurocontrollers | |
Farahmand et al. | Interaction of culture-based learning and cooperative co-evolution and its application to automatic behavior-based system design | |
Chipperfield et al. | Evolutionary algorithms for control engineering | |
CN114879494A (en) | Robot self-adaptive design method based on evolution and learning | |
Cheng-jun et al. | Double inverted pendulum system control strategy based on fuzzy genetic algorithm | |
Showalter et al. | Objective comparison and selection in mono-and multi-objective evolutionary neurocontrollers | |
Plagianakos et al. | Training multilayer networks with discrete activation functions | |
Goschin et al. | Combine and compare evolutionary robotics and reinforcement learning as methods of designing autonomous robots |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |