Network weight and time-varying potential function for obstacle avoidance of swarm robots in column formation

This paper proposes network weight functions and time-varying potential functions for obstacle avoidance of swarm robots in column formation. We consider a potential function whose exponent is the distance between the robots and the obstacle for obstacle avoidance. When a robot tries to avoid an obstacle while staying in a formation, it behaves oscillatory due to the imbalance between the attraction of staying in the formation and the repulsion of avoiding the obstacle. In addition, swarm robots may become stagnant in front of large obstacles. To solve these problems, we propose two methods. The first method is to weaken the strength of the connection between robots according to their relative distance. The second method is to change the shape of the potential function depending on the relative angle between the robot and the obstacle. Numerical examples show that these methods reduce the oscillatory of the robot and alleviate the stagnation in front of the obstacle.


Introduction
A multi-agent system (MAS) allows multiple agents to share information with each other, so that the agents as a whole can efficiently accomplish tasks that would be difficult to accomplish independently [1,2]. There has been a growing motivation to control large swarm robots of more than several thousand units [3,4]. One of the important problems is obstacle avoidance while swarm robots stay in the desired formation [5]. Typical methods of obstacle avoidance include potential functions [6,7] and model predictive control [8]. Potential function methods realize the collision avoidance by using the repulsion force that increases with the distance between the robot and the obstacle. In this case, the robot near the obstacle may show oscillatory behaviour. This is caused by the fact that the control inputs for staying formation and avoiding obstacles in opposite directions. In the previous study of the current authors [9], the imbalance between the two control inputs is alleviated by lowering the priority of the formation control. However, the number of robots assumed in [9] is much smaller than that in [1,2]. This paper considers the case where the number of robots is significantly increased from the number set in [9].
In this paper, we propose a method of changing the potential function for obstacle avoidance in addition to the formation control for the column formation problem [10]. The objective of this paper is to reduce the oscillatory behaviour near obstacles and to recover and preserve the formation after the avoidance of obstacles.
Two issues are raised in this paper. The first issue is to alleviate the imbalance between the attractive force for staying the formation and the repulsive force for avoiding obstacles. The second issue is to eliminate the stagnation of the swarm robots in front of the large obstacle.
To address the first issue, this paper proposes a network weight function that changes the gravitational pull for staying the formation between robots based on the positions of the robots and obstacles. Swarm robots in formation are forced to break the desired formation to avoid obstacles. The larger the difference between the actual distance between robots and the desired distance, the larger the gravitational pull of the formation control. The previous study [9] proposes a weight function that weakens the attraction to stay in the formation as the distance between robots becomes larger than the desired distance. However, when the robots are close to each other, the force to stay the formation also increases, which causes oscillation. In other words, the force imbalance between the robots in preserving the formation causes the oscillation. To address this issue, we propose a weight function that weakens the formation control according to the displacement between the distance between robots and the desired distance. This network weight prevents the formation control from becoming too large even when the robots are close to each other.
To address the second issue, we set a relative angle based on the positional relationship between the robot and the obstacle and introduce a weight parameter to change the repulsion force of obstacle avoidance. The stagnation in front of the large obstacle causes a misalignment in the positional relationship between the robots and may make it impossible to stay in the desired formation after avoiding obstacles. This reason is thought to be that the potential function for obstacle avoidance is a circularly spreading function. Reference [11] adds weights depending on the relative angle between the robot and the obstacle to the circularly spreading potential function. The resultant range of the influence of the repulsion force changes from circularly spreading one to teardrop one and smooth obstacle avoidance is achieved. Motivated by this method, we propose a new weight that changes the shape of the potential function depending on the relative angle and construct a time-varying repulsive potential function. By changing the shape of the potential function to an ellipse instead of a circle, swarm robots do not stagnate in front of the large obstacle and can stay in the desired formation after passing through.
The conference version of this paper [9] only considers the design of the network weight function against the first issue. The function of this paper is a generalized form of [9]. Also, the second issue is not considered in [9]. The time varying repulsive force for swam robots is the contribution of this paper compared with [11]. The number of robots to which the proposed method can be applied is comparable to those in [3,4]. This paper suppresses the oscillatory behaviour of a large number of robots, which has not been solved in [9].
The organization of this paper is as follows. Section 2 explains consensus control of MAS. Section 3 describes the problem setting of the obstacle avoidance for swarm robots in column formation. Section 4 describes two proposed methods: a method for setting the network weight function and a method for designing a timevarying potential function. In Section 5, numerical experiments are conducted using MATLAB, and the summary of this paper is given in Section 6.

Preliminaries
This section explains the distributed optimization of MAS [12][13][14][15] which is the basis of the proposed method.

Graph theory
The network structure for information transfer bet ween agents is represented by graph G = (V, E) composed of the vertex set V = {1, 2, . . . , n} and the edge set E ⊆ V × V. The edge (i, j) ∈ E indicates an information transfer path from agent i to agent j, that is, agent i ∈ V is adjacent to agent j ∈ V. If all the paths are bi-directional, then G is called an undirected graph. An adjacent matrix A = [a ij ] ∈ R n×n is defined as follows: The neighbourhood of agent i is the set of agent j( = i) to which agent i is adjacent. The number of edges entering vertex i is called the input degree d in i and given by The degree matrix D of graph G with the diagonal element of d in 1 , d in 2 , . . . , d in n is defined as follows: From D and A, the Graph Laplacian is given by Also, Perron matrix with some positive number ε(0 < ε < 1) is defined as follows: where I is the identity matrix.
A weighted graph is a graph in which each edge has a positive real number (weight). The weight graph is represented by (G, w) where ω : E → R + \{0} is a weight function. Also, the adjacency matrix A of the weighted graph (G, w) is defined as follows: o t h e r w i s e .

Consensus control
Consider the case that agent i(= 1, 2, . . . , n) is given by an integral system in discrete-time domain as follows: The control input of agent i considering the offset d is given by We transform Equation (2) as follows: where b i = εd n j=1 a ij . Equation (3) is a consensus control with bias, so b i has no effect on the stability analysis [12]. In Equation (3), we set b i = 0. Summarizing the agents and the inputs, the state-space equation of consensus control is represented by Since the Perron matrix P has eigenvalue 1, we get Let k → ∞ in Equation (4), we get x 0j .
This system proves that all agents achieve the average consensus.

Distributed optimization
Consider the unconstrained optimization problem: where the cost function J i (ξ ) is a real-valued function defined in R N and convex. The sub-gradient of differentiable J i (ξ ) is as follows: By using the consensus control of Section 2.2, the system equation for solving Equation (5) is defined as follows: where p ij is an element of the Perron matrix P.
In this paper, we assume that the step width is a constant s[k] = s(> 0). For any i ∈ V, the following equation holds: where η is the minimum value of non-zero elements of the Perron matrix P [14,15]. Summarizing all agents, the overall system is given by

Problem setting
This paper considers a column formation problem in which N(= m × n) swarm robots move straight ahead and avoid collisions on the x−y plane with c obstacles. The network structure between the robots is an undirected and connected graph as shown Figure 1. The shapes of each robot and obstacle are circulars of radius r and R, respectively, and their position coordinates are their centres. Let N i be the neighbourhood set of robot i. When the direction of the swarm robots is the positive direction of the x-axis, the other robots networked to the right, left, front and back of robot i are defined Figure 2.
We assume a leaderless formation. In addition, each robot obtains information about its surrounding environment from sensors whose detection range is radius ρ(> 0). The adjacency matrix A = [a ij ] ∈ R n×n representing the inter-robot connections is defined as follows: where p ij is the distance between robot i and robot j. This paper aims to make each robot follow the target coordinates x g ∈ R while avoiding obstacles under the formation movement problem. For straight-line movement of the column formation, x g is set far enough away. In the y-direction, each robot only stays the desired distance d ∈ R from its neighbouring robots. Let the set of robots be V = {1, 2, . . . , n}. The dynamics of robot i ∈ V at discrete time k ∈ N is given by Substituting Equation (9) into Equation (8) and arranging vertically for i (= 1, 2, . . . , n), we obtain . The formation control preserving the desired distance between the inter-connected robots is based on consensus control. The desired vectors representing the distance between robot i and robot j ∈ {R i , L i , F i , B i } ⊆ N i are given as follows: For the swarm robots to form the desired shape, the following conditions need to be satisfied.
are the target relative vectors. From this, formation control can be expressed by the consensus control law. The consensus control law for preserving formation is given by is given by (11). The gravitational potential function V g i (r) for robot i to reach the target position is given by where k g ∈ R + is the adjustment parameter, r denotes the vector of r = [x y] T . The target value x i g is given to the first column of the formation as the target value x g , and x g − n d is given to the n th column from the first column as the target value x g . The input x i g [k] is the gradient of the potential function in Equation (14) where α is the step size.
For simplicity, regarding the convergence of the algorithm proposed in this paper, we do not consider the transient state with collision avoidance, but discuss the steady state. This is because the potential functions do not always converge to certain values except in steady-state conditions where there are no collisions. (9), then is attributed to the consensus control with bias in Section 2.2. Also, u g i [k] satisfies the convergence condition for distributed optimization in Section 2.3 because V g i (r) is a convex function from Equations (14) and (15). The existing results [12][13][14][15] guarantee that the algorithm proposed in this paper converges in the steady state. Instead of considering the convergence condition with collision avoidance, we aim to propose a control algorithm that takes into account stability as much as possible in transient states where obstacle avoidance is considered. The collision avoidance of this paper is so called 'soft constraint' such that the repulsion force does not diverge to infinity when a group of robots maintaining a formation avoids an obstacle. Since the exponential function is differentiable, the force imbalance problem can be analysed at the pole of a linear approximation system. Also, to prevent robots from colliding with each other, we consider the repulsive potential function V c i (r) given by where k c , σ c ∈ R + are the adjustment parameters. The set N i [k] = {j ∈ V p i − p j ≤ ρ} is the set of other robots that the robot detects with its sensors. V c i (r) is a circularly spreading potential function. u c i [k] are given by the gradient of the corresponding potential function: where α > 0 is the step size. The problem this paper considers is to reduce the robot oscillatory behaviour near obstacles and to recover the formation after the avoidance of obstacles. Two issues are raised against the column formation (10)-(17). The first issue is to alleviate the imbalance between the attractive force for preserving the formation and the repulsive force for avoiding obstacles. In addition, there is a force imbalance between the robots in the formation control. The second issue is to eliminate the stagnation of the swarm robots in front of the large obstacle. A solution to the first issue is to design a new network weight a ij instead of (7). We design the network weight a ij in (13) depending on the relative distance between the robots. Also, as a solution to the second issue, we design the input u o [k] in (10) that changes the shape of the time varying potential function depending on the relative angle between the robot and the obstacle.

Main results
To consider the two issues, we introduce the variableâ i that represents the detection/nondetection of obstacle (= 1, 2, . . . , c) by robot i as follows [16]: where D > 0 is a threshold of detection/nondetecton, p o is the coordinate of obstacle , r and R are radius of robot i and obstacle , respectively. This variableâ i is used in the design of the network weight function and the time-varying potential function.

Design of network weight function
This section considers the first issue related to the network weight a ij in (13). We apply a network weight function depending on the distance between robots to preserve the formation of swarm robots after the collision avoidance. The previous study [9] proposes two types of network weight functions. The first one takes into account the distance between robot i and robot j as follows: In Figure 3(a), the orange line shows the shape of a ij . The weight a ij corresponds to the strength of the connection between robot i and robot j. The distance between the robots decreases, the corresponding strength increases. The second one takes into account the disconnection of the network: where σ > 0 is a threshold. As shown in the blue line of Figure 3(a), this weight becomes 0 when the strength of the connection between the robots is less than σ . The weight a ij in (20) includes the weight a ij in (19) as a special case σ → 0. This disconnection eliminates the imbalance between the attractive force for preserving the formation and the repulsive force when the robots diverge each other due to the collision avoidance. On the other hand, there still remains the imbalance force when the distance between the robots becomes close. This phenomenon is demonstrated in Section 5. To solve the above open problem of [9], this paper proposes a new network weight function that changes its value depending on the displacement between the robot relative distance p i − p j and the desired distance d as shown in Figure 3(b). That is, the proposed network weight function is defined as follows: This works to weaken the formation control when the distance between the networked robots is greater or less than the desired distance d as shown in Figure  3(b). (21) may alleviate the force imbalance when the desired formation cannot be maintained due to the obstacle avoidance. The effectiveness is demonstrated in Section 5.

Time-varying potential function
This section considers the second issue related to the input u e [k] in (10). To avoid the obstacles, the previous work of the current authors [9] uses a circularly spreading potential function. The large number of robots causes stagnation around obstacles. This situation will be demonstrated in Section 5. To address this issue, this paper considers a time-varying potential function. The basic idea is the potential function considering the relative angle between the robot and the obstacle [11].
First, we explain the potential function proposed in [11]. r denotes the vector of r = [x y] T . The repulsive potential function V o i (r) for robot i to avoid obstacle is given by where k o , σ o ∈ R + are the adjustment parameters. w (θ go i ) is the weight function depending on the relative angle θ go i between the robot and the obstacle. If w (θ go i ) is constant, (22) is a circularly spreading function whose exponent is the distance between robot i and obstacles (= 1, 2, . . . , c). The previous study [11] achieves smooth collision avoidance by introducing the weight function w (θ go i ). The target position of [11] is a single point, while the target position of this paper is not a single point for the straight-line movement. For simplicity of explanation, we use the relative angle that is in line with the problem setting of this paper as shown in Figure 4. The relative angle θ go i between the direction of robot i and obstacle is given by where e x is the unit vector in the x-axis direction. The weight function w (θ go i ) proposed in [11] enables us to change the range of influence of the repulsive force, for example, from circularly spreading to teardrop spreading. The weight is given by where c s , θ s ∈ R + are the adjustment parameters, rad() is the radian of the angle unit. Varying the repulsion potential function based on the relative angle can avoid an unnecessarily large turn due to the collision avoidance. Second, based on the above idea, we consider the mitigation of the stagnation phenomenon when swarm robots avoid the large obstacle. The stagnation of swarm robots causes a misalignment of the robot positions. This makes it difficult for the robots to preserve the desired formation after avoiding obstacles. To avoid this problem, we consider changing the shape of the potential function from a circle to an ellipse. In addition, we adjust the lengths of the major and minor axes based on the positional relationship between the robot and the obstacle. The resulting time-varying repulsive potential function makes the swarm robots stay in the desired formation after avoiding obstacles. Specifically, the repulsive potential function V o i (r) for robot i to avoid the obstacle is given by where k x , k y ∈ R + are the adjustment parameters, p ox , p oy are the x, y coordinates of the obstacle . The initial shape of the repulsive potential function is elongated in the direction of x-axis when the relative angle θ go i is almost all 0. The shape shrinks in the direction of x-axis and goes to a circular one as the robot approaches the obstacle in the direction of x-axis and crosses the obstacle. The situation is shown in Figure 5.
Finally, the input u o i [k] is given by the gradient of V o i (r) is given by where α is the step size. Applying the time-varying repulsive potential function, we can generate a trajectory (solid red line) for the robot that smoothly avoids obstacles as shown in Figure 6.

Numerical experiment
In this study, numerical experiments are conducted using MATLAB. The five experimental patterns prepare a combination of the network weight a ij and the potential function V o i (r) used in (26) against the column formation (10)- (15). This paper verifies the trajectories and analyses the stability of the swarm robots. Table 1 shows the parameters for each experiment. In this paper, gain tuning is a trial-and-error process. The larger the size of the obstacle, the larger the gain. The sensing range ρ should be larger than D, since the   size of the obstacle is taken into account in the design of (25).
(a) The network weight a ij is (7) and the potential The network weight a ij is (19) and the poten- [9]). (c) The network weight a ij is (20) and the poten- [9]). First of all, we focus on convergence in steady state without collision. The convergence with respect to the objective function is shown in Figure 7 where only V g is considered because V g is for tracking. The target xcoordinate of the first row (i = 1, 2, . . . , 100) is set to x g and the target position of the robots in the n th row from the top is set to x g − n d. Figure 7 shows that the all patterns converge to the target position after enough time has passed. This result indicates that the all potential functions do not adversely affect the objective function V g for tracking in a collision-free steady state.
In the following sections, the target position is set to a common value for all robots for simplicity (all x i g are the same) and we discuss the oscillatory behaviour and stability of the algorithms during collision avoidance.

Trajectories
The results of numerical experiments are shown in Figures 8 and 9. The solid black line represents the trajectory of the swarm robots, and the gray circles represent the obstacles. Pattern (a) is the power imbalance between maintaining formation and avoiding obstacles, Patterns (b)(c) are the force imbalance between robots in formation control, Pattern (d) is the non-recovery of the formation after avoiding obstacles, Pattern (e) is recover formation after avoiding obstacles. In pattern (a), oscillatory behaviours are observed near the obstacles. Patterns (b) and (c), to which the method of the previous study [9] is applied, also show oscillatory behaviours. This is because the repulsion force becomes too large due to the network weight functions (19) and (20) when the robots are too close to each other. As a result of increasing the total number of robots, the oscillation could not be reduced by the method of the previous study [9]. In pattern (d), we use the proposed network weight function (21) and a potential function with weights that adjust the repulsion depending on the angle [11]. Pattern (d) of Figures 8 and 9 shows that the proposed network weight function (21) reduces the oscillatory behaviours near obstacles. However, the swarm robots are not able to recover to the desired formation after avoiding obstacles. The cause of this is thought to be the stagnation of the swarm robots in front of the large obstacle. In pattern (e), which uses the proposed potential function (25), the swarm robots are able to recover to the desired formation without stagnating in front of the obstacle. Figure 10 shows the x-coordinate of the robots (i = 1, 2, . . . , 100) at the head of the formation as the ordinate and the number of steps k as the abscissa. These figures indicate the degree of convergence to the target x-coordinate x g . Since the variation of Pattern (e) is small against Patterns (a)-(c), it is considered  that the imbalance between the attraction of the formation control and the repulsion of obstacle avoidance has been alleviated by the proposed method. Also, comparing Pattern (e) with Pattern (d), we see that the time-varying repulsive potential function eliminates the stagnation in front of obstacles during the formation movement.

Stability analysis
To analyse the proposed method, we approximate the entire robots behaviour to the form p[k + 1] = A[k]. Specifically, for each step, we obtain a linear approximation system and its eigenvalues. When the maximum eigenvalue exceeds 1, it means that the robots leave the desired position and diverge due to obstacle avoidance. For Patterns (a), (b), (d), and (e), the eigenvalues are obtained as real numbers because the coefficient matrices are symmetric. In Pattern (c), the coefficient matrix is sometimes not symmetric because of the network disconnections. In Figure 11, we compare the maximum eigenvalues for each pattern. This figure shows that the maximum eigenvalues of Patterns (a)-(c) are oscillatory and the robots divergence is large. In Patterns (d) and (e), the maximum eigenvalues are not oscillatory and the robots divergence is small. Pattern (c) has the highest robots divergence among all patterns, and Pattern (e) has the lowest. The reason of the worst result due to Pattern (c) is that we increased the total number of robots compared to the problem setting in the previous study [9]. In the previous study [9], the oscillatory behaviour is not completely suppressed, and it is believed that the increase in the total number of robots caused the oscillation to propagate. The proposed method in this study can be applied even when the total number of robots is increased, and this method is considered to be effective. Also, the maximum eigenvalues for different values of gain and sensing range for obstacle avoidance are summarized in Table 2. From this, pattern (e) is the smallest even when the gain is changed. In other words, the two proposed methods have the lowest degree of instability regardless of the gain value.

Conclusion
This paper has proposed a network weight function and a time-varying repulsion potential function for obstacle avoidance of swarm robots in column formation. The proposed network weight function is a method to reduce the force of the formation control according  to the distance between robots. The repulsion potential function is a method to change the shape according to the angle between the direction of motion and the obstacle. From the results of the numerical experiments, the oscillatory behaviour of the swarm robots during obstacle avoidance is reduced compared to the conventional method, and the desired formation can be preserved after passing through the obstacle. Future work is a generalization of the parameter selection and consideration of the limited sensor range.

Disclosure statement
No potential conflict of interest was reported by the author(s).