Null-Space-Based Time-Varying Formation Control of Uncertain Nonlinear Second-Order Multiagent Systems With Collision Avoidance

In this article, the time-varying formation control problem with collision avoidance is addressed for uncertain nonlinear second-order multiagent systems in a null-space-based behavioral control architecture. To guarantee the tracking and coordination performance simultaneously, a novel and flexible time-varying formation task strategy is designed where only neighborhood information is necessary. Moreover, the agent radius and a sine function are introduced such that the collision avoidance task function describes collision risk more accurately in contrast to existing results. Then, two fixed-time sliding mode controllers with constant and variable exponent coefficients, respectively, are proposed to track the desired trajectory generated by null space projection. Also, the theoretical results for the task design and trajectory tracking are obtained by using the Lyapunov stability theory. Numerical simulation and practical experiments are finally conducted to illustrate the effectiveness and superiority of the proposed method.


I. INTRODUCTION
T IME-VARYING formation of multiagent systems (MASs) is a significant topic and has attracted extensive attention, which has wider applications, e.g., resource exploration and collaborative rescue, compared with fixed formation. For secondorder and higher-order MASs, the state or output time-varying formation problems were studied in [1], [2], [3], [4]. However, collision avoidance (CA) was not considered, which is essential due to unreasonable path planning and other stochastic factors. The collision between agents usually brings unrecoverable physical damage to the overall system, and thus, it is necessary for MASs to be equipped with the function of CA.
To deal with the collision problem, there are generally three categories of approaches, including model predictive control (MPC) approach, artificial potential field (APF) approach, and null-space-based behavioral (NSB) control approach. The MPC approach solves the optimization problem by considering distance or relative velocity constraints, and then generates a collision-free trajectory to achieve CA [5], [6], [7]. However, the high computational amount of the MPC approach is still a problem for distributed MASs with limited resources. The APF approach is that when an agent enters the potential field of another agent, it will be subject to a repulsive force so as to increase the distance between them [8], [9], [10]. Different from the APF approach, the NSB approach has the foresight ability for collision, and further is widely suggested in view of its capability to handle multitask constraints. The NSB approach was applied to multirobot systems in [11] as well as autonomous surface vessels in [12]. Later, in [13], the rigorous stability analysis was given, and a simple condition to ensure the validity of tasks was obtained. In [14], theoretical and experimental results were provided for the trajectory tracking of UAVs. In [15], the controller for spacecraft formation with CA was designed by combining the relative position control and NSB control scheme. By using a barrier Lyapunov function, in [16], state constraints were relaxed to be time-varying, while achieving spacecraft formation with obstacle/CA.
Note that the results of NSB control in [11], [12], [13], [14], [15], and [16] were only concerned with asymptotic stability. However, in practical MASs especially for time-varying formation, fast convergence is usually desired. Therefore, how to achieve time-varying formation in finite time is worth studying.
For second-order uncertain nonlinear MASs and multiple mechanical systems, finite-time fixed formation problems were investigated in [17], [18], [19]. Nevertheless, the convergence time is dominated by initial states, and the convergence rate would not be ideal with inappropriate initial states. Hence, fixed-time convergence was discussed for second-order nonlinear agents in [20]. In existing finite-time and fixed-time control results, however, formation tasks were designed simply to track the leader without considering coordination with neighbors, and only the fixed formation was considered. Accordingly, the first challenging issue to be addressed in this article is: How to design a flexible formation task strategy to achieve the time-varying formation? Furthermore, the distances between agents were not directly used to obtain desired velocities for CA such that collision risk could not be accurately described. Therefore, the second challenge is: How to design a novel and practical CA task function such that the desired velocities for CA are directly determined by the distances between agents?
In particular, sliding mode control is a remarkable strategy to solve the fixed-time convergence problem [21]. In [22], a time-independent controller using terminal sliding surface was designed to achieve fixed-time stability. In [23], the extension of constant upper bounds to time-varying upper functions, as well as fixed-time stability, was achieved by developing a variable-gain sliding mode controller. Then, a state-dependent variable exponent coefficient was introduced for fixed-time stability in [24], and the singularity problem could be eliminated. However, the results in [24] were limited to scalar systems, and also, only the stability problem of individual systems was discussed. Clearly, the third challenge to be handled lies in how to transform the tracking control problem into a stability problem, and theoretical analysis in multidimensional space needs to be performed. Moreover, to the best of our knowledge, very few results have considered time-varying formation with fixed-time tracking in an NSB architecture.
Motivated by the abovementioned observations, the fixedtime time-varying formation control problem with CA is investigated in this article for uncertain nonlinear second-order MASs using the NSB approach, and the main contributions corresponding to the aforementioned three challenges are summarized as follows.
1) Design of the formation task: Compared with [15], [16], [17], [18], [19], and [20], a novel and flexible timevarying formation task strategy is designed, where the coordination performance and tracking performance can be adjusted according to the needs of designers, such that the total coordination error can be significantly reduced. 2) Design of the CA task: In order to describe collision risk more accurately and expand application scenarios, a CA task function is presented by introducing the agent radius and a sine function, of which the desired velocity increases as the distance between agents decreases. Moreover, it is worthwhile to point out that the proposed method is innovative and different from the existing CA results in, e.g., [15], [16], [17], [18], [19], and [20]. 3) Design of the trajectory tracking algorithm: By extending the results in [24] to the case of MASs in multidimensional space as well as integrating the sliding mode control and the NSB control, a robust fixed-time time-varying formation tracking control scheme is proposed, and the fixed-time results related to the number of agents are obtained. The rest of this article is organized as follows. In Section II, the system description and preliminary are given. In Section III, the main results are presented for the desired trajectory generation and controller design of fixed-time trajectory tracking. Simulation and experimental results are provided in Section IV to demonstrate the validity of the proposed method. Finally, Section V concludes this article.
Notations: In this article, the superscript "T" denotes transposition. R n is the n-dimensional Euclidean space. · p is the p-norm. sign(·) represents the sign function. The symbol (t) is omitted for simplicity throughout this article, e.g., p i (t) is simplified as p i . The subscripts "i" and "j" of symbols correspond to agents i and j, respectively, which are used to denote two different agents.

A. System Description
In this article, a class of uncertain nonlinear second-order MASs with one virtual leader and N followers is considered. The virtual leader is labeled as i = 0, and the followers are i = 1, 2, . . . , N. Their dynamics are described by where , and u i ∈ R 3 are the state, position, velocity, and control input for agent i, i = 0, 1, . . . , N, respectively, f (·) and g(·) are continuous nonlinear functions satisfying f (0) = 0 and g(·) = 0, and d i ∈ R 3 is the parameteric uncertainty or external disturbance of follower i with d i 1 ≤ δ 1 , where δ 1 > 0 is a constant.

B. Preliminary
A directed communication topology G without self-loops for followers is considered, and the adjacency matrix A is composed of element a ij , where a ij = 1 denotes agent i can receive information from agent j; otherwise a ij = 0. To characterize the connections between followers and the virtual leader, the graph G, including the graph G and the virtual leader, is introduced, in which the virtual leader is the root node. Let b i = 1 when there is a directed path from the virtual leader to follower i; otherwise b i = 0. It is essential that the graphG has a directed spanning tree.
If there exists a continuously differentiable positive definite Lyapunov function candidate V (z) such thaṫ where α 0 > 0, β 0 > 0, p > 1, and 0 < q < 1 are all real numbers. Then, system (3) is fixed-time stable, and the settling time T is given by

III. MAIN RESULTS
In this section, the generation of the desired dynamic path is presented by considering time-varying formation and CA simultaneously. After the desired trajectory is obtained, two fixed-time sliding mode controllers are designed by using constant and variable exponent coefficients, of which the theoretical analysis is given.

A. Desired Trajectory Generation
As shown in Fig. 1, the NSB control method is employed to perform both the time-varying formation task and the CA task. Clearly, the priority of the CA task is higher than that of the time-varying formation task. When the two tasks conflict with each other, the desired velocity of the low-priority task is projected onto the null space of the one of high-priority task, and thus, the desired state x d,i , including the desired trajectory p d,i and the desired velocity v d,i , can be obtained [19].
Define the time-varying formation task function as follows: With the characteristic of time-varying formation, the coordinate of follower i in the desired time-varying formation is where the parameters 0 ≤ 1 ≤ 1 and 0 ≤ 2 ≤ 1 are used to adjust the weight of the tracking performance and the coordination performance with 1 + 2 = 1, respectively, δ pi is the desired position offset relative to the virtual leader and its derivative is bounded (clearly, the desired formation shape is determined by , andp 0,i is the position estimate of the virtual leader in follower i, which can be obtained in finite time using the sliding mode estimator in [27] under Assumption 1 as follows: where c 1 and c 2 are the parameters of the estimator, andv 0,i is the velocity estimate of the virtual leader in follower i. Based on the NSB control method in [13], the desired velocity for time-varying formation is given as follows: Remark 1: From (8)-(10), it can be seen that only the neighborhood agents' information is needed, and thus, the proposed method is fully distributed rather than centralized control. In addition, the existing NSB control methods in [16], [17], [18], and [19] only considered the time-invariant formation, and the coordination between followers was ignored. For example, the formation task function was designed as [19], and the global information was requisite due to the term (9), however, the numerator of σ fd,i is composed of two parts with different weight coefficients: one realizes the tracking performance, and the other achieves the coordination with neighborhood agents. Then, the desired time-varying formation coordinate of follower i is obtained by the weighted average operation of the two parts. Clearly, if 1 = 1 and 2 = 0, only the tracking performance is considered, and if 1 = 0 and 2 = 1, only the coordination performance can be guaranteed. As a result, the proposed time-varying formation task strategy is flexible, and the parameters 1 and 2 can be chosen according to the needs of designers.
Define the CA task function as follows: Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply. where r is the radius of all ball-like agents, R is the radius of the collision warning area satisfying R > 2r, and p ca i is the coordinate of the center of the agent closest to agent i. The desired velocity for CA is whereσ ca,i = σ * ca,i − σ ca,i is the CA task error, and σ * ca,i = R is the fictitious sphere, λ ca is a positive gain, which is large enough in terms of actuator constraint, and Remark 2: In [16], [17], [18], [19], and [20], the desired velocity for CA task was only related to the distance d 1 or d 1 − r, as shown in Fig. 2(a), but in fact, collision risk is determined by the distance d 2 − 2r. For further illustration, the CA case between agents i and k is considered in Fig. 2(b), as a comparison with that between agents i and j. It is clear that if d 1 − r = d 3 − r 1 , the same desired velocity for the CA task is obtained according to the CA algorithms in [16], [17], [18], [19], and [20]. Thus, the collision risk between agents i and k is greater than that between agents i and j since r 1 > r, and a greater desired velocity should be obtained due to d 2 − 2r > d 4 − r − r 1 . Therefore, it is necessary to design a CA task function such that the desired velocity is directly determined by the distance d 2 − 2r in Fig. 2(a). Also, the radius of agents is introduced into (12) such that the proposed method is more suitable for agents with different sizes in practical applications. Furthermore, when the CA task function (12) is active, that is, 2r < p i − p ca i 2 ≤ R, v ca,i approaches the maximum value as p i − p ca i 2 → 2r, and thus, collision risk can be exactly characterized by [16], [17], [18], [19], [20]. Thus, the CA task is effectively constructed.
Remark 3: In (12), p ca i is assumed to be a static ball-like obstacle to obtain the concise algorithms (13) and (14), which is common (see [16] and [17]) and reasonable in practical applications. When the coordinate of agent j is treated as p ca i , the desired velocity v ca,i will be generated to make agent i away from agent j. Also, similar algorithms are performed in agent j, and thus, the CA between agents i and j is achieved. With the constant p ca i , the complicated calculation coming from (13) and (14) is avoided, which is helpful for agents with limited energy. If p ca i in (12) is time-varying, (13) and (14), as well as the subsequent theoretical analysis, need some minor improvements by combining the proposed task function and the results in [20]. As an extension, the obstacle avoidance task function for dot-like and/or linear obstacles can be designed as σ oa,i = R − Rsin π , where p oa i is the coordinate of the closest point of the obstacle to agent i. In practice, agents are generally equipped with proper detection devices (e.g., lidars or cameras) to obtain the positions of obstacles.
With the null space projection between the time-varying formation and CA tasks [17], [18], [19], the desired velocity trajectory is obtained by using (11) and (13) as follows: Then, the desired position trajectory p d,i can be obtained by taking the time integration of v d,i . For the desired velocity trajectory design, the following result is derived.
When the distances between agents are all greater than R, the CA task is not activated, and we have J f,i J † ca,i = 0. Then, the derivative of V σ iṡ whereṗ i = v d,i is used and its interpretation refers to [13]. M is an existing constant such that the inequality M ≥ N i=1 γ fσ T f,iσ fd,i holds because of the boundedδ pi andv 0,i .
Integrating the both sides of (17) yields When there is a conflict between the time-varying formation task and the CA task, the derivative of V σ iṡ where J f,i 2 = 1 is used, and γ ca ≥ 1 2 γ f J † ca,i 2 is prerequisite. Similar to [16], [17], and [18], since the CA task, rather than the time-varying formation task, must be first guaranteed in the presence of collision risk, V σ is redefined as V σ = 1 2 N i=1 γ caσ 2 ca,i , and its derivative satisfiesV σ = − N i=1 γ ca λ ca σ ca,i 2 2 ≤ 0, and then, the similar convergence properties and stability can be obtained as the aforementioned collision-free case, which completes the proof.

B. Controller Design for Fixed-Time Trajectory Tracking
With the desired position trajectory obtained abovementioned, the tracking error for follower i is defined as follows: where e i,1 and e i,2 are the position and velocity tracking errors, respectively. From (2) and (20), we have where v d,i 1 is assumed to be bounded satisfying v d,i 1 ≤ δ 2 , and δ 2 is a positive constant. Remark 4: Based on (11), (13), and (15), with the properties of the norm, it can be ensured that v d,i 1 is bounded with appropriate u 0 and δ p .
Inspired by Moulay et al. [24], two robust fixed-time sliding mode controllers are designed by using constant and variable exponent coefficients.
First, the constant exponent coefficient case is considered, and a sliding surface is constructed as follows: where β > 0. Then, the sliding mode tracking controller is Then, the trajectory tracking control problem is solved in the following theorem.
Theorem 2: Using the proposed control law (23) with (22), the global robust asymptotic stabilization is achieved for system (21) with the desired trajectory p d,i and v d,i . In particular, the sliding manifold s i = 0 is reached in a fixed time, and the settling time satisfies .

(24)
Proof: Consider the Lyapunov function candidate (25) and the derivative of V s iṡ where s i 1 ≥ s i 2 and Lemma 2 are used. Then, according to Lemma 1, it is deduced that system (2) with (22) and (23) reaches the sliding surface s i = 0 in a fixed time T 1 satisfying (24). When the sliding surface is reached, we geṫ which guarantees the asymptotic stability of system (21). The proof is finished. Remark 5: With (21) and (23), the derivative of (22) iṡ In (23), the term k 1 sign(s i ) is used to deal with unknown d i anḋ v d,i , and combining with it, the term k 2 s i α 2 sign(s i ) can drive (28) to achieve fixed-time stability. It is easy to observe from (24) that, although the parameters k 3 and k 4 have no effect on the stability of (28), they can make controller (23) more flexible. Second, to achieve both reaching phase and sliding motion in fixed time, the sliding surface with a state-dependent timevarying exponent coefficient is introduced as follows: where β * > 0, λ * > 0, and μ * > 0 satisfying θ * = λ * 1 + μ * > 1.
Theorem 3: With the desired trajectory p d,i and v d,i , system (21) achieves global robust fixed-time stabilization by control law (30) with (29), and the settling time T 2 satisfies Proof: Consider the following Lyapunov function: Taking the derivative of Vs yieldṡ Similar to the aforementioned constant exponent coefficient case, the sliding surfaces i = 0 is reached in the following fixed time: When the sliding surface is reached, we havė λ * e i,1 sign(e i,1 ). (32) For the system (32), consider the following Lyapunov function: Taking the time derivative of Vẽ, one obtainṡ Next, two situations are discussed. When e i,1 2 ≥ 1, we have λ * e i,1 According to ([24], Th. 2), all the solutions starting from When e i,1 2 ≤ 1, with 1 + μ * e i,1 Hence,Vẽ . Therefore, the global robust stabilization problem is solved in a fixed time T 2 = T 21 + T 22 + T 23 . The proof is completed. Remark 6: It is noted that only the robust fixed-time stability problem was addressed in [24] for scalar systems, and the results cannot be directly applied to multidimensional space. In this article, by utilizing the behavior control approach and the properties of norm inequalities, the results in [24] are extended to the time-varying formation tracking control scenario in multidimensional MASs. Furthermore, the results of the settling time are derived, which are related to the number of agents, just as shown in (24) and (31). In addition, different from [19], two fixed-time control strategies are proposed with constant and variable exponent coefficients in multidimensional space, respectively.

IV. SIMULATION AND EXPERIMENTAL RESULTS
In this section, numerical simulation and practical experiments are conducted to verify the effectiveness and superiority of the proposed method. Due to the limited space, only the variable exponent coefficient case of the tracking controller is tested in the following simulation and experiment.
The simulation results are shown in Figs. 4-6. It can be seen from Fig. 4 that the followers form a square formation to track the virtual leader, and the side length of the square is time-varying.     Fig. 6 gives the distances between followers with and without CA, which indicate that a collision-free formation is achieved in the presence of task conflict.
For comparison, the simulation is carried out for the formation method in [16] with the following desired coordinate of follower i: i=1ē i is served as a performance indicator, of which the simulation are drawn in Fig. 7 for the proposed method and the method in [16]. It is obtained that 10 t=0 S is 2.4683 × 10 6 and 3.3603 × 10 6 for the two cases, respectively, which indicates that a better coordination performance is achieved by using the proposed method.

B. Experimental Results
An experimental platform is built to further demonstrate the effectiveness and feasibility of the proposed formation control scheme, as shown in Fig. 8, which mainly consists of an optical action capture system (i.e., a camera-based positioning system), a Linux-based host computer, and three small vehicles equipped with a robot operating system (ROS). The software named Seeker and four cameras with resolution of 12 MP and frequency of 300 Hz are the main components of the positioning system. When the vehicles with marker points are located in the workspace, they are captured by the cameras such that their absolute positions and velocities with respect to the global coordinate system, as well as other relative kinematic data, are obtained after calculation and analysis. The Linux-based host computer receives position and velocity information from cameras, and then transmits data to vehicles. Based on the obtained data and the proposed method, the control inputs produced in ROS are applied to vehicles.
The vehicles are considered as the ball-like agents with r = 0.15and R = 0.35 m, and two experiments are performed. One is the fixed formation with CA, and the other is the time-varying formation with obstacle avoidance. In the two experiments, one of the three vehicles acts as the leader, and the other two vehicles are the followers. Furthermore, the communication topology is directed, where only follower 1 can receive information from the leader, and follower 2 can obtain information from follower 1. The leader is autonomous and moves along a straight line with a constant speed v 0 = 0.1m/s. The control target is that the followers track the leader, while maintaining a prescribed formation. Since the dynamic of each vehicle can be approximated as a double integral system, the controller parameters in the simulation part are used for the practical experiments.
The desired formation shapes for the formation experiments are described as follows:   where δ f pi and δ t pi denote the desired position offsets for the fixed and time-varying formation, respectively, i = 1, 2. The corresponding experimental results are shown in Figs. 9 and 10, respectively. As illustrated in Fig. 9(a), three vehicles start from their respective initial positions, and eventually form a triangular formation. The evolution of the distances between vehicles indicates that collision does not occur because of p ij 2 > 2r. On the contrary, without CA, follower 1 collides with follower 2 at time t = 4.47 s, and then the trajectories of three vehicles become chaotic [see Fig. 9(b)]. It is worth pointing out that in Fig. 9, only the experimental result of 11 s [less than 35 s in Fig. 9(b)] is presented because followers 1 and 2 are hard to separate after the collision. In addition, the distance between followers 1 and 2 cannot be less than 2r after the collision in the experiment, unless they are deformed. Fig. 10 shows that the formation shape is time-varying. Furthermore, from the comparison of the upper and lower figures of Fig. 10, it is easy to see that follower 2 has notable actions to avoid an obstacle.

V. CONCLUSION
In this article, the problem of time-varying formation control was studied for uncertain nonlinear second-order MASs in an NSB architecture. Novel time-varying formation task and collision avoidance task strategies were designed to generate the desired motion trajectory. Subsequently, sliding-mode tracking controllers were designed for constant and state-dependent variable exponent coefficient cases, respectively. Then, the theoretical analysis was made for the desired trajectory generation and the fixed-time trajectory tracking. Finally, both the simulation and experimental results were presented to illustrate the validity and applicability of the proposed method. It is noted that mismatched disturbance was not considered in this article [29]. In addition, the cooperation between agents was generally achieved via networks, and thus, some communication constraints, such as network delays, packet dropouts, and even cyber-attacks, were inevitable in practical applications [30], [31], [32]. These issues will be addressed in our future work to further extend the proposed method.