Next Article in Journal
Simulation of the Process of Injection of Liquid Sulfur Dioxide into a Porous Reservoir Initially Saturated with Methane and Ice
Previous Article in Journal
A Review of Representative Points of Statistical Distributions and Their Applications
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Design Approach for Evolutionary Techniques Using Genetic Algorithms: Application for a Biped Robot to Learn to Walk and Rise after a Fall

Faculty of Electronics, Telecommunications and Information Technologies, Politehnica University Timisoara, Vasile Parvan Av., No. 2, 300223 Timisoara, Romania
Mathematics 2023, 11(13), 2931; https://doi.org/10.3390/math11132931
Submission received: 20 May 2023 / Revised: 21 June 2023 / Accepted: 28 June 2023 / Published: 29 June 2023
(This article belongs to the Section Engineering Mathematics)

Abstract

:
In this research, a biped robot is programmed to learn to walk using genetic algorithms. The biped robot has the ability to rise after a fall. The system is made according to human genetics, where a child tries to learn to walk, takes a few steps, falls, and then stands up somehow after a fall. After this process, the system restarts and tries to walk again. The biped robot evolves after each generation, and after each generation it will have a more natural walking posture. The system is unpredictable, because the biped robot sometimes evolves faster and sometimes evolves slower, like in human genetics where some children are faster and other children are slower to walk. The biped robot is considered to have evolved enough after having a walking posture similar to that of a human and does not fall.

1. Introduction

Biped robots have been the subject of broad exploration. [1] noticed that huge headway has been made toward the advancement of robots that can walk, run, and perform other trained assignments. According to [2], the construction of a stable walking stride for biped robots remains a significant challenge. The complexity and nonlinearity of the system make it difficult to find a solution using conventional approaches [3]. Numerous systems, including robots, have seen improvements brought about by genetic algorithms [4]. In this paper, a method to improve the gait of a biped robot is described using evolutionary algorithms [5].
According to [6], robotic bipedal movement is a challenging endeavor that requires precise control and adaptation to maintain mobility and stability. According to [7], durable and nimble biped robots must learn to stand up after falling. Genetic algorithms (GAs) provide a potential solution to these issues by optimizing control systems according to ideas of natural selection [8]. According to [9], the purpose of this research is to investigate the application of genetic algorithms to the locomotion of biped robots with a focus on the learning process of walking and recovering from falls.
According to [10], for robots to interact with objects, navigate environments dominated by humans, and perform a variety of tasks, they must be able to move on two legs. By mimicking human stride, biped robots can achieve greater mobility and adaptability, making them suitable for a variety of applications, such as humanoid companionship, search and rescue, and prosthetics [11]. However, establishing stable and robust bipedal walking remains challenging due to the complexity of the underlying dynamics and control processes [12].
For biped robots to operate and be durable in the long term, they must be able to recover independently from falls [13]. Falls may be caused by unexpected difficulties, uneven ground, or mechanical failures [14]. Biped robots can regain stability and resume their locomotion activities without the need for human intervention by creating efficient recovery mechanisms [15]. Robotic adaptation and effective responses to unexpected events are made possible by genetic algorithms, which offer a promising approach [16,17].
The concepts of natural selection and evolution served as the basis for the development of genetic algorithms, which are optimization approaches [18]. These are carried out by iteratively improving a population of potential mates through the processes of reproduction, crossover, and mutation [19,20,21,22]. Genetic algorithms can be used to evolve control parameters that regulate walking patterns in the context of biped robots learning to walk [23,24,25,26]. Genetic algorithms can efficiently explore the search space and converge to the best control strategies for bipedal locomotion by representing potential solutions as individuals in a population, evaluating their performance according to predetermined fitness criteria, and using genetic algorithms to create new generations [27].
A crucial component of bipedal locomotion, in addition to learning to walk, is the ability to recover from falls [28]. By developing control strategies that enable the robot to detect falls, analyze the fall scenario, and perform the appropriate actions to regain stability and stand up, genetic algorithms can be extended to improve recovery behaviors [29]. The genetic algorithm can iteratively refine recovery methods and the robot’s ability to adjust to various falls and execute the recovery cycle for greater results [30].
The purpose of this scientific investigation is to investigate how genetic algorithms are used in the learning process of biped robot locomotion and recovery from falls. The particular goals of this study include:
(a)
The development of a system that precisely models the elements of bipedal movement and fall situations;
(b)
The establishment of appropriate fitness criteria for evaluating the walking and recovery performance of biped robots;
(c)
The utilization of a framework that is based on genetic algorithms to optimize control parameters or policies for stable walking and effective fall recovery;
(d)
The evaluation of control strategies developed through extensive simulations and experimental validation in terms of their robustness and effectiveness.
By utilizing the power of genetic algorithms to improve the learning process of walking and the recovery capabilities of biped robots, the findings of this study have the potential to advance the field of bipedal robotics. The resulting biped robots can exhibit improved stability, adaptability, and resilience in complex and dynamic environments by optimizing control strategies with genetic algorithms.

2. Literature Review

L. Yang et al. used an optimized Fourier series and a genetic algorithm to create a two-legged robot walking pattern [31].
A biped robot’s walking pattern was created using a genetic algorithm and optimized Fourier functions.
Nonetheless, it is essential to note that the paper focuses exclusively on simulations and tests on a real robot are not included. Furthermore, the article does not address important considerations when developing a comprehensive walking strategy for a biped robot, such as falling robots and the recovery process after a fall.
Miao Kehua et al. developed gennet [32], a flexible control framework for a biped robot made up of genetic algorithms and neural networks.
A noteworthy strategy that incorporates genetic algorithms and neural networks is presented.
However, it is essential to note that the paper focuses primarily on theoretical aspects and does not include any substantial simulation studies or evidence of actual robot testing. In addition, crucial considerations for designing and improving algorithms for biped robot walking, such as fall management and the robot’s ability to recover from falls, are not addressed in the paper.
Runming Zhang et al. presented a paper focusing on energy proficiency and speed in bipedal walking using a genetic algorithm [33].
The use of a genetic algorithm is emphasized to improve the speed and energy efficiency of bipedal locomotion.
Nevertheless, it is important to note that the paper only presents simulations and does not provide experimental validation on a real robot. Additionally, the article does not address pivotal angles, for example, fall management and recuperation, which are imperative areas of consideration to improve and enhance the walking system of bipedal robots.
Sang-ho Choi et al. presented a paper investigating the generation of ideal trajectories for a biped robot using genetic algorithms [34].
This paper evaluates the generated trajectory using both simulations and actual robot tests.
However, it is essential to note that the paper does not address the robot’s specific walking technique; instead, its sole focus is on creating the walking trajectory. Furthermore, the article does not discuss important aspects of the overall walking process of a bipedal robot, such as the management of falls and the recovery process after falls.
Table 1 presents a comparison between the biped robot utilized in this paper and other biped robots discussed in scientific journals or conference papers.
It is evident that the biped robot employed in this study is similar to that used by other researchers. However, a notable distinction lies in the absence of an upper body in the robot used in this paper, since it relies solely on its legs for walking. This absence is justified by the notion that an upper body is unnecessary for a biped robot’s process of learning to walk.
It can be seen that, in the scientific literature, there are not too many approaches for biped robots learning to walk that involve fall management. For the present paper, this is the main focus. Due to the fact that a real system tries to copy the human genetics, fall management is very important because, without this, the system will only be partially automated. A child learning to walk will rise somehow after a fall. This is the kind of system that is intended to be implemented for this biped, which learns to walk using genetic algorithms.

3. Problem Solving

3.1. Theoretical Background

This is a complex system that includes the robot’s mechanical construction, control system, and actuation system and controls the walking motion of a biped robot. The motors and other parts of the actuation system produce the power and force expected to move the robot legs. The control system controls the robot’s mobility and ensures that it stays stable while moving. The actual construction of the robot moves its center of gravity, weight distribution, and other essential components that affect how it walks.
Biped robot walking gaits have been created using different methods. Rule-based optimization and machine learning are the main types. Rule-based approaches include the creation of a set of rules to direct the robot’s movement. Using numerical improvement methods, advancement strategies include the quest for the most ideal response. To improve robot learning and performance, machine learning techniques are used to train it with data and algorithms.
Finding the best answers to challenging problems using genetic algorithms has been shown to be quite promising. A class of optimization algorithms known as “genetic algorithms” is based on the concepts of genetics and natural selection. The algorithm generates a population of potential solutions, assesses their fitness, and chooses the best for the next generation. Up until the ideal answer is discovered, the process is repeated.
To teach the biped robot to walk, various parameters and formulas are used within the genetic algorithm framework. Table 2 presents the specific parameters used in the genetic algorithm, which were determined based on the experimental results. A population size of 150 was established from the experimental results and each individual represents a command string that controls the servomotors of the biped robot. The objective is to enable the robot’s movements to resemble natural sun tracking as closely as possible.
Typically, after 50 generations, the command string obtained from the biped robot has the ability to effectively control the servomotors, ensuring natural movement. However, it is not always necessary to reach the 50th generation for optimal performance.
The crossover rate, indicating the likelihood of the exchange of genetic material between individuals, can be calculated by dividing the number of generations by the total number of generations used in the tests. In this case, dividing 50 by 67 results in a crossover rate of 0.75.
The mutation rate refers to the probability that the gene (or character) mutates or changes within the command string of the biped robot. In this example, a mutation rate of 0.01 implies a 1% chance that a gene will mutate or a character in the command string will change.
Given that the length of the command string is eight bits, each gene (represented by a character) in the string consists of eight bits. The characters in the command string have ASCII values (American Standard Code for Information Interchange) represented by two hexadecimal digits, each hexadecimal digit being equivalent to four bits or four binary digits.
After completing 50 generations, the genetic algorithm demonstrated a significant improvement in the precision of the biped robot, enabling it to walk more naturally. However, before reaching generation 50, the system exhibited lower precision. This conclusion was drawn on the basis of multiple test runs.
To calculate the crossover rate or parameter C p , Equation (1) describes the method used. We divided the generation number G n by the total generation number G T , which resulted in a value of 0.75 for our particular case.
C p = G n G T = 50 67 = 0.75
The process of generating genes (characters) and assembling them into gene arrays or command strings for the robot can be observed in Equation (2). This can be achieved by assigning ASCII values to randomly selected numbers within the specified MIN and MAX ranges. The range encompasses numbers from 0 to 9 as well as the colon (“:”) and semicolon (“;”) characters, which have ASCII values ranging from 48 to 59. An example of a generated gene array would appear as “7;20;20”, representing the angle of movement of each motor joint of one leg of the biped.
g i = A S C I I ( r a n d M I N , M A X ) , M I N = 48 , M A X = 59
Equation (3) illustrates the process of determining a random midpoint, denoted as P m , for crossing two arrays of parent genes. Using this midpoint, a portion of the gene array is inherited from one parent, while another portion is inherited from the other parent, resulting in the creation of a child array. The distribution of genes from each parent can vary, as the midpoint is not always symmetric, but instead is a random point. When both arrays of parent genes have the same lengths, a random number is generated in the range of 0 to the length n of the arrays.
P m = r a n d 0 , n
Similar to the principles of biological genetics, computational genetics also involves the process of mutation, as it is necessary to ensure the generation of diverse offspring. Without mutation, there would be the possibility that a child could be identical to its parent (when the random midpoint P m is at zero), which would hinder evolution. Consequently, the biped robot would never achieve the most natural movement. In computational genetics, as in biological genetics, a child can have both mutated genes and genes inherited from its parents. This uniqueness is what makes each individual on Earth distinct, even if they share some genes. Mutation plays a crucial role in the process of evolution.
Equation (4) describes the procedure of generating a random mutation. A random number is generated between 0 and 1, and if this number is less than the mutation rate or the parameter M p (which in our case is 0.01), a mutation occurs. This involves creating a new gene, known as g i , with an ASCII value that falls within the limits of MIN and MAX (48 and 59, respectively). The gene or character in the current loop index is replaced only if the randomly generated number, within the range of 0 and 1, is less than the mutation rate or parameter M p , which is set to 0.01.
r a n d 0 , 1 < M p , M p = 0.01 g i = A S C I I ( r a n d M I N , M A X ) , M I N = 48 , M A X = 59
The fitness function used in the genetic algorithm is presented in Equation (5):
F ( w ) = 1 T 0 T ( K p Δ x 2 + K d Δ x ˙ 2 ) d t
where K p and K d are proportional and derivative gains, respectively; Δ x is the deviation from the desired position; Δ x ˙ is the deviation from the desired velocity; and T is the duration of a single gait cycle.
The mutation operator used in the genetic algorithm is presented in Equation (6):
w i , j = w i , j + δ w i , j
where w i , j is the j-th element of the i-th weight matrix, and δ w i , j is a random perturbation.
The velocity update equation used in particle swarm optimization is presented in Equation (7):
v i , j = w v i , j + c 1 r 1 ( p i , j x i , j ) + c 2 r 2 ( g j x i , j )
where v i , j is the velocity of the i-th particle in the j-th dimension, w is the inertia weight, c 1 and c 2 are the cognitive and social parameters, respectively, r 1 and r 2 are random numbers between 0 and 1, p i , j is the best position achieved by the i-th particle in the j-th dimension, g j is the best position achieved by any particle in the j-th dimension, and x i , j is the current position of the i-th particle in the j-th dimension.
To generate the gait of the biped robot, a Fourier series can be used in the genetic algorithm, which is presented on Equation (8):
f ( t ) = 1 2 a 0 + i = 1 a i + sin 2 π i T t + i = 1 b i + cos 2 π i T t
The Truncated Fourier Series (TFS) is shown in Equation (9):
f ( t ) = i = 1 n a i + sin i ω t + c f , ω = π T S
where a i , n, and c f are constants, and ω is the fundamental frequency. T S is the period, which is half of T.
The TFS for the hip joints is computed as shown in Equation (10):
θ r h , θ l h = θ h + = i = 1 n R · A i sin i ω h ( t t h + ) + c h θ h = i = 1 n R · B i sin i ω h ( t t h ) + c h
where θ r h and θ l h are the angles of the right and left hips, ω h = π / ( t 3 t 0 ) = π / ( t 6 t 3 ) , is the frequency of the walk stride, A i and B i are constants, θ h + and θ h are the upper and lower parts of the hip joint trajectory, t h + and t h are time-shift values, and R is an amplitude scaling parameter used to change the length of the step, which was initially set at 1.
Similarly the knee joints can be expressed as shown in Equation (11):
θ r k , θ l k = θ k 1 = i = 1 n R · C i sin i ω k ( t t k ) + c k θ k 2 = c k 0
where θ r k and θ l k are the angles of the right and left knees, ω k = π / ( t 6 t 2 ) = π / ( t 1 t 0 ) , C i is a time constant, and t k is the time-shift.
The force vector can be expressed as shown in Equation (12):
Q = M ( θ ) θ ¨ + C ( θ , θ ˙ ) θ ˙ + F ( θ ˙ ) + G ( θ )
where θ is the coordinate vector of the joints, θ ˙ is the speed vector of the joints, θ ¨ is the acceleration vector of the joints, M is the inertia matrix, C is the Coriolis force, F is the friction, G is the gravity, and Q is the force vector.
A new fitness function was computed, where we produced 100 random chromosomes, as shown in Equation (13):
f = 1 40 A ( ϕ t + 1 ) 1 40 D ( ϕ t , ϕ t ) · 1 N p 50 · Z ( S ( ϕ t + 6 , M ) )
where S ( ϕ t + 6 , M ) is the center of gravity.
Z ( S ( * ) ) shows if S(*) is still inside the ZMP (zero moment point) after six cycles. N p represents the number of neurons of chromosome p, as shown in Equation (14):
Z ( S ( * ) ) = 0 S ( ϕ t + i , M ) Z M P 1 S ( ϕ t + i , M ) Z M P ( i = 6 )
where A ( ϕ t ) is the output angle, where 1 is positive and 0 is negative.
The method of selecting individuals with small changes to the angles of joints is presented on Equation (15)
D = ( ϕ t , ϕ t ) = 1 / 1 8 ( ϕ t ϕ t ) 2
The formulas for the pitch angle of the COM (center of mass) and the lateral movement of the waist during the SSP (single supporting phase) are presented in Equations (16) and (17):
θ ¨ l x z g sin θ = 0
y ¨ l x z cos θ = ( g θ ¨ l x z sin θ l x z θ ˙ 2 cos θ ) ( y y p )
The pattern generation extended from the DSP (double supporting phase) trajectory is presented next.
The derivative of the time function in the x , y , z directions is 0, and the minimum order of therms is 2, as shown in Equations (18)–(20):
x = c x 1 t 5 + c x 2 t 4 + c x 3 t 3 + x x 4 t 2
y = c y 1 t 5 + c y 2 t 4 + c y 3 t 3 + x y 4 t 2
z = c z 1 t 5 + c z 2 t 4 + c z 3 t 3 + x z 4 t 2
The displacement of the COM can be expressed as shown in Equations (21)–(23):
x n = i c x , 6 i ( n d t ) i , n < N d o u
y n = i c y , 6 i ( n d t ) i , n < N d o u
z n = i c z , 6 i ( n d t ) i , n < N d o u
where d o u represents the length of the DSP, and N is the length of one cycle.
Equations (24)–(28) show how to continue the calculation:
x n = l x z sin θ n + x p
z n = l x z cos θ n
y ¨ = ( g θ ¨ l x z sin θ n l x z θ ˙ n 2 ) ( y y p ) cos θ n , N d o u < n < N N d o u
y ˙ n = y ˙ l + d t i n y ¨ i
y n = y l + d t i n y ˙ i
θ is computed as shown in Equations (29)–(31):
θ ¨ n = g sin θ n / l x z
θ ˙ n = θ ˙ l + d t i n θ ¨ i
θ n = θ l + d t i n θ ˙ i
For a robot with six AC servos, the balancing equations can be written using the D’Alembert principle as shown in Equation (32):
x ¨ 0 z ¨ 0 + g z z 0 x 0 = ( z ¨ 0 + g z ) x z m p D z 0 g x + + i = 1 6 m i ( x ¨ i + g x ) z i i = 1 6 m i ( z ¨ i + g z ) ( x i x z m p D ) / m 0 z 0 y ¨ 0 z ¨ 0 + g z z 0 y 0 = ( z ¨ 0 + g z ) y z m p D z 0 g y + + i = 1 6 m i ( y ¨ i + g y ) z i i = 1 6 m i ( z ¨ i + g z ) ( y i y z m p D ) / m 0 z 0
where m 0 is the balancing mass, x 0 and y 0 are the sagittal and lateral motions of the balancing mass, x z m p D and y z m p D are the desired ZMPs (zero movement points), and x i , y i , and z i are the positions of the mass m i in world coordinates.
Balancing motion compensates the movements of the leg and body, but also causes spin movement, as presented by Equation (33):
M T z = i = 0 6 m i ( x ¨ i + g x ) ( y i y z m p ) i = 0 6 m i ( y ¨ i + g y ) ( x i x z m p ) + m g R 2 θ ¨ z
where R is the distance from the center to the mass center of a balancing roll, and θ ¨ z is angular acceleration in the z direction.
ZMP verification is presented in Equation (34):
x z m p = i = 1 6 m i ( z ¨ i + g z ) x i i = 1 6 m i ( x ¨ i + g x ) z i / i = 1 6 m i ( z ¨ i + g z ) y z m p = i = 1 6 m i ( z ¨ i + g z ) y i i = 1 6 m i ( y ¨ i + g y ) z i / i = 1 6 m i ( z ¨ i + g z )

3.2. The Proposed Genetic Algorithm

We developed a bipedal walking robot with two legs and six degrees of freedom on each leg. The robot was modeled using the ROS (Robot Operating System) framework. A genetic algorithm was used to optimize the robot’s gait. The genetic algorithm was implemented using the DEAP (Distributed Evolutionary Algorithms in Python) framework.
The genetic algorithm consisted of the following steps:
Initialization:
The population of candidate solutions was generated randomly.
Evaluation:
The suitability of each candidate solution was evaluated using a simulated environment. The simulation environment included a physics engine that simulated robot movements and fitness features that evaluated robot performance.
Selection:
The best solution was selected based on fitness.
Reproduction:
Selected solutions were used to create candidates for the next generation of solutions through crossover and mutation.
Termination:
The process was repeated until the exit criteria were met.
A simplified diagram of the genetic algorithm can be seen in Figure 1. This diagram can be used by a humanoid robot to improve its walking abilities and regain balance after a fall.
The genetic algorithm employs certain terminologies borrowed from biological genetics, which can be interpreted slightly differently when translated into software, but still retain their original meaning.
In the genetic algorithm, DNA or gene arrays refer to command strings or character arrays that are sent to each motor joint of the biped robot to produce movement. For example, a gene may appear as “7;20;20”, which represents the angle of movement for each motor joint of one leg of the biped, for example, 7 at the ankle, 20 at the knee, and 20 at the hip, and the values for the other leg are symmetric to maintain balance.
Gene arrays are constructed as character arrays, where a gene represents a character, for example, “7” denotes the movement angle for a specific joint. The phenotype in this case is 7, while the genotype is the ASCII value of “7”, which is 55. During gene generation, random ASCII numbers are generated and then converted to the corresponding characters to obtain the phenotype or command string from the biped robot motor.
All DNAs or gene arrays are treated as parents and placed in a mating pool to produce an offspring or a child by crossing. The crossing process involves concatenating one half of the command string of a parent with the second half of the other parent’s command string.
Mutation, which involves changing a random gene, is necessary for genetic diversity, since there are no organisms with identical genetic information. In programming, mutation involves changing a character in a random location within the gene array by generating a random ASCII value and converting it to the corresponding character according to the ASCII table. The mutated character is then inserted into a random location in the parent gene array.
The essential variables in the genetic algorithm include the mutation rate (e.g., 0.01, the probability that genes change randomly), total population (e.g., 150, the number of parent command strings to cross), target (the desired command string of the biped robot for natural walking), population (generated biped robot command character arrays) and match (computed fitness score arrays).
The first step is population initialization, which involves generating biped command character arrays (genes).
The second step is selection, where a fitness score is calculated to determine the closest match to the desired command string of the biped robot. Then, a matching pool consisting of robot command strings with higher fitness scores is created. The higher the fitness score, the more times the robot command string is added to the mating pool to increase the chances of crossing and producing an offspring.
The third step involves reproduction, which is achieved by crossing two randomly selected robot command strings from the mating pool. To cross, half of one string is combined with the other half of the other string. If the resulting string is too similar to the parent strings and does not produce the desired result, a mutation occurs, randomly changing one character in the string. This process is similar to genetic inheritance in biological organisms. The new child becomes part of the mating pool and can be crossed with another parent to create a new offspring. This process continues until the target robot command string is achieved. Only one motor is used to create the target string, and the other joints are calculated on the basis of this value. The robot’s position is constantly measured and, if it falls, it attempts to stand up and continue walking. The rise algorithm is based on the values of 0 Z and 0 X of the accelerometer, which indicate whether the robot has fallen forward, backward, or to the side.
If the 0 Z value is less than a specific limit multiplied by −1, the biped robot has fallen on its back and will perform the algorithm to stand up from that position.
If the value of 0 Z is greater than another specific limit, the biped robot has fallen on its front and will execute the algorithm to stand up from that position.
If the value of 0 X is less than a certain limit multiplied by −1, the biped robot has fallen to the left and needs to use a combination algorithm to rise. This algorithm involves kicking with the left leg to turn the robot to the front and then using the “getting up from front position” algorithm.
If the value of 0 X is greater than a certain limit, the biped robot has fallen to the right and will use the same combination algorithm but with the right leg instead.
These combination algorithms were created because the biped robot is unable to make complex side movements, as a human would when falling to the side.
Even when the robot does not fall, it still continuously generates new generations of the biped robot command string to improve its walking movement, stopping only when it reaches the target biped robot command string for the most natural walking movement.

3.3. Implementation

A genetic algorithm was able to find the optimal gait for a bipedal robot. The optimized gait was faster and more stable than the initial gait. The fitness function used in the simulation environment included several parameters, such as walking speed, robot stability, and robot energy consumption.
Figure 2 shows the hardware configuration of the biped robot used to implement a genetic algorithm to learn or improve robot walking skills and stand up after falling.
The biped robot used was called BRAT from Lynxmotion, which only has legs without an upper body, arms, or head, which is sufficient for the biped to learn to walk. It has six degrees of freedom (DOFs) and six motors, two at the hips, two at the knees, and two at the ankles.
The control system for the robot runs on a Raspberry Pi 3 Model B, not the B+ version. This particular version was chosen because it has Wi-Fi onboard and consumes less power than the B+ version. The B+ version has a power consumption level of 350 mA (1.9 W) in idle mode, while Model B has a power consumption level of 260 mA (1.4 W). When under high CPU load (400%), the B+ version consumes 980 mA (5.1 W), and Model B consumes 730 mA (3.7 W). Since the robot needs to be autonomous, it has to carry onboard batteries which must be as small and lightweight as possible while still being able to power all of the robot’s electronics.
The Raspberry Pi 4 Model B was out of the question, because it consumes 540 mA (2.7 W) in idle mode and 1280 mA (6.4 W) under 400% CPU load.
The Lynxmotion SSC-32 servo controller board is powered by a classic 9 V battery, as 5 V is not sufficient to power its electronics.
The final setup consists of three circuit boards, the Raspberry Pi 3 Model B, the Lynxmotion SSC-32 servo controller board and the MPU 6050 accelerometer, powered by two batteries, a 5 V, 2600 mAh power bank and a classic 9 V battery.
The Raspberry Pi 3 Model B is the main control unit that runs the genetic algorithm to generate numbers that are converted into motor command strings and sent to the Lynxmotion SSC-32 servo control board via the RS-232 serial interface. The SSC-32 serial control interface decodes motor commands and sends PWM signals to the six connected Hitec HS-645 servo motors. The biped has the ability to rise after a fall if the genetic algorithm does not generate the best motor command.
The Hitec HS-645 servomotors have gears and electronic circuits mounted on them and are powered by a 5 V power supply with three connection wires: one red wire V C C for power, one black wire for grounding, and one yellow wire for PWM input. The servomotors can only move 180 due to mechanical restrictions.
The biped has the MPU 6050 accelerometer mounted on top to detect if it has fallen in one of four positions: front, back, left, or right. To simplify the process, only the accelerometer values on the 0 Z and 0 X axes need to be checked. The accelerometer data are sent to the Raspberry Pi 3 Model B through the I2C serial port, which triggers the “getting up from fallen position” algorithm. The algorithm sends motor position data to the Lynxmotion SSC-32 servo control board via the RS-232 serial interface. The servo board controls the Hitec HS-645 servo motors through the PWM. To rise from a front or back fall, the accelerometer data on the 0 Z axis are checked, and an algorithm is used to raise the biped from these positions. To stand up from a left or right fall, the accelerometer data are checked on the 0 X axis. It was found that if the biped kicks with the same leg on the side that it has fallen (that is, the left leg if it falls to the left), it will switch as if it had fallen to the front and then it can get up normally.

4. Results

4.1. Experimental Results

Figure 3 illustrates how the biped robot attempts to walk, falls sometimes, and then manages to get back up again. If the robot falls forward, it tries to stand up by moving forward. If it falls backward, it tries to stand up by moving backwards. If it falls to one side, it attempts to use the leg on that side to kick and rotate towards the front, so that it falls forward and can then try to stand up in the same way as when it falls forward.
Ultimately, the biped robot learns to walk naturally.

4.2. Discussion

The idea of a biped learning to walk with genetic algorithms is not new. The novelty of this paper is the implementation method and the possibility of the biped standing up after a fall. The idea is that a robot should learn to walk in the same way as a child who, after a fall, will stand up and try to walk again. With genetic algorithms, software engineers try to copy biological genetics as much as possible, because it is known that evolution created living beings to be in this actual state that they are. Evolution will generate more and more advanced living beings and, by creating software with genetic algorithms, more advanced machines will be produced.
The big advantage of this work is that the robot can learn to walk and stand up after a fall, and this was tested on a real Lynxmotion BRAT biped robot. Other implementations in this field have presented robots that learn to walk using genetic algorithms but do not stand up after a fall due to the fact that a fall can destroy a real robot. Many implementations have involved simulations only when testing the falling feature of biped robots to protect the robotic assembly. Other implementations have evolved the genetic algorithm by simulations only. This prevents a real biped robot from falling. Other scientists prevent biped robots from falling using harnesses, in this way tying the biped robots to the ceiling or to especially created frames. Many simple implementations do not manage falls. When a robot falls, it is put back on its feet by the scientist, and the process is continued after the biped robot is back on its feet.
The hardest part of choosing components for an autonomous biped robot is the choice of battery, which must be powerful enough to power the entire system, electronics, and servos, but should be light enough to be carried by the biped robot.
The most significant achievement highlighted in this article is the inclusion of fall management in the biped robot featured in this thesis, allowing it to recover from a fall. This capability is essential for a robot to learn to walk, as even young children experience falls during their own walking development. The success of children in learning to walk is highly dependent on their ability to stand up after falling. Therefore, this natural approach should be incorporated into biped robots that are attempting to learn to walk using genetic algorithms.
The significance of the paper is that there are not too many works in the scientific literature on biped robots that can learn to walk and can stand up after a fall.
The optimization method is shown in Figure 1, and this presents the genetic algorithm. Basically, after each generation, the walking of the biped robot is optimized in order to move to a more advanced level.
Without the implementation of the ability to recover from falls, the automation of walking learning cannot be fully achieved. In such cases, the biped robot will require a support structure or human intervention to stand up, resulting in partial automation.

5. Conclusions

We presented a biped robot who can learn to walk and also stand up after a fall. The main accomplishment of this work is that the biped robot can learn to walk using genetic algorithms and can stand up after a fall. Everything was tested on a real Lynxmotion BRAT biped robot.
The main innovation part of this work is that not too many articles in the scientific literature present biped robots that can learn to walk and stand up after a fall. Because the system uses genetic algorithms, it behaves like a real child learning to walk and getting up in some way after a fall.
To determine the position of the biped robot and to determine whether the biped robot is on its feet or if it has fallen, an MPU 6050 accelerometer was used. To control the whole system and run the genetic algorithm, a Raspberry Pi Model B was used. Robotic motors are controlled by the Lynxmotion SSC-32 servo controller. The genetic algorithm is implemented in Python scripting language.
Further enhancements could be made by implementing the system in a more advanced biped robot or by using a larger biped robot. It might be interesting to implement the algorithm on a full humanoid robot, such as Lynxmotion Pete, or even on a bigger humanoid robot.

Funding

This research was founded by the Academy of Romanian Scientists, Splaiul Independentei 54, 050044 Bucharest, Romania. This research was also funded by the Politehica University Timisoara.

Data Availability Statement

All the images are available on request from the corresponding author.

Acknowledgments

The author would like to thank the Academy of Romanian Scientists, Splaiul Independentei 54, 050044 Bucharest, Romania, for the support given. The author also thanks the Politehnica University Timisoara for the given support.

Conflicts of Interest

The author declares no conflict of interest.

Abbreviations

GAsgenetic algorithms
ASCIIAmerican Standard Code for Information Interchange
Ffitness function
Tduration of a single gait cycle
K p proportional gain
K d derivative gain
Δ x deviation from the desired position
Δ x ˙ deviation from the desired velocity
w i , j j-th element of the i-th weight matrix
δ w i , j random perturbation
v i , j velocity of the i-th particle in the j-th dimension
winertia weight
c 1 , c 2 cognitive and social parameters
r 1 , r 2 random numbers between 0 and 1
p i , j best position achieved by the i-th particle in the j-th dimension
g j best position achieved by any particle in the j-th dimension
x i , j current position of the i-th particle in the j-th dimension
a i , n, c f constants
ω fundamental frequency
T S period, which is half of T
θ r h , θ l h right and left hip angles
ω h ω h = π / ( t 3 t 0 ) = π / ( t 6 t 3 ) , walking stride-frequency
A i , B i constants
θ h + , θ h upper and lower portion of the joint trajectory of the hip
t h + , t h time-shift values
Ramplitude scaling parameter used for changing the length of the step, initially is set to 1
θ r k , θ l k right and left knee angles
ω k ω k = π / ( t 6 t 2 ) = π / ( t 1 t 0 )
C i time constant
t k time-shift
θ coordinate vector of the joints
θ ˙ speed vector of the joints
θ ¨ acceleration vector of the joints
Minertia matrix
CCoriolis force
Ffriction
Ggravity
Qforce vector
S ( ϕ t + 6 , M ) center of gravity
ZMPzero moment point
N p number of neurons of chromosome p
A ( ϕ t ) output angle, 1 for positive and 0 for negative
COMcenter of mass
SSPsingle supporting phase
DSPdouble supporting phase
d o u length of DSP
Nlength of one cycle
ACalternating current
m 0 balancing mass
x 0 , y 0 sagittal and lateral motions of the balancing mass
x z m p D , y z m p D desired ZMP (zero movement point)
x i , y i , z i position of mass m i in world coordinates
Rdistance from the center to the mass center of a balancing roll
θ ¨ z angular acceleration in the z direction
ROSRobot Operating System framework
DEAPDistributed Evolutionary Algorithms in Python framework
DNAdeoxyribonucleic acid
DOFsdegrees of freedom
CPUCentral Processing Unit
PWMPulse Width Modulation
V C C Voltage Common Collector
I2CInter-Integrated Circuit
RS-232Recommended Standard 232 for serial communication

References

  1. Singh, G.; Kumar, A.; Bhatia, A. Biped Robot Walking Gait Optimization through Genetic Algorithms. Int. J. Robot. Autom. 2021, 37, 176–184. [Google Scholar]
  2. Parker, G.; Zbeda, R. Learning Area Coverage for a Self-Sufficient Hexapod Robot Using a Cyclic Genetic Algorithm. IEEE Syst. J. 2014, 8, 778–790. [Google Scholar] [CrossRef]
  3. Chávez Estrada, F.A.; Herrera Lozada, J.C.; Sandoval Gutiérrez, J.; Cervantes, V.; María, I. Performance between Algorithm and micro Genetic Algorithm to solve the robot locomotion. IEEE Lat. Am. Trans. 2019, 17, 1244–1251. [Google Scholar] [CrossRef]
  4. Jamwal, P.K.; Hussain, S.; Xie, S.Q. Three-Stage Design Analysis and Multicriteria Optimization of a Parallel Ankle Rehabilitation Robot Using Genetic Algorithm. IEEE Trans. Autom. Sci. Eng. 2015, 12, 1433–1446. [Google Scholar] [CrossRef]
  5. Tsai, C.-C.; Huang, H.-C.; Chan, C.-K. Parallel Elite Genetic Algorithm and Its Application to Global Path Planning for Autonomous Robot Navigation. IEEE Trans. Ind. Electron. 2011, 58, 4813–4821. [Google Scholar] [CrossRef]
  6. Merchan-Cruz, E.A.; Morris, A.S. Fuzzy-GA-based trajectory planner for robot manipulators sharing a common workspace. IEEE Trans. Robot. 2006, 22, 613–624. [Google Scholar] [CrossRef]
  7. Hornby, G.S.; Takamura, S.; Yamamoto, T.; Fujita, M. Autonomous evolution of dynamic gaits with two quadruped robots. IEEE Trans. Robot. 2005, 21, 402–410. [Google Scholar] [CrossRef] [Green Version]
  8. Tewolde, G.S.; Sheng, W. Robot Path Integration in Manufacturing Processes: Genetic Algorithm Versus Ant Colony Optimization. IEEE Trans. Syst. Man Cybern. Part Syst. Humans 2008, 38, 278–287. [Google Scholar] [CrossRef]
  9. Walker, J.H.; Garrett, S.M.; Wilson, M.S. The balance between initial training and lifelong adaptation in evolving robot controllers. IEEE Trans. Syst. Man Cybern. Part 2006, 36, 423–432. [Google Scholar] [CrossRef]
  10. Huang, H.-C. SoPC-Based Parallel ACO Algorithm and its Application to Optimal Motion Controller Design for Intelligent Omnidirectional Mobile Robots. IEEE Trans. Ind. Inform. 2013, 9, 1828–1835. [Google Scholar] [CrossRef]
  11. Kamel, M.A.; Yu, X.; Zhang, Y. Real-Time Fault-Tolerant Formation Control of Multiple WMRs Based on Hybrid GA–PSO Algorithm. IEEE Trans. Autom. Sci. Eng. 2021, 18, 1263–1276. [Google Scholar] [CrossRef]
  12. Gao, G.; Mei, Y.; Xin, B.; Jia, Y.-H.; Browne, W.N. Automated Coordination Strategy Design Using Genetic Programming for Dynamic Multipoint Dynamic Aggregation. IEEE Trans. Cybern. 2022, 52, 13521–13535. [Google Scholar] [CrossRef]
  13. Cheong, H.; Ebrahimi, M.; Duggan, T. Optimal Design of Continuum Robots With Reachability Constraints. IEEE Robot. Autom. Lett. 2021, 6, 3902–3909. [Google Scholar] [CrossRef]
  14. Datta, R.; Pradhan, S.; Bhattacharya, B. Analysis and Design Optimization of a Robotic Gripper Using Multiobjective Genetic Algorithm. IEEE Trans. Syst. Man Cybern. Syst. 2016, 46, 16–26. [Google Scholar] [CrossRef]
  15. Jamwal, P.K.; Hussain, S. Multicriteria Design Optimization of a Parallel Ankle Rehabilitation Robot: Fuzzy Dominated Sorting Evolutionary Algorithm Approach. IEEE Trans. Syst. Man Cybern. Syst. 2016, 46, 589–597. [Google Scholar] [CrossRef]
  16. Sim, K.-B.; Byun, K.-S.; Lee, D.-W. Design of fuzzy controller using schema coevolutionary algorithm. IEEE Trans. Fuzzy Syst. 2004, 12, 565–570. [Google Scholar] [CrossRef]
  17. Iwasaki, M.; Miwa, M.; Matsui, N. GA-based evolutionary identification algorithm for unknown structured mechatronic systems. IEEE Trans. Ind. Electron. 2005, 52, 300–305. [Google Scholar] [CrossRef]
  18. Roberge, V.; Tarbouchi, M.; Labonte, G. Comparison of Parallel Genetic Algorithm and Particle Swarm Optimization for Real-Time UAV Path Planning. IEEE Trans. Ind. Inform. 2013, 9, 132–141. [Google Scholar] [CrossRef]
  19. Paul, C.; Valero-Cuevas, F.J.; Lipson, H. Design and control of tensegrity robots for locomotion. IEEE Trans. Robot. 2006, 22, 944–957. [Google Scholar] [CrossRef]
  20. Zhang, Y.; Rockett, P.I. Application of Multiobjective Genetic Programming to the Design of Robot Failure Recognition Systems. IEEE Trans. Autom. Sci. Eng. 2009, 6, 372–376. [Google Scholar] [CrossRef] [Green Version]
  21. Lou, Y.; Zhang, Y.; Huang, R.; Chen, X.; Li, Z. Optimization Algorithms for Kinematically Optimal Design of Parallel Manipulators. IEEE Trans. Autom. Sci. Eng. 2014, 11, 574–584. [Google Scholar] [CrossRef]
  22. An, M.; Taura, T.; Shiose, T. A Study on Acquiring Underlying Behavioral Criteria for Manipulator Motion by Focusing on Learning Efficiency. IEEE Trans. Syst. Man Cybern. Part Syst. Humans 2007, 37, 445–455. [Google Scholar] [CrossRef]
  23. Ferrauto, T.; Parisi, D.; Di Stefano, G.; Baldassarre, G. Different Genetic Algorithms and the Evolution of Specialization: A Study with Groups of Simulated Neural Robots. Artif. Life 2013, 19, 221–253. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  24. Sakai, M.; Kanoh, M.; Nakamura, T. Evolutionary Multivalued Decision Diagrams for Obtaining Motion Representation of Humanoid Robots. IEEE Trans. Syst. Man Cybern. Part 2012, 42, 653–663. [Google Scholar] [CrossRef]
  25. Wu, D.; Hou, G.; Qiu, W.; Xie, B. T-IK: An Efficient Multi-Objective Evolutionary Algorithm for Analytical Inverse Kinematics of Redundant Manipulator. IEEE Robot. Autom. Lett. 2021, 6, 8474–8481. [Google Scholar] [CrossRef]
  26. Wang, Y.; Xin, B.; Chen, J. An Adaptive Memetic Algorithm for the Joint Allocation of Heterogeneous Stochastic Resources. IEEE Trans. Cybern. 2022, 52, 11526–11538. [Google Scholar] [CrossRef]
  27. Leung, F.H.F.; Lam, H.K.; Ling, S.H.; Tam, P.K.S. Optimal and stable fuzzy controllers for nonlinear systems based on an improved genetic algorithm. IEEE Trans. Ind. Electron. 2004, 51, 172–182. [Google Scholar] [CrossRef]
  28. Yi, Z.; Xu, T.; Shang, W.; Li, W.; Wu, X. Genetic Algorithm-Based Ensemble Hybrid Sparse ELM for Grasp Stability Recognition With Multimodal Tactile Signals. IEEE Trans. Ind. Electron. 2023, 70, 2790–2799. [Google Scholar] [CrossRef]
  29. Geijtenbeek, T.; van de Panne, M.; van der Stappen, A.F. Flexible Muscle-Based Locomotion for Bipedal Creatures. ACM Trans. Graph. 2013, 32, 206. [Google Scholar] [CrossRef]
  30. Juang, C.; Yeh, Y. Multiobjective Evolution of Biped Robot Gaits Using Advanced Continuous Ant-Colony Optimized Recurrent Neural Networks. IEEE Trans. Cybern. 2018, 48, 1910–1922. [Google Scholar] [CrossRef]
  31. Yang, L.; Chew, C.M.; Poo, A.N.; Zielinska, T. Adjustable Bipedal Gait Generation Using Genetic Algorithm Optimized Fourier Series Formulation. In Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems, Beijing, China, 9–15 October 2006; pp. 4435–4440. [Google Scholar]
  32. Kehua, M.; Xiao, M.; Lincen, Z. Adaptive Control of Biped Robots Based on Gennet. In Proceedings of the 7th International Conference on Computer Science & Education (ICCSE), Melbourne, VIC, Australia, 14–17 July 2012; pp. 1018–1020. [Google Scholar]
  33. Zhang, R.; Liu, H.; Meng, F.; Kang, R.; Yu, Z.; Ming, A.; Huang, Q. Energy Efficiency and Speed Optimization by Squad-Unit Genetic Algorithm for Bipedal Walking. In Proceedings of the IEEE International Conference on Robotics and Biomimetics (ROBIO), Kuala Lumpur, Malaysia, 12–15 December 2018; pp. 661–667. [Google Scholar]
  34. Choi, S.-H.; Choi, Y.-H.; Kim, J.-G. l Optimal Walking Trajectory Generation for a Biped Robot Using Genetic Algorithm. In Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems. Human and Environment Friendly Robots with High Intelligence and Emotional Quotients (Cat. No.99CH36289), Kyongju, South Korea, 17–21 October 1999; Volume 3, pp. 1456–1461. [Google Scholar]
Figure 1. Simplified block diagram of the genetic algorithm by which a humanoid robot can learn to walk.
Figure 1. Simplified block diagram of the genetic algorithm by which a humanoid robot can learn to walk.
Mathematics 11 02931 g001
Figure 2. Practical implementation of the genetic algorithm by which a humanoid robot can learn to walk. Block diagram of the biped robot.
Figure 2. Practical implementation of the genetic algorithm by which a humanoid robot can learn to walk. Block diagram of the biped robot.
Mathematics 11 02931 g002
Figure 3. The Lynxmotion BRAT biped robot learning to walk and rising after a fall.
Figure 3. The Lynxmotion BRAT biped robot learning to walk and rising after a fall.
Mathematics 11 02931 g003
Table 1. Comparison of the parameters of the genetic algorithm of the proposed approach with other similar methods.
Table 1. Comparison of the parameters of the genetic algorithm of the proposed approach with other similar methods.
GA ParameterProposed ApproachL. Yang et al. [31]Miao Kehua et al. [32]Runming Zhang et al. [33]Sang-Ho Choi et al. [34]
DOF662188
Height [cm]2451-54.60.685
Weight [kg]0.83324-2.347
Speed [m/s]0.0150.37 or 0.453.73 or 5.10.23 (top speed)-
Real robotyesnononoyes
Fall managementyesnononono
Costlowlowhighlowhigh
Complexitylowlowhighlowlow
Resource utilizationlowlowhighhighhigh
Table 2. Parameters of the genetic algorithm.
Table 2. Parameters of the genetic algorithm.
Total population150Generation number50
Crossover rate0.75Mutation rate0.01
String length8bits
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Szabo, R. Design Approach for Evolutionary Techniques Using Genetic Algorithms: Application for a Biped Robot to Learn to Walk and Rise after a Fall. Mathematics 2023, 11, 2931. https://doi.org/10.3390/math11132931

AMA Style

Szabo R. Design Approach for Evolutionary Techniques Using Genetic Algorithms: Application for a Biped Robot to Learn to Walk and Rise after a Fall. Mathematics. 2023; 11(13):2931. https://doi.org/10.3390/math11132931

Chicago/Turabian Style

Szabo, Roland. 2023. "Design Approach for Evolutionary Techniques Using Genetic Algorithms: Application for a Biped Robot to Learn to Walk and Rise after a Fall" Mathematics 11, no. 13: 2931. https://doi.org/10.3390/math11132931

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop