Abstract
This study addresses the problems of formation control and obstacle avoidance for a class of second-order multiagent systems with directed topology. Formation and velocity control laws are designed to solve the formation tracking problem. A new obstacle avoidance control law is also proposed to avoid obstacles. Then, the consensus control protocol consists of the formation, velocity, and obstacle avoidance control laws. The convergence of the proposed control protocol is analyzed by a redesigned Lyapunov function. Finally, the effectiveness of theoretical results is illustrated by simulation examples. The simulation results show that the formation tracking problem of the given multiagent systems can be realized and obstacles can be avoided under the proposed control protocol.
1. Introduction
The cooperative control problem of multiagent systems has been attracted outstanding attention in the past few years due to its widespread applications in multisensor systems [1], mobile robot systems [2, 3], unmanned aerial vehicle systems [4, 5], power distribution networks [6], and so forth. The basic problem of cooperative control is consensus, in which the objective of consensus is to design an appropriate control protocol, such that the output of all agents can achieve synchronization or track a desired trajectory.
Currently, the consensus control problems of multiagent systems have been extensively addressed in existing papers. Many control protocols have been designed to achieve the consensus control of multiagent systems. In [7], the distributed linear control protocol for the linear multiagent systems with limited interaction ranges was designed. Iterative learning control protocols were proposed in [8–10] to solve the consensus tracking problem of nonlinear multiagent systems. In [11], the consensus problem of nonlinear multiagent systems with directed topology and communication constraints was investigated, in which each agent communicated only with its neighbors. Moreover, in [12], a consensus protocol with the local state information was proposed to solve the event-triggered control problem of general linear multiagent systems. The finite-time consensus tracking control problem of multiagent systems with uncertain nonlinear dynamics and error constraints was investigated in [13], in which the nonsingular fast sliding mode control technique was used.
It is not difficult to see from the abovementioned papers that the research on the consensus control problem of multiagent systems has achieved rich results. However, these papers do not further analyze the formation control problem of multiagent systems. As an important research direction, the formation control problem has played an important role in many fields, such as the formation control of spacecraft [14], multiple aerial vehicles [15], multiple quadrotors [16], and mobile robots [17–19]. The formation control of multiagent systems has been discussed in some studies. In [20], the optimal formation problem of first-order multiagent systems with fixed communication topology was considered. In [21], the formation tracking problem with distributed observer was addressed, in which the distributed formation tracking control protocol was constructed. The control protocol with communication time-varying delay was presented in [22]. Furthermore, the formation control strategy with position estimation [23] and the distributed formation iterative learning control protocol [24] were also addressed. Meanwhile, the consensus control protocols for the multiagent systems were proposed to solve the problem of collision avoidance [25–27]. It should be pointed out that the results on the formation control or the control of collision avoidance are discussed separately. To the best of the authors’ knowledge, however, it should be paid attention to prevent the collision with obstacles while solving the formation problem of multiagent systems. However, the problem has received minimal attention in the existing literature.
Inspired by the abovementioned facts, this study investigates the formation control and obstacle avoidance for a class of second-order multiagent systems with directed topology. The main contributions of this work are as follows: (i) the formation control law and velocity control law are designed to solve the formation tracking problem of given multiagent systems with directed topology. Furthermore, a new obstacle avoidance strategy is proposed to guarantee that all agents avoid obstacles. (ii) By comparing with the control protocols proposed in [24–26], the current consensus control protocol consists of the designed formation control law, velocity consensus control law, and obstacle avoidance control law. The purpose of this is to solve the formation control and obstacle avoidance problems of the given multiagent systems at the same time. (iii) To prove the convergence of the proposed control protocol, a new Lyapunov function is structured in this paper. Finally, two simulation examples are provided to illustrate the effectiveness of the proposed control protocol.
The remainder of this paper is organized as follows. Graph theory is introduced in Section 2, and the problem formulation is given in Section 3. In Section 4, the control protocol design and convergence analysis are discussed. Next, the simulation examples are provided to illustrate the effectiveness of theoretical analysis in Section 4. Finally, conclusions are drawn in Section 5.
2. Graph Theory
Let denote a directed graph with a set of nodes and a set of directed edges . The weighted adjacency matrix is , where if and only if ; otherwise, . Agent is called the neighbor of if agent receives the information from agent . The set of neighbors of agent is defined as . The Laplacian matrix is denoted by , where with . The graph is connected if there exists a path between any two vertices.
In this paper, the multiagent systems with n agents are considered. Hence, the exchange information among agents can be modeled as the directed graph n with n nodes. According to the related knowledge of the graph theory , we can theoretically analyze the control problem of multiagent systems. In addition, in order to achieve the desired formation shape, the distance between agents should be set. Hence, in this paper, let the matrix h is defined as the desired formation shape of given multiagent systems. Here, the matrix and with being the desired distance between agent and agent .
3. Problem Formulation
In this paper, a class of second-order multiagent systems with n agents is studied, and the agent’s dynamics are described aswhere , , and () are the position, velocity, and control input of agent , respectively.
To facilitate the following discussion, the time variable will be ignored if there is no ambiguity. In addition, some definitions and lemmas are given as follows.
Definition 1. Function for is a nonnegative function if the following properties are satisfied at the same time:(1) for (2) for (3) for where is the Euclidean distance from agent to , i.e., .
Lemma 1. For a given multiagent system, let be the gradient function of a continuous differentiable function ; then, the following property is held:
Proof. For a given multiagent system, let ; then, one hasFurthermore, we can obtainFor the given multiagent systems, it is easy to obtain that , where represents the Euclidean distance from agent to , and then, we have . Hence, on the basis of equations (4) and (5), one obtainsConsidering equation (6), we obtainand it is obtained thatThe proof is completed.
The control objective of this study is to design a suitable control protocol (), such that the output of all agents can achieve desired formation shape without obstacles, that is, and , where and . Meanwhile, it is also guaranteed that the desired formation shape can be maintained after avoiding obstacles.
4. Control Protocol Design and Convergence Analysis
4.1. Control Protocol Design
On the basis of Definition 1, the nonnegative function is designed aswhere is the formation control coefficient. The curve of function is shown in Figure 1.

Figure 1 presents that regardless of how to change the distance between agents and . That is to say, for and , and for , where . This condition implies that agents and can hold the desired distance. Therefore, the formation control law of the given multiagent systems can be designed as
To maintain the velocity consensus, a velocity control law is designed aswhere is called velocity adjust function and represented aswhere is the velocity control coefficient. On the basis of equation (12), the function will be equal to zero as for .
When obstacles exist in the environment, to prevent the collision with obstacles, a new control strategy for agent is regarded aswhere is the avoidance control coefficient; is the position of agent ; , , and represent the center, radius, and maximum detection radius of an obstacle, respectively; and is the Euclidean distance between agent and an obstacle.
By taking gradient of function ,
By checking equations (13) and (14), we have from equation (13), which implies that is continuous at , and from equation (14), which indicates that is also continuous at .
On the basis of the above analysis, the new obstacle avoidance control law can be designed as
Hence, considering the formation control law , velocity control law , and obstacle avoidance control law , the consensus control protocol for agent can be selected as , that is,
4.2. Convergence Analysis
The main results of this work are shown in Theorem 1.
Theorem 1. Consider the multiagent system (1) with the directed communication topology and the consensus control protocol (16), and assume that multiple obstacle surroundings being considered or not; then, all agents can achieve the desired formation shape and maintain the velocity unchanged, i.e., and with and . Meanwhile, the desired formation shape will still be held after avoiding obstacles.
Proof. The Lyapunov function candidate is considered:On the basis of equation (17), and are continuously differentiable in and . As shown in equation (13), is also a differentiable function. Equation (17) presents that . Figure 1 indicates that the second item in equation (17) is easily obtained. Furthermore, function is obtained from the description of equation (13). Then, the third item in equation (17) can be acquired. Equation (17) is hence an effective Lyapunov function, and .
By taking the derivative of function along with and , we havewhere the control protocol (16) is applied.
Lemma 1 is considered, and we obtainSubstituting equation (19) into (18) results inSubstituting equation (12) into equation (20) yieldsIfthen we have .
The preceding analysis implies that if and only if . Moreover, let , and obtain . Thus, the consensus problem of the multiagent system (1) can be achieved.
Considering equation (9), letwhere is the equilibrium point of the multiagent system (1), and equation (17) has the minimum value under the equilibrium point.
The analysis of equation (23) shows that each agent can maintain the desired distance , that is, , which indicates that the desired formation is achieved. Function is a bounded function due to . Therefore, the agents can avoid obstacles under the consensus control law (16). The proof is completed.
5. Simulation Analysis
A class of second-order multiagent systems with four agents is considered. The desired formation shape is defined as a square. The length of the square is set as 4. The number of obstacles is set as 3. The dynamics of the four agents are described as equation (1), that is,and Figure 2 presents the directed topology among agents.

On the basis of Figure 2, adjacency matrix and desired distance are as follows:
The four agents’ initial positions are given as , , , and , and the initial velocities are given as , , , and , respectively. The positions of the three obstacles are set as , , and . The radius and detection radius of the three obstacles are , , and , respectively. The simulation time , and the other parameters are given as , , and .
Two simulation examples are provided below to illustrate the validity of theoretical analysis.
Example A. Consensus analysis without obstacles.
The formation tracking problem without obstacles is considered in this example. Figures 3–7 display the formation tracking results.
Figures 3 and 4 exhibit the tracking results of position and velocity without obstacles, respectively. By virtue of the results of Figures 3 and 4, it can be easily found that the consensus formation tracking problem of the multiagent system (1) with the designed control protocol (16) can be achieved. Figure 5 shows the desired formation shape, which indicates that the desired formation tracking problem can also be solved under the proposed control protocol (16). Figure 6 depicts the desired distance among agents. This is completely consistent with the theoretical results, which further illustrate that the control protocol designed in this paper is effective. In addition, the control input curves of the four agents are given in Figure 7.
Overall, the results of Figures 3–7 show that the control protocol designed in this paper is effective. Although the existence of obstacles is not considered, the four agents can still achieve consensus, and at the same time, they can achieve and maintain the desired formation shape.





(a)

(b)
Example B. Consensus analysis with multiple obstacles.
In this example, three obstacles are considered in the process of achieving formation tracking. The initial position and velocity of each agent are the same as those in Example A. Figures 8–12 display the formation tracking results.
Figures 8 and 9 show the tracking results of position and velocity with three obstacles, respectively. Although three obstacles are considered in the process of achieving formation tracking control, the consensus can still be solved under the consensus control protocol (16). The tracking results of position and velocity of the four agents have changed due to the existence of obstacles. Figure 10 presents the desired formation shape, which implies that the formation can be maintained after avoiding obstacles. As can be seen from Figure 10, when an obstacle appears during the operation of the agent, the agent will bypass the obstacle under the action of the designed control protocol. After circumventing obstacles, the agents will continue to maintain the desired formation shape under the control protocol. This also illustrates the effectiveness of the control protocol designed in this paper from another angle. Figure 11 exhibits the desired distance of the four agents. The results in Figures 10 and 11 illustrate the effectiveness of the theoretical results. Figure 12 displays control input curves.
In general, the consensus control protocol (16) designed in this study not only can achieve the desired formation control but also can avoid obstacles and maintain the formation shape after avoiding the obstacles.





6. Conclusions
The consensus problems of formation control and obstacle avoidance for a class of second-order multiagent systems with directed topology were considered in this study. The designed control protocol consisted of the formation, velocity consensus, and obstacle avoidance control laws. A designed Lyapunov function was applied to analyze the convergence of the designed consensus control protocol. Under the given directed topology, the formation control problem of the multiagent systems without obstacles was solved by using the designed consensus control protocol. At the same time, the desired formation control can be achieved and maintained despite the existence of obstacles in the environment.
Data Availability
The figure data used to support the findings of this study are included within the article.
Conflicts of Interest
The authors declare that they have no conflicts of interest.
Authors’ Contributions
Lichao Wang and Xing Li contributed equally to this work.
Acknowledgments
This work was partially funded by the Anhui Provincial Natural Science Foundation (no. 1808085MF182), Anhui Natural Science Foundation (no. 1808085MF182), Anhui Provincial Key Research and Development Plan Project-Special Scientific and Technological Cooperation with Foreign Countries (no. 1804b06020368), National Natural Science Foundation of Anhui Polytechnic University (no. Xjky02201906), and Youth Research Fund of Anhui Polytechnic University (no. 2017YQ03).