Speed Control for Leader-Follower Robot Formation Using Fuzzy System and Supervised Machine Learning

Mobile robots are endeavoring toward full autonomy. To that end, wheeled mobile robots have to function under non-holonomic constraints and uncertainty derived by feedback sensors and/or internal dynamics. Speed control is one of the main and challenging objectives in the endeavor for efficient autonomous collision-free navigation. This paper proposes an intelligent technique for speed control of a wheeled mobile robot using a combination of fuzzy logic and supervised machine learning (SML). The technique is appropriate for flexible leader-follower formation control on straight paths where a follower robot maintains a safely varying distance from a leader robot. A fuzzy controller specifies the ultimate distance of the follower to the leader using the measurements obtained from two ultrasonic sensors. An SML algorithm estimates a proper speed for the follower based on the ultimate distance. Simulations demonstrated that the proposed technique appropriately adjusts the follower robot’s speed to maintain a flexible formation with the leader robot.


Introduction
With increasing computing power, fast progress in sensor and actuator design, and low-cost production, robotic systems have been in ever-increasing demand and application. The ultimate goal of robotic engineers and researchers is to achieve fully autonomous navigation in indoor/outdoor environments [1]. The control system of an autonomous wheeled mobile robot perceives its environment via embedded sensors and controls the robot's navigation. An effective control algorithm navigates the robot through a (near-) optimal collision-free path from a start position to the target [2,3]. The path's optimality is measured with respect to the traversed path length and navigation time, etc. Navigation in unknown environments with stationary and/or mobile obstacles is the main challenge for wheeled mobile robots [4,5].
Efficient speed control is essential to the navigation and path tracking of wheeled mobile robots. Employing intelligent and knowledge-based controllers for adjusting the robot speed autonomously during navigation has been addressed in the literature. Kodagoda et al. [6] have developed and implemented fuzzy controllers for the steering and speed control of an autonomous guided vehicle. They applied fuzzy logic for steering control and with the suitable incorporation of a braking controller, the stability of the vehicle is guaranteed. Dursun and Durdu [7] have presented a method for the speed control of a DC motor utilized in robots and countless industrial applications based on sliding mode control and analysis under load changes. Shijin and Udayakumar [8] have introduced a PID controller to adjust the speed of wheeled mobile robots using dynamic and kinematic modeling. Their model considers the errors that emerge between the controller output and the actual speed of the robot. Some other works [9][10][11][12][13] have used velocity control as a partial element of the navigation and obstacle avoidance behavior of mobile robots.
Among intelligent and knowledge-based techniques, fuzzy decision-making plays a vital role in robot navigation with imprecise, incomplete, and vague sensor measurements [14,15]. Besides fuzzy decision-making, machine learning is a powerful technique to make appropriate decisions in the absence of sufficient knowledge. Supervised machine learning (SML) uses a training set to adjust the decision process based on a pre-defined pattern. It can be integrated into fuzzy decision-making to learn based on phenomena data gathered from the environment and can iteratively modify parameters of the fuzzy membership, or can be applied along with a fuzzy controller to make optimal or near-optimal decisions regarding the dynamicity of the environment.
Existing works for the speed control of mobile robots typically do not use intelligent methods, and those that do use intelligent methods usually apply only one intelligent strategy for this process. In contrast, this paper presents an intelligent technique for the speed control of a wheeled mobile robot using a combination of fuzzy decision-making and SML. The technique is aimed to appropriately adjust the speed of a follower mobile robot in a two-robot leader-follower formation. The follower robot is equipped with two ultrasonic sensors installed in its front to constantly measure its distance to the leader robot. The use of two ultrasonic sensors can enhance the accuracy and reliability of the measurements. The follower's speed is adjusted via the fuzzy controller and the SML algorithm employed in the proposed technique. The fuzzy controller uses both ultrasonic sensory measurements to determine the ultimate distance of the follower to the leader. The sensory measurements often are imprecise due to sensor errors. Fuzzy decision-making can appropriately deal with the imprecise measurements. The SML algorithm specifies a proper speed for the DC motors of the follower robot using the ultimate distance from the fuzzy controller. The advantage of combining a fuzzy controller and the SML algorithm in one technique is that the intelligent inference process is efficient under various phenomena data. Simulation results have shown that the proposed technique preserves the stability of the robot while preventing collisions with the leader. The main contributions of the technique can be highlighted as below:

•
Applying two ultrasonic sensors to enhance the accuracy of the distance measurements • Determination of the ultimate distance with the fuzzy controller based on the measurements from both ultrasonic sensors • Specifying the speed of the (follower) robot with the SML algorithm based on the ultimate distance The remainder of the paper is organized as follows. Section 2 presents some background on fuzzy decision-making and machine learning. Section 3 describes the components of the proposed technique in detail, including the fuzzy controller and SML algorithm. Section 4 contains the evaluation results of the proposed technique under different scenarios. Finally, our conclusions are presented in Section 5.

Background
This section presents a brief description of the main elements and procedures that are used in fuzzy decision-making and supervised machine learning (SML).
Fuzzy logic [16,17] is a powerful tool to deal with imprecise, vague, and incomplete information in complex systems such as robotic systems. It is based on relative graded membership to resemble human perception and cognition in decision-making in the absence of precise knowledge. All functions of fuzzy decision-making are provided by a fuzzy inference system. As illustrated in Figure 1, this system consists of four main components: fuzzifier, rules, inference engine, and defuzzifier. The fuzzifier unit converts a crisp set of input values to a fuzzy set using membership functions. The fuzzy set of the output is calculated by fuzzy rules through a fuzzy inference process. Finally, the defuzzifier unit converts the output fuzzy set to a crisp value using defuzzification. Machine learning [18] is a subset of artificial intelligence in which computers can learn without being explicitly programmed. It is related to the development process of computer systems in which they can make intelligent decisions in response to new data based on previously gained experience. Figure 2 shows the main steps in machine learning systems. Collecting raw data is the first step of a machine learning system. The data preparation phase determines the quality of data applied in analytical processes. An appropriate learning model is selected and trained in the next phase. The evaluation phase determines the performance of the selected learning model. Finally, the feedback from the evaluation phase is used to improve the model efficiency or replace it with another model. SML [19,20] is one of the machine learning algorithms in which the learning model is trained using a pre-defined training set to improve the accuracy of the decision-making. The linear regression model is a fundamental SML algorithm with two parameters that can be represented as, where α and β indicate parameters that are determined during supervised training of the model. The main goal of the linear regression model in (1) is to predict the best output for each input x. It is worth noting that this paper considers an SML algorithm based on linear regression.

The Proposed Technique
Assume a two-robot leader-follower formation control scenario, where the follower robot steers to maintain a formation with the leader robot. Two ultrasonic sensors, installed on the forward motion direction of the follower robot, continuously measure its distance to the leader robot. Figure 3 shows the workflow of the proposed technique for the speed control of the follower robot. The technique consists of a fuzzy controller and an SML algorithm to specify the ultimate distance to the leader and the speed of the follower, respectively, in order to maintain the formation with the leader robot. The leader robot changes its speed every t 2 seconds to a random value that is unknown to the follower and subsequently the follower robot adjusts its speed every t 1 seconds.

The Robot Model
Differentially driven mobile robots are very common robot models used for theoretical and experimental studies. The specific mobile robot selected for the proposed speed controller technique implementation was the Pioneer 3-DX [21] (Figure 4). This robot model was employed for the experimental studies in the V-REP robot simulator discussed in Section 4. We have used only two sonars installed in the front of the robot to detect obstacles (here, to detect the leader robot).

The Fuzzy Controller
The fuzzy controller determines the ultimate distance between the follower robot and the leader vehicle based on data readings of the ultrasonic sensors. Beforehand, it should be checked that at least one of the readings of the two sensors is less than or equal to 100 cm. The other measurement, if greater than that threshold, is set to 100 cm. In case both measurements are greater than that threshold, both are set to 100 cm. The rationale behind this is that when these measurements are set to the specified threshold, the speed controller will steer the follower with the maximum speed until the distance to the leader becomes less than 100 cm. Then, the speed controller can adjust the speed appropriately in order to avoid collision with the leader. Note that we assume the follower's maximum speed is larger than the leader's actual speed.
The fuzzy controller consists of two input parameters, namely 'Distance 1' and 'Distance 2', and one output parameter, namely 'ultimate distance'. The linguistic terms of all the parameters are specified as {very near, near, middle, far, very far}, and their universe of discourse is determined as {0, 1, . . . , 100} cm. Since the follower navigates in the highest velocity when the distance between the leader and the follower is equal or greater than 100 cm, we considered that it has the maximum value in the universe of discourse. That is, the distances greater than 100 cm will be considered equal to 100 cm. Membership degrees of all the linguistic terms and quantitative amounts are determined by the bell-shaped membership function [22] as follows: where x is a member of the universe of discourse, c and a are used to adjust the center and width of the membership function, and b is the slope at the cross points. Figure 5 shows the membership graphs specified for this controller.  Table 1 represents the IF-THEN rules that are used in the fuzzy controller. These rules are designed based on our experiences in a case study, in which Distance 1 and Distance 2 were fed into the fuzzy controller to obtain the safe ultimate distance. However, some of the rules were adopted with human perceptions to enhance the performance of the fuzzy controller. These rules are applied to generate the total rule. The outputs are determined in a way that they can determine an appropriate ultimate distance based on Distance 1 and Distance 2. The fuzzy rules of this controller are specified by the fuzzification unit as below: Rule 1: If x is 'very near' and y is 'very near' then f 1 is 'very near' Rule 2: If x is 'very near' and y is 'near' then f 2 is 'very near' . . . Rule 25: If x is 'very far' and y is 'very far' then f 25 is 'very far'  7  near  near  near  8  near  middle  near  9  near  far  middle  10  near  very far  middle  11  middle  very near  near  12  middle  near  near  13  middle  middle  middle  14  middle  far  middle  15  middle  very far  middle  16  far  very near  near  17  far  near  middle  18  far  middle  middle  19 far far far After all of the rules are separately built by the max-min function, they are aggregated together by the max function to produce the total rule as follows:  The total rule is applied to calculate the distance between the robot and the leader vehicle. Algorithm 1 represents an overall view of this procedure. At first, Distance 1 and Distance 2 are separately fuzzified by the fuzzification unit. Then, the input fuzzy set is determined by the AND operation between the fuzzy sets of the distances. The inference process is performed by the Mamdani fuzzy model, as below: where A and B are the input sets, C is the output set, µ x (A) is the membership degree of x in set A, µ y (B) is the membership degree of y in set B, and µ z (C) is the membership degree of z in set C. This process specifies the fuzzy set of the ultimate distance based on the input fuzzy set and the total rule. Finally, the crisp value of the ultimate distance is computed by the defuzzification unit using the center of gravity method [23] as follows: where U is the universe of discourse, x i is element i th of the fuzzy set U, µ U (x i ) is the membership degree of x i , and n is the number of elements.
Algorithm 1 Determination of the ultimate distance with the fuzzy controller Return D

The SML Algorithm
The speed of the robot's DC motors should be regulated to control the robot's speed based on the ultimate distance determined by the fuzzy controller. The speed should be determined in a way that the stability of the robot's speed and the distance between the vehicles will be high. If the distance is short then the speed will be decreased; otherwise, it will be increased accordingly. The SML algorithm specifies the speed of both motors based on the distance between the robot and the leader vehicle. Table 2 presents some data in the training set that is determined in the controller to find all of the possible solutions to regulate the speed of both DC motors. The distance is in the range of [0, 100] cm, and the speed is in the range of [0, 255] PWM which later is converted to an actual value as m/s. The main algorithm to determine the best solution can be given by linear regression, as below: where N is the number of feasible solutions, Di f f i is the difference (from the target) for each solution, S indicates the number of selections for each solution, D j represents the distance for each selection, S j is the number of randomized times for each selection, and α, β represent the weighting parameters (to be generated randomly). The weights having the least difference are selected as the best solution.  1  28  111  2  46  147  3  90  235  4  14  83  5  2  59  6  37  129  7  57  169  8  77  209  9  100  255  10  83  221  11  70  195  12  53  161  13  33  121  14  10  75  15  4  63  16  36  127  17  58  171  18  76  207  19  94  243  20 98 251 All possible solutions are generated after the simulation process based on the training set. Table 3 contains some of the generated solutions. The results are increasingly sorted based on the difference parameter. Therefore, the first solution is selected as the best solution. Figure 6 shows all solutions and the best solution resulting from the simulation process. The blue squares indicate the instances of the training set, the yellow lines indicate all the solutions, and the red line indicates the best solution.  For N = 20 randomly generated α and β, the best solution with the minimum difference value Di f f i = 0.11188 is found at α = 1.9958 and β = 55.265. Therefore, the speed can be predicted by: where dis indicates the ultimate distance determined by the fuzzy controller. Algorithm 2 describes how to find all possible solutions and the best solution for the controller. The values of M, N, P, min α , max α , min β , and max β are considered to equal 75, 100, 50, 0.1, 2.5, 30, and 70, respectively.

Evaluations
The performance of the proposed technique for the speed control was evaluated under different conditions based on a case study that used the Pioneer 3-DX [24,25] to navigate two robots on a road between two positions. Figure 7 shows a schematic of the simulation scenario. The length, width, and height of the robot were 485 mm, 381 mm, and 217 mm, respectively. We used scalability around 70% of the real robot in the simulations. The simulation process was performed using an integration of MATLAB and V-REP in which the model was considered in the V-REP simulator and the robot's speed was regulated in the MATLAB environment. The robot's speed was determined in the periodic time t 1 while the leader vehicle's speed was specified in the periodic time t 2 . The default values of t 1 and t 2 were considered as 2 s and 5 s, respectively. Note that max indicates the maximum speed of the leader vehicle. Figure 7. A schematic of the case study using two Pioneer 3-DX robots in V-REP. Figure 8 shows the performance of the proposed technique under various assumptions of time parameters t 1 and t 2 as well as velocities of the leader. As can be seen in the results, when the leader changed its speed to a random value, the follower's velocity controller could regulate the follower's velocity properly, so, the formation was maintained without collision between the two robots. Furthermore, the time histories of the follower's velocities showed relative smoothness that provided for stable motion. Figure 8f illustrates that when the follower's speed was constrained to be less than 1 m/s, the controller steered the robot with the maximum speed to keep the formation. To compare the proposed technique with a static method under an automated highway scenario, the robots were considered to move down a two-lane road (Figure 9). The leader robot decreased its speed from 2 to 0.5 m/s gradually while in the static method the follower robot adjusted its speed as where dis indicates the average of Distance 1 and Distance 2, and T represents the time interval between estimation steps. The simulation results in Figure 9 demonstrate that when using the static method, the follower could not efficiently adjust its speed to follow the leader with maintaining a regular distance. In contrast, when using the proposed technique, the follower adjusted its speed intelligently and maintained its distance to the leader properly after 7 s. The simulation results of the proposed technique shown in Figures 8 and 9 demonstrate that the proposed fuzzy controller for determining the distance between the vehicles and the SML algorithm for calculating the robot's speed worked properly under different conditions. The evidence can be seen in the results, which show that the distance between the vehicles remained in a safe range to avoid any conflicts or collisions between them.

Conclusions
In wheeled mobile robots, speed control is a very challenging and time-consuming task that is required to appropriately perform the navigation and path-tracking processes. This paper presented an intelligent speed control for a wheeled mobile robot using a fuzzy system and supervised machine learning (SML). Two ultrasonic sensors are applied in front of the robot to measure the distance between the robot and the leader vehicle separately. The use of two sensors can enhance the precision of the distance estimation. Initially, the ultimate distance of the robot from the leader vehicle is specified by the fuzzy controller based on distance measurements from the sensors. Afterward, the SML algorithm computes the speed of the DC motor using the ultimate distance.
The Pioneer 3-DX was applied as a case study in the V-REP simulator through integration with the MATLAB environment to navigate two robots between two positions on a road. Evaluation results indicated that the proposed technique adjusts the speed of the robot properly so that the distance of the robot from the leader vehicle is optimal or near-optimal, and the robot does not collide with the front vehicle. In future work, we will use various types of sensors to improve the precision of the measured distance and speed of the robot.
In future works, the fuzzy controller's performance will be analyzed under a scenario that assumes one of the sensors has malfunctioned. Additionally, various techniques (e.g., neural networks) will be incorporated into the controller to increase the learning capability of the system.