Keywords

7.1 Introduction

With the continuous development of intelligent robotics research, mobile robot control problem attracts increasing attention, and has become a hotspot in this area. Based on kinematic model with pole method, a path tracking control method [1] was proposed by making the path following error below an adjustable threshold limit to achieve more precise path following control. With backstepping method, an underwater robots tracking control [2] was provided in the presence of disturbances to overcome the problem of defining the initial conditions. As for the problem of multi-wheeled robot path following, using linearization method to achieve the robot kinematics model, a lateral position tracking control scheme and longitudinal path following with using classical correction [3] are given. A nonlinear feedback control scheme [4] was proposed with a hydrodynamic parameter identification scheme based on the integral form of a closed-loop control.

Fuzzy control is a method to imitate the way humans think, through the establishment of mathematical models and rule bases. Fuzzy control was applied to many robot jobs combined with a variety of algorithms [5, 6] in complex and unknown environment. Using genetic algorithms to optimize the width and central value of the parameter membership function, an offline self-optimization scheme [7] was obtained. For the security and path match issue of robot soccer, a fuzzy control method [8] was combined to improve the accuracy of path planning to modify potential field function, the angle of potential field force, and timely adjustment potential field repulsion. For local minima problems in artificial potential field method, the repulsion gain coefficient [9] was given to describe the importance of obstacles around the robot. Based on the adjacent angle between the robot and the fellowship, three types of fuzzy controllers [10] were employed to achieve local coordination between robots. An adaptive fuzzy neural network [11] was employed to realize the real-time online adjustment of the pre-aiming direction of the mobile robot based on output perturbation angle.

For expected path following circumference type path, this paper presents a hierarchical fuzzy control program based on different fuzzy grain sizes. The upper level focuses on the behavior decision, while the lower level completes a fuzzy control of action. By employing fine grain fuzzy division for rotation angle and speed of a robot, a more accurate desired path following can be achieved. Considering the urgency requirement of obstacle avoidance, an effective obstacle avoidance strategy with coarse-grained fuzzy division is proposed.

7.2 Problem Description

Located in the global coordinate system XOY, suppose that the pose coordinates of a robot R at the \( t_{n} \) time is \( \left( {x\left( {t_{n} } \right),y\left( {t_{n} } \right),\psi \left( {t_{n} } \right)} \right),\,\overrightarrow {v} \) is speed with forward direction of the robot R, and \( \psi \) is the angle between \( \overrightarrow {v} \) and X ax. At the same time, assume the first \( i \) discrete points of the expected following path is \( P_{d} (i) = [x_{i} ,y_{i} ,\zeta_{i} ]^{T} \), where \( \zeta_{i} \) is the angle between the desired direction of movement (i.e., tangential direction t the point \( P_{d} (i) \)), \( i = 1,2 \ldots n \), \( n \) is the number of discrete points. So, the expected following path can be expressed as a sequence of discrete points \( \left\{ {P_{d} \left( 1 \right),P_{d} \left( 2 \right) \ldots P_{d} \left( n \right)} \right\} \). And assuming the sensor detection range of the robot is [0, D], D is the maximum detection distance of sensors. To achieve the control of expected path following, the relationship between robot R and the expected following path of the circumference is shown in Fig. 7.1.

Fig. 7.1
figure 1

Relationship between robot R and the expected following path

Assume that the discrete-time kinematic model of the robot R is

$$ \left\{ \begin{aligned} x\left( {t_{n + 1} } \right) = & \, x\left( {t_{n} } \right) + Tv\left( {t_{n} } \right)\cos \psi \left( {t_{n} } \right) \\ y\left( {t_{n + 1} } \right) = & \, y\left( {t_{n} } \right) + Tv\left( {t_{n} } \right)\sin \psi \left( {t_{n} } \right) \\ \psi \left( {t_{n + 1} } \right) = & \, \psi \left( {t_{n} } \right) +\Delta \psi \left( {t_{n} } \right) \\ \end{aligned} \right. $$
(7.1)

where T is the sampling period, \( v \) represents the linear velocity, \( \Delta \psi \) represents the deflection angle. \( \Delta \psi \) is defined as \( \Delta \varphi \) when the robot was on the expected following path, and \( \Delta \psi\) is defined as \( \Delta \theta \) when avoiding an obstacle.

7.3 Fuzzy Control Scheme

As different accuracies are required for different behaviors during the path following movement of the robot, two different fuzzy grain sizes are designed to make fuzzy partition and fuzzy rules. To achieve more accurate path following when the robot moves onto the expected path, fine grain size strategy is employed in the fuzzy partition and the design of the fuzzy rules. But when there is obstacle avoidance in some instances, the primary task of robot is to avoid round static obstacles effectively; with relatively lower requirement of accuracy, fuzzy coarse-grained scheme is utilized. In this paper, two-level hierarchical fuzzy control scheme is proposed.

7.3.1 Fine Grains with Fuzzy Path Following

Here, the first discussion is on fine-grained control strategy in the scenario that robot R moves from outside of the desired path to a nearest discrete point \( P_{d} (i) \). Assume the distance between the robot R and a discrete point \( P_{d} (i) \) is \( d \) at \( t_{n} \), the angle between the direction of robot R and the tangential direction at \( P_{d} (i) \) is \( \varphi \), and the direction of movement of robot R at \( P_{d} (i) \) is tangential direction of \( P_{d} (i) \). Moreover, \( \Delta \varphi \) is defined as the deflection angle at \( t_{n} \) when R arrives at \( P_{d} (i) \) smoothly and finally to follow the desired direction shown in Fig. 7.2.

Fig. 7.2
figure 2

The angle of \( \varphi \) and \( \Delta \varphi \)

Now fine-grained fuzzy partition and fuzzy rules design of \( d \) and \( \varphi \) to achieve the control value of \( v \) and \( \Delta \varphi \). Assume the robot R moves to a discrete point \( P_{d} (i) \) with its desired speed direction. Suppose the basic domain of \( d \) is \( [0,\overline{D} ] \), using fuzzy set VN, QN, N, QF, and VF. The basic domain of \( \varphi \) is \( [0^{ \circ } ,180^{ \circ } ] \), with the fuzzy set VS, S, N, B, and VB. In this paper, the basic domain of speed \( v \) for the robot R is [0, 0.3], and the basic domain of deflection \( \Delta \varphi \) is \( [0^{ \circ } ,90^{ \circ } ] \), with the fuzzy set VS, S, N, B, and VB. The membership functions of \( d \), \( \varphi \), \( v \), \( \Delta \varphi \) are shown in Fig. 7.3, respectively.

Fig. 7.3
figure 3

The membership functions of \( d \), \( \varphi \), \( v \), and \( \Delta \varphi \)

According to \( d \) and \( \varphi \), to design the fuzzy rule table to control the speed \( v \) and the deflection angle \( \Delta \varphi \) of the robot R, shown in Tables 7.1 and 7.2. Using Mamdani inference method and height defuzzification method, the solution of defuzzification of the speed \( v \) and the deflection angle \( \Delta \varphi \) are as follows:

Table 7.1 The fuzzy rule of speed \( v \)
Table 7.2 The fuzzy rule of deflection \( \Delta \varphi \)
$$v = \sum\limits_{{k,i}} {\left[ {u_{\varphi }^{k} \left( x \right) \wedge u_{d}^{i} \left( y \right)u_{v}^{{}} } \right]} /\sum\limits_{{k,i}} {\left[ {u_{\varphi }^{k} \left( x \right) \wedge u_{{d_{{}} }}^{i} \left( y \right)} \right]} $$
(7.2)
$$\Delta \varphi = \sum\limits_{{k,i}} {[u_{\varphi }^{k} \left( x \right) \wedge u_{d}^{i} \left( y \right)]u_{{\Delta \varphi }} /\sum\limits_{{k,i}} {[u_{\varphi }^{k} \left( x \right) \wedge u_{{d_{{}} }}^{i} \left( y \right)]} } $$
(7.3)

where \( u_{\varphi }^{k} \left( x \right) \) is the membership degree of \( \varphi \), \( u_{d}^{i} \left( y \right) \) is the membership degree of \( d \), \( u_{v} \) is a membership function corresponding to the peak value of \( v \), and \( u_{{\Delta \varphi }} \) is a membership function corresponding to the peak value of \( \Delta \varphi \). The range set of \( k \) is {VS, S, N, B, VB}, the set of \( i \) is {VN, QN, N, QF, VF}.

Here to observe fine-grained control performance with \( d = 1.2 \) and \( \varphi = 100^{ \circ } \), where the fuzzy rules are triggered as follows. When \( d \) is QN and \( \varphi \) is N, \( v \) is S and \( \Delta \varphi \) is N. When \( d \) is QN and \( \varphi \) is B, \( v \) is VS and the \( \Delta \varphi \) is B. When \( d \) is N and \( \varphi \) is N, \( v \) is S and \( \Delta \varphi \) is B. When \( d \) is N and \( \varphi \) is B, \( v \) is S and \( \Delta \varphi \) is B. Its Mamdani inference processes are shown from Figs. 7.4, 7.5, 7.6 and 7.7.

Fig. 7.4
figure 4

The first trigger fuzzy rules corresponding membership

Fig. 7.5
figure 5

The second trigger fuzzy rules corresponding membership

Fig. 7.6
figure 6

The third trigger fuzzy rules corresponding membership

Fig. 7.7
figure 7

The fourth trigger fuzzy rules corresponding membership

According to the Mamdani reasoning, four fuzzy rules have been triggered in \( d \) and \( \varphi \) after taking small are 0.77, 0.23, 0.2, and 0.2. Peak values of memberships of \( v \) are 0.75, 0.4, 0.75, and 0.75. The value of \( \varphi \) membership function corresponding peaks are 45, 70, 45, and 70. According to formulas (7.2) and (7.3), the speed of robot R is 0.7 and \( \Delta \varphi \) is \( 52^{ \circ } \).

7.3.2 Fuzzy Obstacle Avoidance Control of Coarse Grains Size

Here only consider the case of circular obstacles. Using the method of [12], the centroid and radius of a static circular obstacle Obs can easily be computed. Assume the angle \( \theta \) is positive when the movement direction of robot R is at the right of the line between the centroid and the obstacle Obs. Otherwise, the \( \theta \) is negative. The distance between robot R and obstacle Obs is taken as \( s \). And define the output angle \( \Delta \theta \) positive in clockwise direction, while \( \Delta \theta \) is negative in counterclockwise. Robot R is first required to be capable of feasible and effective avoidance in the process of global path following. The basic idea of obstacle avoidance is that robot R turns right with angle \( \Delta \theta \) when the centroid of Obs is detected on the left side of movement direction of robot R, and conversely, robot R turns left with the angle \( \Delta \theta \), shown in Fig. 7.8. The dashed line in Fig. 7.8 is the unfeasible region for the robot with its angle \( \beta \). If \( |\theta |< \beta /2 \) at \( t_{n} \), the movement of robot R is within unfeasible region. Therefore, design appropriate \( \Delta \theta \) fuzzy rule so that robot R moves outside the unfeasible region at \( t_{n + 1} \), that is, \( \left| {\theta +\Delta \theta } \right| > \frac{\beta }{2} \).

Fig. 7.8
figure 8

The obstacle avoidance mode of robot R

At the same time, R moves in the direction away from the center of the obstacle when the centroid of the obstacle is at the inside of at a path circular trajectory. In this paper, assume the basic domain of \( s \) is [0, D], using fuzzy set N, M, and F. The basic domain of \( \theta \) is \( [{ - }90^{ \circ } ,90^{ \circ } ] \) with fuzzy set L, Z, and R. The basic domain of \( \Delta \theta \) is \( [{ - }90^{ \circ } ,90^{ \circ } ] \) with fuzzy set L, Z, and R. The basic domain of \( v \) is \( [0,\,V_{\hbox{max} } ] \) with fuzzy set S, N, and B. The membership functions of \( s \), \( \theta \), \( \Delta \theta \), and \( v \) are shown in Fig. 7.9. Here, two nested fuzzy controllers are designed to realize the coarse grained obstacle avoidance control. The upper layer is to determine output deflection angle \( \Delta \theta \) according to the value of \( s \) and \( \theta \), while the second one is to obtain the speed control of R through \( s \) and \( \Delta \theta \).

Fig. 7.9
figure 9

Membership functions of \( s \), \( \theta \), \( \Delta \theta \) and \( v \), respectively

The fuzzy rule tables of the deflection angle \( \Delta \theta \) and the speed \( v \) are shown in Tables 7.3 and 7.4, respectively.

Table 7.3 Fuzzy rules of deflection angle \( \Delta \theta \)
Table 7.4 Fuzzy rules of speed \( v \)

Similarly, according to reasoning and height defuzzification method, by Mamdani inference, \( \Delta \theta \) and \( v \) can be obtained as follows:

$$ \Delta \theta = \sum\limits_{m,n} {[u_{\theta }^{m} (x) \wedge u_{s}^{n} (y)]u_{\Delta \theta } /} \sum\limits_{m,n} {[u_{\theta }^{m} (x) \wedge u_{s}^{n} (y)]} $$
(7.4)
$$ v = \sum\limits_{m,n} {[u_{\Delta \theta }^{m} (x) \wedge u_{s}^{n} (y)]u_{v} /} \sum\limits_{m,n} {[u_{{\Delta \theta }}^{m} (x) \wedge u_{s}^{n} (y)]} $$
(7.5)

where \( u_{\theta }^{m} \left( x \right) \) is the membership of \( \theta \), \( u_{s}^{n} \left( y \right) \) is the membership of \( s \), \( u_{{\Delta \theta }}^{m} (x) \) is the membership of \( \Delta \theta \), \( u_{{\Delta \theta }} \) is the peak of membership function of \( \Delta \theta \), and \( u_{v}^{{}} \) is the peak of membership function of \( v \). The ranges of \( m \) is {L, Z, R}, the ranges of \( n \) is{N, M, F}.

7.4 Simulations

In this paper, we use a robot simulation platform All-user based on VC++ to design two fuzzy controllers, respectively, to achieve the circumference type desired path following and obstacle avoidance. Assume the radius of robot R is 0.2, and its maximum speed is 0.3.

Experiment 1: Expected path following is the dual semicircle path set, which includes the first clockwise and the second counterclockwise one with the center (16, 16) and (32, 16), respectively, and the radius 6, shown in Fig. 7.10. As the starting position of robot R is (2.7, 22.1), there are Obs4, Obs5, and Obs6 obstacles on the desired path. When the obstacle Obs4 was detected, the robot turned right and moved 69 steps to avoid Obs4 effectively. When the distance between robot and corresponding discrete points was 4, robot R turned right and moved 40 steps to reach the desired path accurately and then path following continued. When Obs5 was detected, robot R turned left, then moved 36 steps while it turned left and moved 49 steps to avoid Obs6.

Fig. 7.10
figure 10

Path following control in dual semi-circumference path with obstacles

7.5 Conclusions

This paper proposed a hierarchical fuzzy path following control scheme with different fuzzy partition granularity. By employing fine-grain fuzzy division for the rotation angle and speed of a robot, more accurate path following control was achieved; and obstacle avoidance was realized with coarse grain fuzzy division strategy. The high level was the behavioral decision-making, to determine the robot to follow the desired path or obstacle avoidance, the lower level can achieve fuzzy desired path following and obstacle avoidance, which was based on different grain sizes.