# Fuzzy Logic Controller Design for Intelligent Robots

Authors: Ching-Han Chen; Chien-Chun Wang; Yi Tun Wang; Po Tung Wang
Journal: Mathematical Problems in Engineering
 (2017)

---

## Abstract

This paper presents a fuzzy logic controller by which a robot can imitate biological behaviors such as avoiding obstacles or following walls. The proposed structure is implemented by integrating multiple ultrasonic sensors into a robot to collect data from a real-world environment. The decisions that govern the robot’s behavior and autopilot navigation are driven by a field programmable gate array- (FPGA-) based fuzzy logic controller. The validity of the proposed controller was demonstrated by simulating three real-world scenarios to test the bionic behavior of a custom-built robot. The results revealed satisfactorily intelligent performance of the proposed fuzzy logic controller. The controller enabled the robot to demonstrate intelligent behaviors in complex environments. Furthermore, the robot’s bionic functions satisfied its design objectives.


---

## Body

## 1. Introduction

Robot research is a popular scientific research [1–4] and is undoubtedly to enhance the quality of human life, but in the environment, the wheel structure is not suitable for use in the rugged terrain environment; in [5–7], it is very easy to study insects, whether they are moving on flat roads or walking on irregular roads.With the increasingly widespread application of robots in today’s fast-changing and diverse environment, it is essential for robots to possess autonomous movement capacity and intelligent decision-making processes, as well as behavioral control through sensory awareness of the surrounding environment to complete tasks in complex situations. In this regard, navigation and obstacle avoidance are the two crucial concerns that require attention.Fuzzy logic [8–11] has been deemed appropriate for applications in automatic navigation of robots. This is mainly because of its capacity to process large quantities of incomplete and inaccurate input signals. Such signal processing can enable automatic navigation for robots in uncertain environments. Abundant research has been reported on the application of fuzzy theory in automatic navigation for robots. A typical application requires the robot to carry various sensors for sensing environmental information. The outputs of the sensors serve as inputs to the fuzzy controller. Expert experience is adopted to prebuild a fuzzy rule database, which is required for the robot’s subsequent behaviors. Fuzzification, fuzzy inference, and defuzzification generate decisions that control the robot’s behaviors [12, 13], enabling the robot to navigate automatically.A fuzzy logic controller can accept input from a diverse range of sensors. Ultrasonic sensors can detect the distance between a robot and obstacles [14–16]. Global positioning systems can detect the robot’s current position [17–19]. With fuzzy inference, the final output enables a robot to differentiate between various environments and to perform the behaviors desired by the designer. For example, differences in wheel speeds can enable a wheeled robot to turn at an angle and roll in a new direction to avoid an obstacle. Regarding multilegged robots, the final input may be the rotational angle or forward velocity [17, 20, 21].At present, the development of the living tools and the adaptability of the environment are far less than the evolution of the ability of organisms, regardless of how long these organisms are experiencing long-term evolution, and whether there is a high degree of adaptability to the habitat of living space, whether it is in sensory organs, exercise patterns, learning mechanisms, organ structures, monomers, or all life structures, which is more efficient, so the use of physical characteristics will be an important future development indicator. This study focuses on the behavior of the recurrence of biological patterns for the software direction, the use of its evolution and behavior patterns, and the software processing efficiency.


## 2. Behavior of Intelligent Robots

### 2.1. Behavior of Bionic Robots

The term “bionic robots” refers to robots that mimic the body structures, functions, problem-solving behavior, and motions of living creatures, with simple mechanical structures or electronic devices. Multilegged bionic robots belong to this category; their motion patterns and tread movements resemble those of insects and spiders. Such a robot uses each leg, with its embedded multiple rotational joints, to mimic the behavioral patterns of insects. Among such robots, the six-legged type is the most common type of bionic robot.


### 2.2. Applying Fuzzy Controller in Obstacle Avoiding

The central nervous system contains the brain and spinal cord; the brain is responsible for the movement of the discriminant action and the spinal cord is responsible for the aggregation of sensory signals and finishing the brain cortex movement area issued by the action instructions and links the various parts of the neural network; it also contains the reflection of this part of the movement.Robots in unknown environments need sensors to detect environmental conditions; after their sensors have measured environmental information, the robots’ controllers can generate decisions to control the robots’ behaviors. In this study, multiple ultrasonic sensors were adopted to measure distances between a robot and the environmental obstacles that surrounded it.In this study, the neural pulse signal of the organism is used as the control structure of the imitation of the electronic circuit, and the information between the main control system and the subcontrol system is integrated. The main control system must transmit the analog signal. The auxiliary control system only needs to transmit the sensed analog signal to the main system and receives the motion instruction given by the main system, and the auxiliary functions of the main system and subsystems are complementary to each other.Multiple sets of ultrasonic distance measurements were used as input to develop an intelligent navigation system. With this distance information, the fuzzy logic controller enabled the robot to safely complete tasks in an unknown environment. An individual ultrasonic sensor is shown in Figure1(a). A photograph of the six-legged robot with an operative sensor array is shown in Figure 1(b). The positions of the distance sensing ultrasonic sensors are shown in Figure 1(c): right (S1), front (S2), left (S3), right front (S4), and left front (S5).Figure 1
Ultrasonic sensing system. (a) Ultrasonic sensor (sourced from Parallax, Inc.). (b) Appearance of the MIAT six-legged robot. (c) Disposition of ultrasonic sensors. (d) Six-foot robot control architecture.
(a)
(b)
(c)
(d)The control system of this study combines the main controller, subcontroller, organization, and computer software. Six-foot robot body uses 18 servo motors, six MCU subcontrollers, UART message transmission, and the main controller of the news, and the design of wireless monitoring equipment, the use of RF module for two-way data transmission, and timely feedback related information and PC are used to analyze the action. You can adjust the six-foot robot in manual mode or automatic mode, which can be used flexibly.The master/slave controller system can communicate with each other through the Bluetooth system and the monitoring system, and the monitoring system can manually operate the six-legged robot manually.Figure2 shows foot movement angle relative relationship [7]; M2 will be disturbed by the M2-M3 mechanism and the M2 motor mechanism; it must be specified within ±40°, to face the adjacent body operation collision damage.Figure 2
Foot movement angle relative relation diagram.M3 mechanism set contact with the ground for the vertical ground 90°, so the M2 and M3 must be the opposite of the servo motor angle; related mechanical joints are as follows:M2-M3 = 57 mm.M2-Machine bottom = 42.7 mm.M3-the ground = 108 mm.L1 = 26.62 mm.H3 = 42.7 mm.H2 =sin⁡θ∗ (M2-M3).H4 = H2 + L3 − H3 =sin⁡θ∗ 57 mm + 108 mm − 42.7 mm.Using the above formula, the design of Figure3 shows the movement angle and displacement of the map were from 0°, 10°, 20°, 30°, 40°, −10°, −20°, −30°, and −40°, for foot control design.Figure 3
Foot movement angle (plus or minus 40 degrees).And then the corresponding H2 and H4 movement angle and displacement volume are as shown in Table1.Table 1
Foot movement data.
θ
H2 (mm)
H4 (mm)
−40°
−36.64
28.66
−35°
−32.69
32.61
−30°
−28.50
36.80
−25°
−24.09
41.21
−20°
−19.50
45.80
−15°
−14.75
50.55
−10°
−9.90
55.40
−5°
−4.97
60.33
0°
0
65.30
5°
4.97
70.27
10°
9.90
75.20
15°
14.75
80.05
20°
19.50
84.80
25°
24.09
89.39
30°
28.50
93.80
35°
32.69
97.99
40°
36.64
101.94Each foot institution is limited to positive and negative 60 degrees as a range of services, such as the six-foot body map shown in Figure4, to avoid the impact of mutual action agencies and to prevent damage to the organization.Figure 4
Six-foot main body.


#### 2.2.1. Design of Obstacle Avoidance

Figure5 shows obstacle avoidance is a priority for a moving robot that must avoid obstacles and prevent collisions. We propose an efficient real-time avoidance system by which robots can avoid obstacles while moving as directed by automatic navigation. The distance information collected from sensors 1, 2, and 3 is used for the ultrasonic sensing system. Using the information about the robot’s surroundings collected from these sensors as input, the proposed fuzzy logic controller generates instructions by which the robot can avoid obstacles.Figure 5
Obstacle avoidance process.Table3 shows the complete obstacle avoidance procedure, in which the robot receives the ultrasonically sensed distances, from front, right, and left sensors, defined as df, dr, dl, respectively. These three distance variables are fed as input into the obstacle avoidance fuzzy controller. The motor control board calculates the velocity of the robot (Ve) and directional angles to be modified (θe). On receiving the output from the fuzzy logic controller, the robot can change its current velocity and navigational directions to avoid any obstacle. Each input to the fuzzy controller is assigned the same membership function (MF), as illustrated in Figure 6(a). The output is shown in Figures 6(b) and 6(c). All the MFs are triangular. The linguistic terms of the input and output are shown in Tables 2 and 3.Table 2
Linguistic terms of the input.
Distance
Linguistic term
0 cm~40 cm
Close (CC)
20 cm~60 cm
Near (NC)
40 cm~80 cm
Far (FC)Table 3
Linguistic terms of the output.
Speed
Steering
No movement (NM)
Forward (FW)
Slow movement (SM)
Turn right (RT)
Medium movement (MM)
Turn left (LT)
Fast movement (BM)
Very fast movement (HM)Figure 6
MF of obstacle avoidance fuzzy controller. (a) MFs of inputsdf, dr, and dl. (b) MF of output θe; (c) MF of output Ve.
(a)
(b)
(c)For the real-world robot, the widely known max–min operation was used in the fuzzy inference, and the center-of-gravity method was adopted in fuzzification. Regarding the fuzzy rule database, the researchers’ experience and knowledge of partially successful attempts were utilized to build relevant rules, as shown in Table4.Table 4
Obstacle avoidance fuzzy controller rules.
Rule(s)
Input(s)C: close; N: near; F: far
Output(s)
S1
S2
S3
Speed
Steering
(1)
C
C
C
NM
LT
(2)
C
C
N
NM
LT
(3)
C
C
F
NM
LT
(4)
C
N
C
NM
FW
(5)
C
N
N
NM
LT
(6)
C
N
F
NM
LT
(7)
C
F
C
NM
FW
(8)
C
F
N
NM
FW
(9)
C
F
F
BM
FW
(10)
N
C
C
NM
RT
(11)
N
C
N
SM
RT
(12)
N
C
F
MM
LT
(13)
N
N
C
MM
FW
(14)
N
N
N
BM
FW
(15)
N
N
F
HM
LT
(16)
N
F
C
HM
FW
(17)
N
F
N
BM
FW
(18)
N
F
F
BM
FW
(19)
F
C
C
NM
RT
(20)
F
C
N
NM
RT
(21)
F
C
F
HM
RT
(22)
F
N
C
SM
RT
(23)
F
N
N
MM
FW
(24)
F
N
F
MM
FW
(25)
F
F
C
SM
FW
(26)
F
F
N
BM
FW
(27)
F
F
F
HM
FW


#### 2.2.2. Wall Following

The robot can follow walls, thus enabling it to walk along the boundaries of the testing environment. The operational definition is “motion in a direction parallel to the nearest wall at a consistent distance from that wall.” The procedure for wall following is illustrated in Figure7.Figure 7
Wall following procedure.The right and left ultrasonic sensors (S1 and S2 in Figure1) are used to detect the side distances of the robot, defined as dr and dl, respectively. The sensing system first judges which side is closer to the robot and chooses the distance to the nearest side as the baseline, enabling the robot to move along the nearest wall. The robot evaluates its current location against that in the previous cycle (farther from or nearer to the side wall). If the distance in the current cycle is longer than that in the previous cycle, it signifies that the robot has moved farther away from the wall. Therefore, the robot must turn toward the wall. Conversely, a shorter distance in this cycle than that in the previous cycle means that the robot has moved closer to the wall. In such a case, the robot must turn away from the wall. The difference between the wall distances in the two cycles (de) is then taken as one of the inputs to the fuzzy logic controller. The other input is the velocity of the robot (Vc). A relatively fast velocity means that the robot has gained considerable speed by moving away from or closer to the wall, thus requiring more angular modifications, and vice versa.Figure8 illustrates the wall following behavior. In Case A, the robot first detects a shorter distance from the left wall and moves along it. Because the robot’s motion is parallel to the wall, the robot-wall distance differences in the two cycles should be zero, thus requiring no angular modification. In Case B, the robot begins to deviate from the left wall; thus, the robot-wall distance difference between the two cycles should increase. Using the distance difference and the current velocity as inputs to the fuzzy logic controller, a turning angle θe toward the wall can be obtained, enabling the robot to turn toward the wall and return to correct the wall following behavior.Figure 8
Illustration of wall following.The MFs of the wall following input are illustrated in Figures9(a) and 9(b). The MF of the output is shown in Figure 9(c). All the MFs are obtained as triangles. The linguistic terms of the input and the output are shown in Table 5. The widely known max–min operation is used in fuzzy inference and the center-of-gravity method is adopted for fuzzification. The wall following fuzzy controller rules are shown in Table 6.Table 5
Linguistic terms of the input and output.
Difference of distance
Velocity
Angle
Small
Slow
Small
Medium
Medium
Medium
Large
Fast
LargeTable 6
Wall following fuzzy controller rules.
Rule(s)
If
Then
d
e
V
c
θ
e
(1)
Small
Slow
Small
(2)
Small
Medium
Small
(3)
Small
Fast
Medium
(4)
Medium
Slow
Medium
(5)
Medium
Medium
Medium
(6)
Medium
Fast
Large
(7)
Large
Slow
Large
(8)
Large
Medium
Large
(9)
Large
Fast
LargeFigure 9
MF of wall following fuzzy controller. (a) MFs of inputde. (b) MF of input Vc. (c) MF of output θe.
(a)
(b)
(c)


## 2.1. Behavior of Bionic Robots

The term “bionic robots” refers to robots that mimic the body structures, functions, problem-solving behavior, and motions of living creatures, with simple mechanical structures or electronic devices. Multilegged bionic robots belong to this category; their motion patterns and tread movements resemble those of insects and spiders. Such a robot uses each leg, with its embedded multiple rotational joints, to mimic the behavioral patterns of insects. Among such robots, the six-legged type is the most common type of bionic robot.


## 2.2. Applying Fuzzy Controller in Obstacle Avoiding

The central nervous system contains the brain and spinal cord; the brain is responsible for the movement of the discriminant action and the spinal cord is responsible for the aggregation of sensory signals and finishing the brain cortex movement area issued by the action instructions and links the various parts of the neural network; it also contains the reflection of this part of the movement.Robots in unknown environments need sensors to detect environmental conditions; after their sensors have measured environmental information, the robots’ controllers can generate decisions to control the robots’ behaviors. In this study, multiple ultrasonic sensors were adopted to measure distances between a robot and the environmental obstacles that surrounded it.In this study, the neural pulse signal of the organism is used as the control structure of the imitation of the electronic circuit, and the information between the main control system and the subcontrol system is integrated. The main control system must transmit the analog signal. The auxiliary control system only needs to transmit the sensed analog signal to the main system and receives the motion instruction given by the main system, and the auxiliary functions of the main system and subsystems are complementary to each other.Multiple sets of ultrasonic distance measurements were used as input to develop an intelligent navigation system. With this distance information, the fuzzy logic controller enabled the robot to safely complete tasks in an unknown environment. An individual ultrasonic sensor is shown in Figure1(a). A photograph of the six-legged robot with an operative sensor array is shown in Figure 1(b). The positions of the distance sensing ultrasonic sensors are shown in Figure 1(c): right (S1), front (S2), left (S3), right front (S4), and left front (S5).Figure 1
Ultrasonic sensing system. (a) Ultrasonic sensor (sourced from Parallax, Inc.). (b) Appearance of the MIAT six-legged robot. (c) Disposition of ultrasonic sensors. (d) Six-foot robot control architecture.
(a)
(b)
(c)
(d)The control system of this study combines the main controller, subcontroller, organization, and computer software. Six-foot robot body uses 18 servo motors, six MCU subcontrollers, UART message transmission, and the main controller of the news, and the design of wireless monitoring equipment, the use of RF module for two-way data transmission, and timely feedback related information and PC are used to analyze the action. You can adjust the six-foot robot in manual mode or automatic mode, which can be used flexibly.The master/slave controller system can communicate with each other through the Bluetooth system and the monitoring system, and the monitoring system can manually operate the six-legged robot manually.Figure2 shows foot movement angle relative relationship [7]; M2 will be disturbed by the M2-M3 mechanism and the M2 motor mechanism; it must be specified within ±40°, to face the adjacent body operation collision damage.Figure 2
Foot movement angle relative relation diagram.M3 mechanism set contact with the ground for the vertical ground 90°, so the M2 and M3 must be the opposite of the servo motor angle; related mechanical joints are as follows:M2-M3 = 57 mm.M2-Machine bottom = 42.7 mm.M3-the ground = 108 mm.L1 = 26.62 mm.H3 = 42.7 mm.H2 =sin⁡θ∗ (M2-M3).H4 = H2 + L3 − H3 =sin⁡θ∗ 57 mm + 108 mm − 42.7 mm.Using the above formula, the design of Figure3 shows the movement angle and displacement of the map were from 0°, 10°, 20°, 30°, 40°, −10°, −20°, −30°, and −40°, for foot control design.Figure 3
Foot movement angle (plus or minus 40 degrees).And then the corresponding H2 and H4 movement angle and displacement volume are as shown in Table1.Table 1
Foot movement data.
θ
H2 (mm)
H4 (mm)
−40°
−36.64
28.66
−35°
−32.69
32.61
−30°
−28.50
36.80
−25°
−24.09
41.21
−20°
−19.50
45.80
−15°
−14.75
50.55
−10°
−9.90
55.40
−5°
−4.97
60.33
0°
0
65.30
5°
4.97
70.27
10°
9.90
75.20
15°
14.75
80.05
20°
19.50
84.80
25°
24.09
89.39
30°
28.50
93.80
35°
32.69
97.99
40°
36.64
101.94Each foot institution is limited to positive and negative 60 degrees as a range of services, such as the six-foot body map shown in Figure4, to avoid the impact of mutual action agencies and to prevent damage to the organization.Figure 4
Six-foot main body.


### 2.2.1. Design of Obstacle Avoidance

Figure5 shows obstacle avoidance is a priority for a moving robot that must avoid obstacles and prevent collisions. We propose an efficient real-time avoidance system by which robots can avoid obstacles while moving as directed by automatic navigation. The distance information collected from sensors 1, 2, and 3 is used for the ultrasonic sensing system. Using the information about the robot’s surroundings collected from these sensors as input, the proposed fuzzy logic controller generates instructions by which the robot can avoid obstacles.Figure 5
Obstacle avoidance process.Table3 shows the complete obstacle avoidance procedure, in which the robot receives the ultrasonically sensed distances, from front, right, and left sensors, defined as df, dr, dl, respectively. These three distance variables are fed as input into the obstacle avoidance fuzzy controller. The motor control board calculates the velocity of the robot (Ve) and directional angles to be modified (θe). On receiving the output from the fuzzy logic controller, the robot can change its current velocity and navigational directions to avoid any obstacle. Each input to the fuzzy controller is assigned the same membership function (MF), as illustrated in Figure 6(a). The output is shown in Figures 6(b) and 6(c). All the MFs are triangular. The linguistic terms of the input and output are shown in Tables 2 and 3.Table 2
Linguistic terms of the input.
Distance
Linguistic term
0 cm~40 cm
Close (CC)
20 cm~60 cm
Near (NC)
40 cm~80 cm
Far (FC)Table 3
Linguistic terms of the output.
Speed
Steering
No movement (NM)
Forward (FW)
Slow movement (SM)
Turn right (RT)
Medium movement (MM)
Turn left (LT)
Fast movement (BM)
Very fast movement (HM)Figure 6
MF of obstacle avoidance fuzzy controller. (a) MFs of inputsdf, dr, and dl. (b) MF of output θe; (c) MF of output Ve.
(a)
(b)
(c)For the real-world robot, the widely known max–min operation was used in the fuzzy inference, and the center-of-gravity method was adopted in fuzzification. Regarding the fuzzy rule database, the researchers’ experience and knowledge of partially successful attempts were utilized to build relevant rules, as shown in Table4.Table 4
Obstacle avoidance fuzzy controller rules.
Rule(s)
Input(s)C: close; N: near; F: far
Output(s)
S1
S2
S3
Speed
Steering
(1)
C
C
C
NM
LT
(2)
C
C
N
NM
LT
(3)
C
C
F
NM
LT
(4)
C
N
C
NM
FW
(5)
C
N
N
NM
LT
(6)
C
N
F
NM
LT
(7)
C
F
C
NM
FW
(8)
C
F
N
NM
FW
(9)
C
F
F
BM
FW
(10)
N
C
C
NM
RT
(11)
N
C
N
SM
RT
(12)
N
C
F
MM
LT
(13)
N
N
C
MM
FW
(14)
N
N
N
BM
FW
(15)
N
N
F
HM
LT
(16)
N
F
C
HM
FW
(17)
N
F
N
BM
FW
(18)
N
F
F
BM
FW
(19)
F
C
C
NM
RT
(20)
F
C
N
NM
RT
(21)
F
C
F
HM
RT
(22)
F
N
C
SM
RT
(23)
F
N
N
MM
FW
(24)
F
N
F
MM
FW
(25)
F
F
C
SM
FW
(26)
F
F
N
BM
FW
(27)
F
F
F
HM
FW


### 2.2.2. Wall Following

The robot can follow walls, thus enabling it to walk along the boundaries of the testing environment. The operational definition is “motion in a direction parallel to the nearest wall at a consistent distance from that wall.” The procedure for wall following is illustrated in Figure7.Figure 7
Wall following procedure.The right and left ultrasonic sensors (S1 and S2 in Figure1) are used to detect the side distances of the robot, defined as dr and dl, respectively. The sensing system first judges which side is closer to the robot and chooses the distance to the nearest side as the baseline, enabling the robot to move along the nearest wall. The robot evaluates its current location against that in the previous cycle (farther from or nearer to the side wall). If the distance in the current cycle is longer than that in the previous cycle, it signifies that the robot has moved farther away from the wall. Therefore, the robot must turn toward the wall. Conversely, a shorter distance in this cycle than that in the previous cycle means that the robot has moved closer to the wall. In such a case, the robot must turn away from the wall. The difference between the wall distances in the two cycles (de) is then taken as one of the inputs to the fuzzy logic controller. The other input is the velocity of the robot (Vc). A relatively fast velocity means that the robot has gained considerable speed by moving away from or closer to the wall, thus requiring more angular modifications, and vice versa.Figure8 illustrates the wall following behavior. In Case A, the robot first detects a shorter distance from the left wall and moves along it. Because the robot’s motion is parallel to the wall, the robot-wall distance differences in the two cycles should be zero, thus requiring no angular modification. In Case B, the robot begins to deviate from the left wall; thus, the robot-wall distance difference between the two cycles should increase. Using the distance difference and the current velocity as inputs to the fuzzy logic controller, a turning angle θe toward the wall can be obtained, enabling the robot to turn toward the wall and return to correct the wall following behavior.Figure 8
Illustration of wall following.The MFs of the wall following input are illustrated in Figures9(a) and 9(b). The MF of the output is shown in Figure 9(c). All the MFs are obtained as triangles. The linguistic terms of the input and the output are shown in Table 5. The widely known max–min operation is used in fuzzy inference and the center-of-gravity method is adopted for fuzzification. The wall following fuzzy controller rules are shown in Table 6.Table 5
Linguistic terms of the input and output.
Difference of distance
Velocity
Angle
Small
Slow
Small
Medium
Medium
Medium
Large
Fast
LargeTable 6
Wall following fuzzy controller rules.
Rule(s)
If
Then
d
e
V
c
θ
e
(1)
Small
Slow
Small
(2)
Small
Medium
Small
(3)
Small
Fast
Medium
(4)
Medium
Slow
Medium
(5)
Medium
Medium
Medium
(6)
Medium
Fast
Large
(7)
Large
Slow
Large
(8)
Large
Medium
Large
(9)
Large
Fast
LargeFigure 9
MF of wall following fuzzy controller. (a) MFs of inputde. (b) MF of input Vc. (c) MF of output θe.
(a)
(b)
(c)


## 2.2.1. Design of Obstacle Avoidance

Figure5 shows obstacle avoidance is a priority for a moving robot that must avoid obstacles and prevent collisions. We propose an efficient real-time avoidance system by which robots can avoid obstacles while moving as directed by automatic navigation. The distance information collected from sensors 1, 2, and 3 is used for the ultrasonic sensing system. Using the information about the robot’s surroundings collected from these sensors as input, the proposed fuzzy logic controller generates instructions by which the robot can avoid obstacles.Figure 5
Obstacle avoidance process.Table3 shows the complete obstacle avoidance procedure, in which the robot receives the ultrasonically sensed distances, from front, right, and left sensors, defined as df, dr, dl, respectively. These three distance variables are fed as input into the obstacle avoidance fuzzy controller. The motor control board calculates the velocity of the robot (Ve) and directional angles to be modified (θe). On receiving the output from the fuzzy logic controller, the robot can change its current velocity and navigational directions to avoid any obstacle. Each input to the fuzzy controller is assigned the same membership function (MF), as illustrated in Figure 6(a). The output is shown in Figures 6(b) and 6(c). All the MFs are triangular. The linguistic terms of the input and output are shown in Tables 2 and 3.Table 2
Linguistic terms of the input.
Distance
Linguistic term
0 cm~40 cm
Close (CC)
20 cm~60 cm
Near (NC)
40 cm~80 cm
Far (FC)Table 3
Linguistic terms of the output.
Speed
Steering
No movement (NM)
Forward (FW)
Slow movement (SM)
Turn right (RT)
Medium movement (MM)
Turn left (LT)
Fast movement (BM)
Very fast movement (HM)Figure 6
MF of obstacle avoidance fuzzy controller. (a) MFs of inputsdf, dr, and dl. (b) MF of output θe; (c) MF of output Ve.
(a)
(b)
(c)For the real-world robot, the widely known max–min operation was used in the fuzzy inference, and the center-of-gravity method was adopted in fuzzification. Regarding the fuzzy rule database, the researchers’ experience and knowledge of partially successful attempts were utilized to build relevant rules, as shown in Table4.Table 4
Obstacle avoidance fuzzy controller rules.
Rule(s)
Input(s)C: close; N: near; F: far
Output(s)
S1
S2
S3
Speed
Steering
(1)
C
C
C
NM
LT
(2)
C
C
N
NM
LT
(3)
C
C
F
NM
LT
(4)
C
N
C
NM
FW
(5)
C
N
N
NM
LT
(6)
C
N
F
NM
LT
(7)
C
F
C
NM
FW
(8)
C
F
N
NM
FW
(9)
C
F
F
BM
FW
(10)
N
C
C
NM
RT
(11)
N
C
N
SM
RT
(12)
N
C
F
MM
LT
(13)
N
N
C
MM
FW
(14)
N
N
N
BM
FW
(15)
N
N
F
HM
LT
(16)
N
F
C
HM
FW
(17)
N
F
N
BM
FW
(18)
N
F
F
BM
FW
(19)
F
C
C
NM
RT
(20)
F
C
N
NM
RT
(21)
F
C
F
HM
RT
(22)
F
N
C
SM
RT
(23)
F
N
N
MM
FW
(24)
F
N
F
MM
FW
(25)
F
F
C
SM
FW
(26)
F
F
N
BM
FW
(27)
F
F
F
HM
FW


## 2.2.2. Wall Following

The robot can follow walls, thus enabling it to walk along the boundaries of the testing environment. The operational definition is “motion in a direction parallel to the nearest wall at a consistent distance from that wall.” The procedure for wall following is illustrated in Figure7.Figure 7
Wall following procedure.The right and left ultrasonic sensors (S1 and S2 in Figure1) are used to detect the side distances of the robot, defined as dr and dl, respectively. The sensing system first judges which side is closer to the robot and chooses the distance to the nearest side as the baseline, enabling the robot to move along the nearest wall. The robot evaluates its current location against that in the previous cycle (farther from or nearer to the side wall). If the distance in the current cycle is longer than that in the previous cycle, it signifies that the robot has moved farther away from the wall. Therefore, the robot must turn toward the wall. Conversely, a shorter distance in this cycle than that in the previous cycle means that the robot has moved closer to the wall. In such a case, the robot must turn away from the wall. The difference between the wall distances in the two cycles (de) is then taken as one of the inputs to the fuzzy logic controller. The other input is the velocity of the robot (Vc). A relatively fast velocity means that the robot has gained considerable speed by moving away from or closer to the wall, thus requiring more angular modifications, and vice versa.Figure8 illustrates the wall following behavior. In Case A, the robot first detects a shorter distance from the left wall and moves along it. Because the robot’s motion is parallel to the wall, the robot-wall distance differences in the two cycles should be zero, thus requiring no angular modification. In Case B, the robot begins to deviate from the left wall; thus, the robot-wall distance difference between the two cycles should increase. Using the distance difference and the current velocity as inputs to the fuzzy logic controller, a turning angle θe toward the wall can be obtained, enabling the robot to turn toward the wall and return to correct the wall following behavior.Figure 8
Illustration of wall following.The MFs of the wall following input are illustrated in Figures9(a) and 9(b). The MF of the output is shown in Figure 9(c). All the MFs are obtained as triangles. The linguistic terms of the input and the output are shown in Table 5. The widely known max–min operation is used in fuzzy inference and the center-of-gravity method is adopted for fuzzification. The wall following fuzzy controller rules are shown in Table 6.Table 5
Linguistic terms of the input and output.
Difference of distance
Velocity
Angle
Small
Slow
Small
Medium
Medium
Medium
Large
Fast
LargeTable 6
Wall following fuzzy controller rules.
Rule(s)
If
Then
d
e
V
c
θ
e
(1)
Small
Slow
Small
(2)
Small
Medium
Small
(3)
Small
Fast
Medium
(4)
Medium
Slow
Medium
(5)
Medium
Medium
Medium
(6)
Medium
Fast
Large
(7)
Large
Slow
Large
(8)
Large
Medium
Large
(9)
Large
Fast
LargeFigure 9
MF of wall following fuzzy controller. (a) MFs of inputde. (b) MF of input Vc. (c) MF of output θe.
(a)
(b)
(c)


## 3. Experiments and Results

In this study, we designed a total of 18 servo motors of six feet as the induction unit of the neural current, combined with the fuzzy ultrasonic controller, six angles of the design, through the three-foot system for the neural current sensing control. The judgment of the stability and the identification of the obstacle in front of the ultrasonic wave are described below. The following describes the control system. The walking state of the six-legged robot is the ratio of the height to the time of the six-legged robot shown in Figure10, and the center of the body is highly displaced.Figure 10
The height state of the six-legged robot when moving.Figure11 shows the six-legged robotic gait diagram showing the footsteps of the left and right sides of the six-legged robot, and the footsteps of the six-foot robots are located on the ground.Figure 11
Six-foot robots gait.


### 3.1. The Experiment

After the robot’s bionic behavior controlling chip was designed and implemented, the chip was installed in a real robot for function verification and performance analysis. The hardware comprised a field programmable gate array board, motor control board, and a six-legged robot, as shown in Figure1(b).


### 3.2. Experiment of the Robot’s Bionic Controlling Behavior

Scenario 1: Obstacle Avoidance. The purpose of this experiment was to examine whether the proposed navigation system could successfully lead the robot to avoid obstacles. The path was 1 m wide, and the width of the obstacle (a rectangular solid) was 20 cm. As shown in Figure 12, the robot first moved upward following instructions from the developed fuzzy database. While moving, the robot detected objects on both its sides at Point A but continued to move forward because the distance ahead was still considerable. The robot detected an object close ahead and a wall blocking its right side when it reached Point B. Immediately, the fuzzy logic controller responded with a left turn. At Point C, obstacles were present at the front and on the left side. The obstacle on the right side was farther away; therefore, the fuzzy logic controller responded with a right turn. With no further obstacles lying ahead, the robot continued moving forward. The real experiment is illustrated in Figure 13.Figure 12
Moving path of Scenario 1.Figure 13
Real experiment of Scenario 1.Scenario 2: Dead End with Three Surrounding Walls. The purpose of this experiment was to examine whether the robot could make its way out of a dead end. The dead end was 50 cm wide, as shown in Figure 14. The robot moved forward, following instructions from the developed fuzzy database. As it moved, it detected objects on both sides at Point A. However, it continued moving forward because there was a considerable expanse of empty space before it. At Point B, the robot then detected an object that obstructed its forward path and a wall blocking its right side. Immediately, the fuzzy logic controller responded with a left turn. At Point C, the obstacles appeared at the front and on the left side. The obstacle to the left side was more distant; thus the fuzzy controller ordered a left turn. At Point D, the robot turned left because no obstacles were found on the left. After the robot had turned, it found no further obstacles lying ahead and continued to move forward. The real experiment is shown in Figure 15.Figure 14
Moving path of Scenario 2.Figure 15
Real experiment of Scenario 2.Scenario 3: Wall Following and Obstacle Avoidance. This experiment tested whether the proposed navigation system correctly integrated wall following, obstacle avoidance, and target tracing. As shown in Figure 16, the wall was 60 cm long, and the obstacle (a rectangular solid) was 20 cm wide. At Point A, the robot calculated that its conditions called for a wall following behavior. At Point B, the robot deviated gradually from the wall, and the fuzzy controller modified the robot’s direction away from the wall. At Point C, the robot detected obstacles at its front and on its left side. In the proposed integrated system, obstacle avoidance has higher priority than wall following does; the fuzzy controller ordered a right turn, and the robot turned right and performed obstacle avoidance. The real experiment is shown in Figure 17.Figure 16
Moving path of Scenario 3.Figure 17
Real experiment of Scenario 3.


### 3.3. Discussion

In the current study, a real robot was tested; the accuracy levels of its intelligent behavioral functions were verified. Thus, three scenarios were designed to examine the robot’s bionic behaviors. The results reveal that the proposed fuzzy logic controller enabled the robot to perform in complex environments and to demonstrate intelligent behaviors. The robot was designed for bionic functions; its performance demonstrated those bionic functions.


## 3.1. The Experiment

After the robot’s bionic behavior controlling chip was designed and implemented, the chip was installed in a real robot for function verification and performance analysis. The hardware comprised a field programmable gate array board, motor control board, and a six-legged robot, as shown in Figure1(b).


## 3.2. Experiment of the Robot’s Bionic Controlling Behavior

Scenario 1: Obstacle Avoidance. The purpose of this experiment was to examine whether the proposed navigation system could successfully lead the robot to avoid obstacles. The path was 1 m wide, and the width of the obstacle (a rectangular solid) was 20 cm. As shown in Figure 12, the robot first moved upward following instructions from the developed fuzzy database. While moving, the robot detected objects on both its sides at Point A but continued to move forward because the distance ahead was still considerable. The robot detected an object close ahead and a wall blocking its right side when it reached Point B. Immediately, the fuzzy logic controller responded with a left turn. At Point C, obstacles were present at the front and on the left side. The obstacle on the right side was farther away; therefore, the fuzzy logic controller responded with a right turn. With no further obstacles lying ahead, the robot continued moving forward. The real experiment is illustrated in Figure 13.Figure 12
Moving path of Scenario 1.Figure 13
Real experiment of Scenario 1.Scenario 2: Dead End with Three Surrounding Walls. The purpose of this experiment was to examine whether the robot could make its way out of a dead end. The dead end was 50 cm wide, as shown in Figure 14. The robot moved forward, following instructions from the developed fuzzy database. As it moved, it detected objects on both sides at Point A. However, it continued moving forward because there was a considerable expanse of empty space before it. At Point B, the robot then detected an object that obstructed its forward path and a wall blocking its right side. Immediately, the fuzzy logic controller responded with a left turn. At Point C, the obstacles appeared at the front and on the left side. The obstacle to the left side was more distant; thus the fuzzy controller ordered a left turn. At Point D, the robot turned left because no obstacles were found on the left. After the robot had turned, it found no further obstacles lying ahead and continued to move forward. The real experiment is shown in Figure 15.Figure 14
Moving path of Scenario 2.Figure 15
Real experiment of Scenario 2.Scenario 3: Wall Following and Obstacle Avoidance. This experiment tested whether the proposed navigation system correctly integrated wall following, obstacle avoidance, and target tracing. As shown in Figure 16, the wall was 60 cm long, and the obstacle (a rectangular solid) was 20 cm wide. At Point A, the robot calculated that its conditions called for a wall following behavior. At Point B, the robot deviated gradually from the wall, and the fuzzy controller modified the robot’s direction away from the wall. At Point C, the robot detected obstacles at its front and on its left side. In the proposed integrated system, obstacle avoidance has higher priority than wall following does; the fuzzy controller ordered a right turn, and the robot turned right and performed obstacle avoidance. The real experiment is shown in Figure 17.Figure 16
Moving path of Scenario 3.Figure 17
Real experiment of Scenario 3.


## 3.3. Discussion

In the current study, a real robot was tested; the accuracy levels of its intelligent behavioral functions were verified. Thus, three scenarios were designed to examine the robot’s bionic behaviors. The results reveal that the proposed fuzzy logic controller enabled the robot to perform in complex environments and to demonstrate intelligent behaviors. The robot was designed for bionic functions; its performance demonstrated those bionic functions.


## 4. Conclusions

The current study, with fuzzy control as its core, proposes control methods for intelligent behaviors such as obstacle avoidance, wall following, and attack. The system integrates three control methods within an inclusive structure that can be used for further development of bionic behavior controllers for intelligent robots.In this study, the controller platform is established to determine whether the surrounding environment is suitable for walking through the most basic bio-current signal and discrete event control through the most primitive and consistent simulation of the organism. In the robot’s reflex movement which is directly used for environmental interaction, this method can let the six-legged robot know the front path of obstacles and quickly take action to avoid unnecessary collision; the future can use GPS, gyroscope, pressure sensors, temperature and humidity sensors, and infrared sensors, increasing fusion sensing in the system, so that, overall, it is more perfect.In the system of signal transmission, we use the simplest 8-bit transmission to significantly reduce the chip computing, reduce system load, as far as possible in a short time to resolve and control the system, so that the signal from the main system to the subcontroller can be immediately transferred. This method allows the system time to deal with not only other major messages to judge, but also the least information for the most effective signal processing, and to be closer to the simulation of biological movement structure.In the study of the structure of the robot, the behavior can be smoother, real-time to achieve effective steering behavior, dodge behavior; these have a high degree of evolution, functional verification, and system analysis; we have established three situations, dodge obstacles, to avoid the dead end and walking in a wall of space; the results show that the proposed fuzzy logic controller is able to successfully guide the robot behavior with the autonomous model.



---

*Source: 8984713-2017-09-27.xml*