# Flocking Control of Mobile Robots with Obstacle Avoidance Based on Simulated Annealing Algorithm

Authors: Jin Cheng; Bin Wang
Journal: Mathematical Problems in Engineering
 (2020)

---

## Abstract

Flocking control problem of mobile robots under environment with unknown obstacles is addressed in this paper. Based on the simulated annealing algorithm, a flocking behaviour for mobile robots is achieved which converges to alignment while avoiding obstacles. Potential functions are designed to evaluate the positional relationship between robots and obstacles. Unlike the existing analytical method, simulated annealing algorithm is utilized to search the quasi-optimal position of robots in order to reduce the potential functions. Motion control law is designed to drive the robot move to the desired position at each sampling period. Experiments are implemented, and the results illustrate the effectiveness of the proposed flocking control method.


---

## Body

## 1. Introduction

Flocking problems are studied and applied in many research fields, such as self-organized mobile sensor networks in [1], cooperative unmanned aerial vehicles (UAVs) in [2–5], and military reconnaissance in [6]. Research of flocking behaviour stems from the coordination phenomena in nature, from swarming of bacteria, biochemical cellular networks, up to flocking of birds, schooling of fish, and herds of land animals [7]. Reynolds proposed a computer model of coordinated animal motion named “boids” in [8] and defined three concepts to describe the behaviours of boids:(1)
Collision avoidance: avoid collisions with nearby flockmates(2)
Velocity matching: attempt to match velocity with nearby flockmates(3)
Flock centering: attempt to stay close to nearby flockmatesThese behaviours are seen in astonishing amount of coordinated systems, which exhibit unbelievable efficient and robust coordination [9, 10]. These inspired a lot of work in statistical physics and control theories about stability. Flocking behaviour has been addressed in the context of nonequilibrium phenomena in many degree-of-freedom dynamical systems and self-organization in systems of self-propelled particles [7, 11, 12].Booming-related work has been done worldwide in the last decades. Some works focus on the dynamic model of mobile robots [13]. In [14], a method based on the intrinsic properties of the Euclidean plane is proposed for the calculation of the moving mechanism on a trajectory. In [15], a direct analytical method for solving the linear transformation of the characteristic equation for industrial robots is proposed. A model predictive flocking control scheme for second-order multiagent systems with input constraints is designed in [16]. In [17], a dynamic pinning control algorithm (DPCA) is developed to generate stable flocking motion for all the agents without the assumption of connectivity or initial connectivity of the network. In [18], a distributed control protocol with individual local information is proposed for the second-order multiagent system with interference. The problem of flocking and velocity alignment in a group of kinematic nonholonomic agents in 2 and 3 dimensions is addressed in [19]. A geodesic control law that minimizes a misalignment potential and results in velocity alignment and flocking is proposed. In [20], the flocking of multiple agents which have significant inertias and evolve on a balanced information graph is studied. Passive decomposition method is used to incorporate this inertial effect which can cause unstable group behaviour. The proposed flocking control law is proven to be stable and can ensure that the internal group shape is exponentially stabilized to a desired state.In recent years, the flocking problem of mobile robots has become an attractive subject in the research field of the multiagent system and cooperative robots. In [21], the cooperative motion coordination of leader-follower formations of nonholonomic mobile robots under visibility and communication constraints in known polygonal obstacle environments is studied. Each robot can take care of converging to a desired configuration while maintaining visibility with its target. Flocking with obstacle avoidance is an emerging research interest in recent years [22–26]. A new distributed coordination algorithm with Voronoi partitions for multivehicle systems is presented in [22], which results not only in obstacle avoidance and motion to the goal but also in a desirable geographical distribution of the vehicles. A flocking algorithm in the presence of arbitrary shape obstacle avoidance is presented in [23] both in the 2D space and 3D space. In [27], learning-based model predictive control approach is applied to the flocking problem of UAVs in the presence of uncertainties and obstacles. A distributed framework that ensures reliably collision-free behaviours in large-scale multirobot systems with switching interaction topologies is presented in [28].In practical applications, such as formulation of the mobile robot or surface vessels, the agent model is underactuated, and the kinematic motion is constricted with nonholonomic constraints. In our research project, AmigoBot is adopted as anα−agent in the flocking control problem. The kinematic model of AmigoBot is a kind of nonholonomic system in which the number of control inputs is less than the degree of freedom and cannot be transformed into a second-order linear system. It is necessary to redesign the control algorithms for the flocking of AmigoBots.In this paper, a control method for the flocking problem of mobile robots is proposed. Simulated annealing (SA) algorithm is used to design a simple behaviour for each robot while flocking can be self-established. SA algorithm is a probabilistic technique for approximating the global optimum of a given function. Specifically, it is a metaheuristic to approximate global optimization in a large search space for an optimization problem. It is often used when the search space is discrete (e.g., the traveling salesman problem). For problems where finding an approximate global optimum is more important than finding a precise local optimum in a fixed amount of time, simulated annealing may be preferable to alternatives such as gradient descent.The paper is organized as follows. Section2 gives the kinematic model of AmigoBot and the problem formulation. Design process of the flocking control law is presented in Section 3. Simulation is implemented to illustrate the effectiveness of the proposed control law, and results are shown in Section 4. Finally, the conclusions are made in Section 5.


## 2. Problem Formulation

### 2.1. Model of Flocking Agents

The first model which is widely considered as a flocking agent is constructed in [12], which was proposed by Vicsek et al. to interpret the flocking phenomenon such as clustering and convection:(1)xit+1=xit+vitΔt,θt+1=θtr+Δθ,where xi is the position of particle i on the plane, vi is the velocity with an absolute value v and an angle given by θt+1, i=1,2,⋯,n, θtr is the average direction of the particles in the neighbourhood of particle i, and Δθ is the random noise.From the perspective of theoretical research, the dynamics of agents in flocking is also often modelled as a second-order linear system [29]:(2)x˙i=vi,v˙i=ui,i=1,2,…,n,where xi,vi,andui are the position, velocity, and control force, respectively.The other second-order linear system of the flocking agent is proposed in [30, 31]. The agents moving on the plane are modelled with the following dynamics:(3)r˙i=vi,v˙i=ui,i=1,2,…,n,where ri=xi,yiT is the position of agent i, vi=x˙i,y˙iT is its velocity, and ui=ux,uyT is its control inputs. The heading angle of agent i is defined with θi=arctany˙i,x˙i.


### 2.2. Kinematic Model of the Mobile Robot

Different from the agent models proposed above which are treated with the linear system, the kinematic model of the mobile robot is much more complex. As shown in Figure1, the mobile robot is controlled only by the velocities of two drive wheels. Assuming that there exists no slipping motion between the wheels and the ground, the dynamics of AmigoBot can be modelled as(4)x˙i=vicosθi,y˙i=visinθi,θ.i=ωi,where vi and ωi are the linear and angular velocity, respectively, xi,yi is the position of AmigoBot in Cartesian coordinates, and θi is the orientation angle of the AmigoBot.Figure 1
Mobile robot with sonar sensors. (a) AmigoBot. (b) Model of AmigoBot.
(a)(b)Unlike the models of (1)–(3), mobile robot like AmigoBot is usually considered as a nonholonomic system due to the fact that the system has less dimension of control inputs than its degrees of freedom. For AmigoBot, it has 3 degrees of freedom, i.e., the lateral and longitudinal motion on the horizontal plane and rotatory motion along the axis vertical to the horizontal plane but with only two control inputs.For the differential wheel drive mobile robot, it hasvi=vRi+vLi/2 and ωi=vRi−vLi/L. vRi and vLi are the velocities of the right and left wheel, respectively, and L is the distance between the two wheels as described in Figure 1. Constrained by limitations on the control inputs, the existing flocking laws or algorithms are not suited for the flocking control problem of mobile robots.


## 2.1. Model of Flocking Agents

The first model which is widely considered as a flocking agent is constructed in [12], which was proposed by Vicsek et al. to interpret the flocking phenomenon such as clustering and convection:(1)xit+1=xit+vitΔt,θt+1=θtr+Δθ,where xi is the position of particle i on the plane, vi is the velocity with an absolute value v and an angle given by θt+1, i=1,2,⋯,n, θtr is the average direction of the particles in the neighbourhood of particle i, and Δθ is the random noise.From the perspective of theoretical research, the dynamics of agents in flocking is also often modelled as a second-order linear system [29]:(2)x˙i=vi,v˙i=ui,i=1,2,…,n,where xi,vi,andui are the position, velocity, and control force, respectively.The other second-order linear system of the flocking agent is proposed in [30, 31]. The agents moving on the plane are modelled with the following dynamics:(3)r˙i=vi,v˙i=ui,i=1,2,…,n,where ri=xi,yiT is the position of agent i, vi=x˙i,y˙iT is its velocity, and ui=ux,uyT is its control inputs. The heading angle of agent i is defined with θi=arctany˙i,x˙i.


## 2.2. Kinematic Model of the Mobile Robot

Different from the agent models proposed above which are treated with the linear system, the kinematic model of the mobile robot is much more complex. As shown in Figure1, the mobile robot is controlled only by the velocities of two drive wheels. Assuming that there exists no slipping motion between the wheels and the ground, the dynamics of AmigoBot can be modelled as(4)x˙i=vicosθi,y˙i=visinθi,θ.i=ωi,where vi and ωi are the linear and angular velocity, respectively, xi,yi is the position of AmigoBot in Cartesian coordinates, and θi is the orientation angle of the AmigoBot.Figure 1
Mobile robot with sonar sensors. (a) AmigoBot. (b) Model of AmigoBot.
(a)(b)Unlike the models of (1)–(3), mobile robot like AmigoBot is usually considered as a nonholonomic system due to the fact that the system has less dimension of control inputs than its degrees of freedom. For AmigoBot, it has 3 degrees of freedom, i.e., the lateral and longitudinal motion on the horizontal plane and rotatory motion along the axis vertical to the horizontal plane but with only two control inputs.For the differential wheel drive mobile robot, it hasvi=vRi+vLi/2 and ωi=vRi−vLi/L. vRi and vLi are the velocities of the right and left wheel, respectively, and L is the distance between the two wheels as described in Figure 1. Constrained by limitations on the control inputs, the existing flocking laws or algorithms are not suited for the flocking control problem of mobile robots.


## 3. Design of the Flocking Control Law

### 3.1. Potential Function of Coordination

Each mobile robot is considered as anα−agent. Define the position vector of the ith AmigoBot with ri=xi,yiT. The relative positions between the ith and jth AmigoBots are defined with rij=ri−rj. The distance between these two AmigoBots is then given with rij. A potential function Vij is defined to evaluate the relative positions between any pair of neighbouring AmigoBots as follows:(5)Vijrij=dr2rij2+logrij2+erij−dr2,where dr>0 is a design parameter. The curve of function Vij is shown in Figure 2. dr determines the desired distance between the agents. When rij=dr, it has minVijrij=2+logdr2. Unlike the potential function proposed in [31], also shown in Figure 2 as traditional Vij, the third term in (5) is helpful to get a flexible behaviour such as split and squeezing maneuver in an environment with obstacles.Figure 2
Potential functionVij.The potential function of AmigoBoti is then defined with the sum of all Vij:(6)Vαi=∑j∈AVijrij,where A is the set that includes all other AmigoBots that the ith AmigoBot can detect with sensors.


### 3.2. Potential Function of Obstacle Avoidance

Obstacles can be detected by AmigoBot with sonar sensors in an unknown environment. Define the position of the obstacle withOk=xk,ykT. To keep a safe distance from the obstacle Ok, it is assumed that the obstacle Ok has a circular boundary with radius ds. β−agent is then defined with the projection of the α−agent on the boundary of obstacle Ok [32].Define the projection of the positionri of robot i on Ok as(7)qik=argminqk∈Ωkri−qk,where Ωk is the boundary of Ok.Define the distance between roboti and its projection qik on the obstacle Ok with rik=ri−qik. A potential function Vik is designed to evaluate the relative position between robot i and obstacle Ok as follows:(8)Vikrik=1rik−1ds2,rik<ds,0,rik≥ds.Define(9)Vβi=∑k∈OiVikrik,where Oi is the set of obstacles detected by robot i.


### 3.3. Flocking Behaviour via Random Search Algorithm

With the aforementioned designed potential functionsVαi and Vβi, the flocking control problem of the mobile robot is considered as an optimization problem in this paper. In [33], Cheng et al. designed a flocking control law that can drive the agents to evolve into the flock centering state. Motion control laws are proposed to synchronize the velocities and orientation angles via the Newton method in an environment without obstacles.For the flocking problem of the mobile robot in a complex environment with unknown obstacles, define the total potential function for roboti as(10)Vi=Vαi+Vβi.Obviously, if all the robots move towards the direction of the gradient descent ofVi at each sample period, the robots will keep a desired distance among each other finally:(11)θi∗=argminθi∈ΘiVi,∀tk,where Θi is the orientation space of robot i, tk is the sample period, θi∗ is the optimal orientation angle which has the maximal extent of the gradient descent of Vi at tk. Due to that the space Θi is continuous, methods based on the gradient descent are generally adopted [30, 33]. Methods based on the random search algorithm provide another dependable solution. In this paper, SA algorithm is applied to searching of the minimal solution of Vi which is designed to regulate the flocking state.Compared to other approximation methods, such as the Newton method, gradient descent method, and Levenberg–Marquardt method, SA can avoid being trapped in the local minimal in early iterations and is able to explore globally for better solutions in finite iterations [34]. SA is a method for solving unconstrained and bound-constrained optimization problems. The method models the physical process of heating a material and then slowly lowering the temperature to decrease defects, thus minimizing the system energy [35, 36]. There is an essential similarity between the flocking control problem and the simulated annealing course. Both of them aim to explore the optimal solution that has minimal energy or desired homogeneity.The flocking control problem of mobile robots is considered as an approximation of the optimal solution of eachVi. With full information of all the other robots and the obstacles detected by sonar sensors, each robot tries to keep a quasi-optimal distance from each other in the motion while avoiding the obstacles. Firstly, the optimal position ri∗ with minimal Vi is approximated via the SA algorithm. Then, the optimal orientation angle θi∗ is calculated with ri∗. Finally, a motion control law is designed to drive the robot move to the optimal position ri∗ at each sampling period tk.The pseudo-code of the random search method ofri∗ via the SA algorithm is shown in Algorithm 1, where ri∗=xi∗,yi∗T is the desired position vector for the ith AmigoBot. Define the change of energy level with(12)ΔE=Virnew−Vir˜i.Algorithm 1: Flocking behaviour search.
Input: objective functionVi and ri,i=1,2,…,nOutput: quasi−optimal solution⟶ri∗(1)
forroboti do(2)
InitializeSA (T, Tmin, α and N)(3)
rbest⟵ri(4)
r˜i⟵ri(5)
WhileT<Tmindo(6)
fori=1:Ndo(7)
rnew⟵Neighborr˜i(8)
ifΔE<0then(9)
r˜i⟵rnew(10)
rbest⟵r˜ielse(11)
ifexp−ΔE/T>Randthen(12)
r˜i⟵rnew(13)
T⟵αT(14)
ri∗⟵rbest(15)
returnri∗The initial positionr˜i in Neighborr˜i is not generated randomly but given with ri. Also, the function Neighborr˜i is defined with(13)rnew=r˜i+Step∗Rand,RandT,where Step is a parameter decided by the maximal velocity of the robot and Rand is a random function which can generate a value randomly in the range between 0 and 1.Obviously, ifri∗ is well tracked, Vi would converge to the minimal value, and the distance between the agents would also converge to a constant value, which in fact is determined by dr. That is, the flocking centering state can be guaranteed.Once the quasi-optimal positionri∗ is achieved, the optimal orientation angle can be calculated with θi∗=arctanyi∗−yi/xi∗−xi.Defineθi∗=arctanyi∗−yi/xi∗−xi, and it has(14)∂θi∗∂xi=−yi−yi∗xi−xi∗2+yi−yi∗2,∂θi∗∂yi=xi−xi∗xi−xi∗2+yi−yi∗2.Defineθe=θi−θi∗, and design the control law for ωi with(15)ωi=−kwθi−θi∗+vi∂θi∗∂xicosθi∗+vi∂θi∗∂yisinθi∗,where kw>0 is a design parameter. With the control input ωi in (15), it has(16)θe.=−kwθi−θi∗=−kwθe.Define a candidate functionVθe=1/2θe2; then, it has V˙θe=−kwθe2≤0. With Lyapunov stability and LaSalle’s invariant principle, it can be proven that the equilibrium θe=0 is asymptotically stable. That is, with the control law for ωi in (15), the ith AmigoBot can be steered towards the desired position ri∗.Defineδri=xi−xi∗,yi−yi∗T. Let(17)vi=1N−1∑j∈Avj+kvδriVi,where vr is the linear speed of the γ−agent or the speed required for the flocking motion and kv>0 is a design parameter.


## 3.1. Potential Function of Coordination

Each mobile robot is considered as anα−agent. Define the position vector of the ith AmigoBot with ri=xi,yiT. The relative positions between the ith and jth AmigoBots are defined with rij=ri−rj. The distance between these two AmigoBots is then given with rij. A potential function Vij is defined to evaluate the relative positions between any pair of neighbouring AmigoBots as follows:(5)Vijrij=dr2rij2+logrij2+erij−dr2,where dr>0 is a design parameter. The curve of function Vij is shown in Figure 2. dr determines the desired distance between the agents. When rij=dr, it has minVijrij=2+logdr2. Unlike the potential function proposed in [31], also shown in Figure 2 as traditional Vij, the third term in (5) is helpful to get a flexible behaviour such as split and squeezing maneuver in an environment with obstacles.Figure 2
Potential functionVij.The potential function of AmigoBoti is then defined with the sum of all Vij:(6)Vαi=∑j∈AVijrij,where A is the set that includes all other AmigoBots that the ith AmigoBot can detect with sensors.


## 3.2. Potential Function of Obstacle Avoidance

Obstacles can be detected by AmigoBot with sonar sensors in an unknown environment. Define the position of the obstacle withOk=xk,ykT. To keep a safe distance from the obstacle Ok, it is assumed that the obstacle Ok has a circular boundary with radius ds. β−agent is then defined with the projection of the α−agent on the boundary of obstacle Ok [32].Define the projection of the positionri of robot i on Ok as(7)qik=argminqk∈Ωkri−qk,where Ωk is the boundary of Ok.Define the distance between roboti and its projection qik on the obstacle Ok with rik=ri−qik. A potential function Vik is designed to evaluate the relative position between robot i and obstacle Ok as follows:(8)Vikrik=1rik−1ds2,rik<ds,0,rik≥ds.Define(9)Vβi=∑k∈OiVikrik,where Oi is the set of obstacles detected by robot i.


## 3.3. Flocking Behaviour via Random Search Algorithm

With the aforementioned designed potential functionsVαi and Vβi, the flocking control problem of the mobile robot is considered as an optimization problem in this paper. In [33], Cheng et al. designed a flocking control law that can drive the agents to evolve into the flock centering state. Motion control laws are proposed to synchronize the velocities and orientation angles via the Newton method in an environment without obstacles.For the flocking problem of the mobile robot in a complex environment with unknown obstacles, define the total potential function for roboti as(10)Vi=Vαi+Vβi.Obviously, if all the robots move towards the direction of the gradient descent ofVi at each sample period, the robots will keep a desired distance among each other finally:(11)θi∗=argminθi∈ΘiVi,∀tk,where Θi is the orientation space of robot i, tk is the sample period, θi∗ is the optimal orientation angle which has the maximal extent of the gradient descent of Vi at tk. Due to that the space Θi is continuous, methods based on the gradient descent are generally adopted [30, 33]. Methods based on the random search algorithm provide another dependable solution. In this paper, SA algorithm is applied to searching of the minimal solution of Vi which is designed to regulate the flocking state.Compared to other approximation methods, such as the Newton method, gradient descent method, and Levenberg–Marquardt method, SA can avoid being trapped in the local minimal in early iterations and is able to explore globally for better solutions in finite iterations [34]. SA is a method for solving unconstrained and bound-constrained optimization problems. The method models the physical process of heating a material and then slowly lowering the temperature to decrease defects, thus minimizing the system energy [35, 36]. There is an essential similarity between the flocking control problem and the simulated annealing course. Both of them aim to explore the optimal solution that has minimal energy or desired homogeneity.The flocking control problem of mobile robots is considered as an approximation of the optimal solution of eachVi. With full information of all the other robots and the obstacles detected by sonar sensors, each robot tries to keep a quasi-optimal distance from each other in the motion while avoiding the obstacles. Firstly, the optimal position ri∗ with minimal Vi is approximated via the SA algorithm. Then, the optimal orientation angle θi∗ is calculated with ri∗. Finally, a motion control law is designed to drive the robot move to the optimal position ri∗ at each sampling period tk.The pseudo-code of the random search method ofri∗ via the SA algorithm is shown in Algorithm 1, where ri∗=xi∗,yi∗T is the desired position vector for the ith AmigoBot. Define the change of energy level with(12)ΔE=Virnew−Vir˜i.Algorithm 1: Flocking behaviour search.
Input: objective functionVi and ri,i=1,2,…,nOutput: quasi−optimal solution⟶ri∗(1)
forroboti do(2)
InitializeSA (T, Tmin, α and N)(3)
rbest⟵ri(4)
r˜i⟵ri(5)
WhileT<Tmindo(6)
fori=1:Ndo(7)
rnew⟵Neighborr˜i(8)
ifΔE<0then(9)
r˜i⟵rnew(10)
rbest⟵r˜ielse(11)
ifexp−ΔE/T>Randthen(12)
r˜i⟵rnew(13)
T⟵αT(14)
ri∗⟵rbest(15)
returnri∗The initial positionr˜i in Neighborr˜i is not generated randomly but given with ri. Also, the function Neighborr˜i is defined with(13)rnew=r˜i+Step∗Rand,RandT,where Step is a parameter decided by the maximal velocity of the robot and Rand is a random function which can generate a value randomly in the range between 0 and 1.Obviously, ifri∗ is well tracked, Vi would converge to the minimal value, and the distance between the agents would also converge to a constant value, which in fact is determined by dr. That is, the flocking centering state can be guaranteed.Once the quasi-optimal positionri∗ is achieved, the optimal orientation angle can be calculated with θi∗=arctanyi∗−yi/xi∗−xi.Defineθi∗=arctanyi∗−yi/xi∗−xi, and it has(14)∂θi∗∂xi=−yi−yi∗xi−xi∗2+yi−yi∗2,∂θi∗∂yi=xi−xi∗xi−xi∗2+yi−yi∗2.Defineθe=θi−θi∗, and design the control law for ωi with(15)ωi=−kwθi−θi∗+vi∂θi∗∂xicosθi∗+vi∂θi∗∂yisinθi∗,where kw>0 is a design parameter. With the control input ωi in (15), it has(16)θe.=−kwθi−θi∗=−kwθe.Define a candidate functionVθe=1/2θe2; then, it has V˙θe=−kwθe2≤0. With Lyapunov stability and LaSalle’s invariant principle, it can be proven that the equilibrium θe=0 is asymptotically stable. That is, with the control law for ωi in (15), the ith AmigoBot can be steered towards the desired position ri∗.Defineδri=xi−xi∗,yi−yi∗T. Let(17)vi=1N−1∑j∈Avj+kvδriVi,where vr is the linear speed of the γ−agent or the speed required for the flocking motion and kv>0 is a design parameter.


## 4. Simulation Results

The effectiveness of the proposed flocking control method is illustrated by experiments in MobileSim. MobileSim is software for simulating mobile robots and their environments, for debugging and experimentation with ARIA or other software that support mobile robot platforms. In this experiment, five AmigoBots are controlled to form a flocking centering state while avoiding the obstacles. The robots are connected by software with TCP ports from 8101 to 8105. Software is coded in VS2008. The data in the control process are stored in a text file at each sampling time, and the results are depicted in MATLAB figures.The initial positions of the five AmigoBots are set with0,2000mm, 0,1000mm, 0,0, 0,−1000mm, and 0,−2000mm. All the headings of the AmigoBots are set with 0°. Velocities of robots are set with 20mm/sec at the beginning.The parameters in the method proposed above are designed as given in Table1.Table 1
Parameters in the flocking control method.
VariablesValuePotential functiondr1000 mmds1000 mmMotion controlkw0.0001kv0.003SA algorithmT100Tmin0.001α0.5N20Step100The initial and some intermediate processes of robots are shown in Figure3. Obstacles are plotted with squares, hexagons, and triangles. With sonar sensors, the robot can detect the obstacles at each sampling period (500 ms). The positions of the other α-agents are shared at a period of 1 sec. From Figures 3(c)–3(f), it can be seen that the robots smartly avoid the obstacles. As shown in Figures 3(g)–3(i), all the robots attempt to assemble with a desired distance after passing through the obstacles, which brings out a flocking center state.Figure 3
Experiment in MobileSim. (a)tk = 0. (b) tk = 50. (c) tk = 80. (d) tk = 110. (e) tk = 120. (f) tk = 150. (g) tk = 170. (h) tk = 190. (i) tk = 270.
(a)(b)(c)(d)(e)(f)(g)(h)(i)The detailed traces of the five AmigoBots during the flocking process are depicted in Figure4. It proves that the designed potential function of Vαi and Vβi can regulate the relative position between robots and obstacles effectively. The robots keep a safe distance from obstacles while across the gap and a desired distance from each other in the obstacle-free space. Connection graph of the robots marked with the red circle is shown in Figure 5, which illustrates the evolution of the flocking center state during the whole process. It can be seen that the five AmigoBots are driven to a stable pattern of geometry. Each AmigoBot has a stable neighbouring relationship and keeps a stabilized motion.Figure 4
Trajectories of robots.Figure 5
Connection graph.For the 10 connection graphs in Figure5, define V¯αk as the average of the 5 potential function Vαi for each graph. It has V¯αk=1605.2,57.4,88.9,6.2,148.0,5.0,3.9,3.9,3.6,6.2. The potential function Vαi reduces greatly from the beginning and increases highly while the robots go across the obstacles and then reduces to a low value when robots are in the obstacle-free space.The responses of potential functionsVαi and Vβi are depicted in Figures 6 and 7, which illustrate how Vαi and Vβi affect the behaviour of the robot. It can be seen that when the distances between robots are farther than the desired distance dr or the distances to the obstacles are nearer than the safe distance ds, Vαi and Vβi have large values, which impel the robot to move to a desired position to reduce them with the SA algorithm. It has t0, Vαit0=7932.5,658.0,139.0,664.0,7931.7i=1,2,3,4,5 at the starting time t0, and Vαitk=16.57,12.38,16.82,20.80,20.63 at the ending time tk=350. All the robots have approximated the minimal values of Vαi.Figure 6
Potential functionVαi.Figure 7
Potential functionVβi.Figures8 and 9 show the flocking behaviour of alignment. The orientation angles and velocities of five robots almost converge to the same value.Figure 8
Orientation angles of robots.Figure 9
Velocities of robots.


## 5. Conclusion

In this paper, the flocking behaviour of the mobile robot in an unknown environment with obstacles is designed via the heuristic search algorithm. With the potential functions defined for theα−agent and β−agent, the mobile robot can acquire the quasi-optimal direction with the SA algorithm in finite search times. Control laws for vi and ωi are also designed. The system of mobile robots acts out separation and alignment behaviours obviously. Moreover, the robots can avoid obstacles, detected with sonar sensors, by a safe distance. Future work will address the issue of flocking control of mobile robots in the field environment with this proposed method.



---

*Source: 7357464-2020-06-27.xml*