Time-Optimal Velocity Tracking Control for Consensus Formation of Multiple Nonholonomic Mobile Robots

The problem of velocity tracking is considered essential in the consensus of multi-wheeled mobile robot systems to minimise the total operating time and enhance the system’s energy efficiency. This study presents a novel switched-system approach, consisting of bang-bang control and consensus formation algorithms, to address the problem of time-optimal velocity tracking of multiple wheeled mobile robots with nonholonomic constraints. This effort aims to achieve the desired velocity formation in the least time for any initial velocity conditions in a multiple mobile robot system. The main findings of this study are as follows: (i) by deriving the equation of motion along the specified path, the motor’s extremal conditions for a time-optimal trajectory are introduced; (ii) utilising a general consensus formation algorithm, the desired velocity formation is achieved; (iii) applying the Pontryagin Maximum Principle, the new switching formation matrix of weights is obtained. Using this new switching matrix of weights guarantees that at least one of the system’s motors, of either the followers or the leader, reaches its maximum or minimum value by using extremals, which enables the multi-robot system to reach the velocity formation in the least time. The proposed approach is verified in a theoretical analysis along with the numerical simulation process. The simulation results demonstrated that using the proposed switched system, the time-optimal consensus algorithm behaved very well in the networks with different numbers of robots and different topology conditions. The required time for the consensus formation is dramatically reduced, which is very promising. The findings of this work could be extended to and beneficial for any multi-wheeled mobile robot system.


Introduction
Thanks to the greater functionality and performance of cooperative, mobile robot systems versus single mobile robots, they are highly beneficial and used in many applications such as hazardous material handling, surveillance, environment exploration, transportation of large objects, etc. Although the cooperative nature of these systems may result in greater efficiency and operational capability compared to a single mobile robot, it introduces a challenging control problem that must deal with consensus formation. For instance, in the works presented in [1,2] there are two examples in the domain of formations control for multi-agent systems in surveillance applications, and the control of spacecraft using formations control is presented in [3][4][5][6].
The study of consensus formation control of multi-agent systems ( Figure 1) can be classified into three categories: a leader-follower approach [7][8][9], the virtual structure approach [10,11], and decentralised control [12,13]. The leader-follower approach consists of a leader agent, a robot/vehicle or human operator who is entrusted to track a specified trajectory, and the follower agents are designed to follow the leader agent while achieving the desired formation and heading consensus. This approach is very useful, especially in surveillance and exploration applications. The virtual structure approach considers a multi-agent system as a single rigid robot with multiple input controllers. This approach is useful for large object transportation. The advantage of such an algorithm is the simplicity of the controller design. The decentralised approach, which includes the nearest neighbour approach, allows each robot to decide based on interactions with its neighbours. The advantage of this approach is its robustness against disturbances which makes it more suitable for military manoeuvres or automated highway applications [14][15][16][17][18]. Das et al. in [14] and Cao et al. in [15] nicely reviewed the cooperative search and formation control methods for multiple autonomous vehicles, which are helpful to learn more about these methods. Furthermore, a tutorial overview, together with several specific applications of consensus algorithms, was provided in [16]. Ren et al. in [17] addressed the double integrator dynamics of the agents in consensus algorithms and discussed the theoretical and practical aspects of this topic. Zhang et al. in [13] addressed a two-stage cooperative guidance strategy to achieve a salvo attack in directed topologies of multiple interceptors. At the first stage, a prescribed-time optimal consensus method was constructed offline. A novel fixed-time distributed guidance law based on the proportional navigation guidance law was designed by integrating a consistent control technique into the guidance strategy [19]. As shown in [13,19], the optimal consensus strategy was used along with other navigation systems for the control of multi-systems, such as for missiles. of a leader agent, a robot/vehicle or human operator who is entrusted to track a specified trajectory, and the follower agents are designed to follow the leader agent while achieving the desired formation and heading consensus. This approach is very useful, especially in surveillance and exploration applications. The virtual structure approach considers a multi-agent system as a single rigid robot with multiple input controllers. This approach is useful for large object transportation. The advantage of such an algorithm is the simplicity of the controller design. The decentralised approach, which includes the nearest neighbour approach, allows each robot to decide based on interactions with its neighbours. The advantage of this approach is its robustness against disturbances which makes it more suitable for military manoeuvres or automated highway applications [14][15][16][17][18]. Das et al. in [14] and Cao et al. in [15] nicely reviewed the cooperative search and formation control methods for multiple autonomous vehicles, which are helpful to learn more about these methods. Furthermore, a tutorial overview, together with several specific applications of consensus algorithms, was provided in [16]. Ren et al. in [17] addressed the double integrator dynamics of the agents in consensus algorithms and discussed the theoretical and practical aspects of this topic. Zhang et al. in [13] addressed a two-stage cooperative guidance strategy to achieve a salvo attack in directed topologies of multiple interceptors. At the first stage, a prescribed-time optimal consensus method was constructed offline. A novel fixed-time distributed guidance law based on the proportional navigation guidance law was designed by integrating a consistent control technique into the guidance strategy [19]. As shown in [13,19], the optimal consensus strategy was used along with other navigation systems for the control of multi-systems, such as for missiles. This paper considers the time-optimal velocity tracking problem of multiple wheeled mobile robots, extending the single robot case treated in [18]. Despite many previous works on the optimal control of multi-agent systems [20][21][22][23][24][25][26][27], we strongly believe that the methodologies and objectives of our work are novel as they differ from the state-of-theart. To get a better comparison, the previous representative works in this domain are listed in Table 1.
To the best of our knowledge, no research has been reported in which the motion time consensus along the desired formation of a group of mobile robots, to form and maintain a desired geometric pattern and follow the desired trajectory, is addressed as the objective function using a switching mechanism based on bang-bang control. In short, the This paper considers the time-optimal velocity tracking problem of multiple wheeled mobile robots, extending the single robot case treated in [18]. Despite many previous works on the optimal control of multi-agent systems [20][21][22][23][24][25][26][27], we strongly believe that the methodologies and objectives of our work are novel as they differ from the state-of-the-art. To get a better comparison, the previous representative works in this domain are listed in Table 1.
To the best of our knowledge, no research has been reported in which the motion time consensus along the desired formation of a group of mobile robots, to form and maintain a desired geometric pattern and follow the desired trajectory, is addressed as the objective function using a switching mechanism based on bang-bang control. In short, the main goal of this work is to find control inputs of a leader-follower multi-robot system to achieve the desired consensus velocity tracking formation in the least time. Table 1. The representative works on the optimal control of multi-agents.

Ref.
Date Proposed Method Objectives [21] 2014 A gradient-based optimisation algorithm, using the constraint transcription and a time scaling transform method.
An optimal parameter selection problem with continuous state inequality constraints and free terminal time.
[22] 2016 An improved gravitational search algorithm is used to optimise the trajectory of the path for multiple robots.
A multi-robot path planning problem in a dynamic environment.
[23] 2017 The direction priority sequential selection algorithm and extension-decomposition aggregation scheme are applied to solve the formation control problem and achieve collision avoidance during the formation manoeuvre.
A collision avoidance strategy based on the formation control model.

[24] 2017
Based on sliding-mode auxiliary systems, an adaptive near-optimal protocol is presented to control multi-agent systems.
A normal near-optimal protocol was designed by making an approximation of the performance index.
[25] 2017 A data-based adaptive dynamic programming method is presented using the current/past system data.
Used a discounted performance index and formulated the optimal consensus problem via the Bellman optimality principle.
[26] 2018 The fixed-time consensus theory and continuous-time zero-gradient algorithms are used Addressed the problem of the global cost function being the sum of strictly convex local cost functions.
[28] 2019 A dynamic allocation method is proposed to increase exploration capabilities, extending them in both the inclusion phase and consensus phase of the tasks.
They solved the problems of allocation approaches that tended to trap in a local optimal and cannot obtain high-quality solutions.
[29] 2019 A constrained non-linear optimisation is combined with consensus to compute the parameters of the multi-robot formation.
A distributed method was used to solve the consensus formation of a team of aerial or mobile robots navigating with static and dynamic obstacles, when each robot has a finite communication and visibility radius.
[30] 2019 An archetypal model of distributed decision-making is used to study the capacity of the system to follow a driving signal for varying topologies and system sizes Navigating with static and dynamic obstacles when each robot has a finite communication and visibility radius.
[31] 2020 Using the idea of CenterPoint, which is an extension of the median in higher dimensions, instead of a Tverberg partition, provides a better characterisation of the necessary and sufficient conditions guaranteeing resilient vector consensus of a multi-agent system.
Resilience guarantees improvement of the existing consensus algorithms in multi-agent networks.
[32] 2020 An alternative method to achieve a distance-based formation that used genetic algorithms to find a solution based on the distance and angle, and a constant velocity while avoiding collisions.
A parallel scheme was extended to improve the performance and find the best ways to converge to the desired distances while avoiding collisions.

Dynamics of Wheeled Mobile Robots
This section presents the dynamics of the wheeled mobile robots (WMR) and the consensus formation of a multi-agent system.
A schematic of a WMR is shown in Figure 2. Following [18], the kinematic model of the ith WMR with two degrees of freedom can be written as follows where, v i ∈ R and ω i ∈ R denote the forward and angular velocity of the ith WMR, respectively.
The configuration of the robot is given by ( , , ) ∈ ℝ , where ( , tesian position of the centre of mass of the robot and is the heading ang with respect to the X axis of the fixed coordinate system. The assumption that the wheels do not slip gives rise to the nonholono (2) sin( ) − cos( ) = 0 In the Equations (3)-(6), let , , 2b, and r be the right wheel an the left wheel angular velocity, the distance between the wheels and th wheels, respectively. The relation between the forward and angular velociti velocities can then be presented as follows Next, the net torque and need to be applied by motors at the wheels, respectively. By using Newton-Euler formulations, the dynamic motion of the ith WMR are given by The configuration of the robot is given by ( Cartesian position of the centre of mass of the robot and θ i is the heading angle of the robot with respect to the X axis of the fixed coordinate system. The assumption that the wheels do not slip gives rise to the nonholonomic constraint (2) .
φ RL i , 2b, and r be the right wheel angular velocity, the left wheel angular velocity, the distance between the wheels and the radii of the wheels, respectively. The relation between the forward and angular velocities to the wheel velocities can then be presented as follows Next, the net torque τ R i and τ L i need to be applied by motors at the right and left wheels, respectively. By using Newton-Euler formulations, the dynamics equations of motion of the ith WMR are given by where m i and J i are the mass and the effective rotational inertia about the vertical axis through the center of mass of the ith WMR, respectively. Thus, the Equations (7) and (8) can be rewritten in matrix form as Sensors 2021, 21, 7997 5 of 17 Using Equations (5)-(8) the right and left wheel angular accelerations are where c 1 = r 2 4 m i + r 2 4b 2 J i and c 2 = r 2 4 m i − r 2 4b 2 J i are constant which depend on the mass and mass distribution of the WMR. The coefficient matrix in Equation (10) is easily seen to be nonsingular.
For a system of N robots, suppose the dynamics of the robots are described by: .

Time-Optimal Control of WMRs
In the time-optimal problem, the cost function is defined initially as According to the Pontryagin Maximum Principle, at each time of the time-optimal trajectory, at least one of the inputs reaches its extremal [33,34]. Let the inputs τ R and/or τ L have the maximum value τ M . Thus, the bounds of the torques are: By substituting the equations of motion along a specified path (12) into the constraint (14), the limitations on the torques are transferred to the limitations on acceleration as: Therefore, there are four boundary angular accelerations of the wheel, and so there are four time-optimal control inputs when only one of the inputs exert its extremal.
Moreover, it is possible that both motors are in extremals at the same time. By considering Equation (10), we see that these conditions will occur when the terms J become zero or τ Ri = τ Ri = τ M . This means that (i) the path does not have any curvature during this time, and therefore the WMR is moving in a straight line, or (ii) the path is irregular and the centre of mass stops at a stationary point and the robot is just rotating counterclockwise ..
the WMR is moving along a straight line and accelerating.
the WMR is moving along a straight line and decelerating.
the WMR is rotating CCW about its centre of mass.
the WMR is rotating CW about its centre of mass.

Time-Optimal Consensus Algorithm Strategies
This section presents a time-optimal consensus algorithm that is designed and implemeted to reduce the convergence time in a multi mobile two-wheeled robot system. The consensus algorithm is used to impose similar dynamics on the information state of each robot in a group of robots. Every robot updates the value of its information state based on the information states of its neighbours. The goal of the consensus algorithm is to design a control law so that the information states of all of the robots converge to a similar value.
The communication among agents can be represented by directed or undirected graphs. A directed graph consists of a formation control graph G = (N, E, D), where N = {1, 2, . . . i, j, . . . , n} is a finite set of n vertices and a map dedicates to each vertex, a control system .
x i = f i (t, x i , u i ), a set of corresponding edges E = e ij (i, j) ∈ N × N , and a collection D={dij} of each edge j : e ij ∈ E that defines its control objective for some i ∈ N.
The edge e ij ∈ E denotes the agent j can obtain information from agent i, but not necessarily vice versa. In undirected graphs, robots i and j are defined as neighbours of each other if there is an edge between them. In a system with n agents, suppose the dynamics of the agents are given by where . q i denotes the acceleration of the ith agent and the u i is its input. The formation is described by where q id and q jd are the desired velocity states of agents i and j, who are neighbours of each other. The n × n adjacency matrix A = a ij of a weighted graph is defined as a ii = 0 and a ij = 1 if i = j, (i, j) ∈ E. Laplacian is defined as L = l ij where l ii = ∑ j =i a ij and l ij = −a ij i f i = j. Thus the Laplacian matrix is Suppose the robot r is designated as the leader and the other robots are the followers. We assume that a robot leader has direct access to the reference velocities (v r , ω r ). Other robots (followers) use their neighbouring leader information to accomplish the formation tracking task. Regarding the consensus algorithm, the velocity tracking control for robot i is where K EXT = αI 2n is the positive coefficient matrix so that The whole algorithm is shown in Figure 3. Using the diagonal coefficient matrix K EXT in Equation (16), at least one of the right or left motors of the follower robots works at a maximum angular acceleration or deceleration. Therefore, the bang-bang controls take their extremals throughout the whole motion to minimise the manoeuvre time.
Following the α calculation step, the optimal control problem is now to find a control strategy to transfer the system state from the initial to the desired final state, in the least time ( Figure 4). Since the Pontryagin principle demonstrates that at any point of a timeoptimal trajectory, at least one of the actuators exerts a maximum or minimum input, the problem of finding the optimal control is reduced to finding the switching points. Therefore, the trajectory must be at each point tangent to one of the eight extremals described in Section 3, at least for one of the robots. Figure 5 shows an example of using the proposed algorithm. As can be seen, there are several switching points that occurred between actuators and extremals. Having . q versus q, the minimum time can be obtained using Equation (13). Then, from Equations (3)-(6) and (10), the angular accelerations and velocities of the wheels are obtained versus the time for the optimum trajectory. Theorem 1. The time-optimal consensus algorithm (20) solves the formation velocity tracking problem if the formation graph G has a spanning tree.
Proof. As shown in [16,35,36], when the network topology of the multi-robot system contains a directed spanning tree, the rank of the Laplacian matrix L is n-1, zero is a simple eigenvalue of L with associated vector b = [1 · · · 1] −1 and all other eigenvalues are positive, and the consensus is reached asymptotically for the system . P e = −(L ⊗ I 2 )P e . It follows that lim t→∞ e −(L⊗I 2 )t → 1P e (0) = 0.
In this proposed algorithm K EXT is a diagonal matrix in which all the diagonal elements are positive and also equal to or bigger than 1 (α ≥ 1). Thus, it is a positive definite matrix, and the system asymptotically converges to the desired velocity configuration. Because of the time-optimal matrix coefficient component Using the K EXT matrix instead of the identity matrix in the consensus algorithm (20) guarantees that at least one of the actuators of either the leader or followers works on the extremum conditions (EXT1 to EXT8 described in Section 3), the lim t→∞ e −eK EXT (L⊗I 2 )t goes to to zero faster, and the system asymptotically converges to the desired velocity configuration in the shortest time. □ Figure 3. The algorithm at each time to achieve time-optimal consensus.

Comparison of the Performance of Velocity Tracking Consensus Formation with and without a Time-Optimal Strategy
In order to validate the proposed time-optimal algorithm, a computer program in Matlab software was developed to simulate two examples. All the conditions in these two examples are considered to be similar, including the initial conditions, the dimensions of the robots, the geometry of the desired path, and the topology of the robots' network (Figure 5). Figure 5. The schematic of a formation graph of the multi-robot example. The reference signal "r" is sent to "robot 1" by either the operator or a leader robot. The signal is distributed across the network based on the network topology.
In the first simulation, where the time-optimal control strategy is not considered, the consensus velocity tracking algorithm is used whereas the time-optimal coefficient is equal to 1, and the diagonal matrix is chosen as the identity matrix. As can be seen in Figure 6, the angular velocities and angular accelerations reach a consensus in 1.5 s.
In the second simulation, where the time-optimal control strategy is considered, the result of angular velocities and angular accelerations are shown in Figure 7. As can be seen, the proposed algorithm, based on consensus and bang-bang control, drives the motor torques to extremum values several times to achieve time-optimal control. According to Figure 7, the angular velocities and angular accelerations reach consensus in 0.4 s.

Comparison of the Performance of Velocity Tracking Consensus Formation with and without a Time-Optimal Strategy
In order to validate the proposed time-optimal algorithm, a computer program in Matlab software was developed to simulate two examples. All the conditions in these two examples are considered to be similar, including the initial conditions, the dimensions of the robots, the geometry of the desired path, and the topology of the robots' network ( Figure 5).

Comparison of the Performance of Velocity Tracking Consensus Formation with a Time-Optimal Strategy
In order to validate the proposed time-optimal algorithm, a computer Matlab software was developed to simulate two examples. All the conditions examples are considered to be similar, including the initial conditions, the d the robots, the geometry of the desired path, and the topology of the robots' n ure 5). Figure 5. The schematic of a formation graph of the multi-robot example. The refere is sent to "robot 1" by either the operator or a leader robot. The signal is distribu network based on the network topology.
In the first simulation, where the time-optimal control strategy is not co consensus velocity tracking algorithm is used whereas the time-optimal coe equal to 1, and the diagonal matrix is chosen as the identity matrix. A in Figure 6, the angular velocities and angular accelerations reach a consensu In the second simulation, where the time-optimal control strategy is co result of angular velocities and angular accelerations are shown in Figure   Figure 5. The schematic of a formation graph of the multi-robot example. The reference signal "r" is sent to "robot 1" by either the operator or a leader robot. The signal is distributed across the network based on the network topology.
In the first simulation, where the time-optimal control strategy is not considered, the consensus velocity tracking algorithm is used whereas the time-optimal coefficient α is equal to 1, and the diagonal matrix K EXT is chosen as the identity matrix. As can be seen in Figure 6, the angular velocities and angular accelerations reach a consensus in 1.5 s. optimal consensus algorithm.
To make the performance of our simulations closer to the performance in the realworld setting, we considered adding some random disturbances into the systems. Figure  9 shows the results of the proposed time-optimal consensus algorithm in the presence of some random noises. The results show great stability of the consensus process on the discontinuity of switched controllers in the presence of noise. When the noise exists, there is less than a 10% error for remaining in angular acceleration and less than a 2% error in the angular velocity; however, the convergence is fine.  In the second simulation, where the time-optimal control strategy is considered, the result of angular velocities and angular accelerations are shown in Figure 7. As can be seen, the proposed algorithm, based on consensus and bang-bang control, drives the motor torques to extremum values several times to achieve time-optimal control. According to Figure 7, the angular velocities and angular accelerations reach consensus in 0.4 s.  In order to compare the results of both simulations, Figure 8 shows the performance of the time-optimal consensus velocity tracking algorithm. The dashed lines show the normal consensus algorithm results, and the solid lines show the results of the proposed time-optimal consensus algorithm.  To make the performance of our simulations closer to the performance in the realworld setting, we considered adding some random disturbances into the systems. Figure 9 shows the results of the proposed time-optimal consensus algorithm in the presence of some random noises. The results show great stability of the consensus process on the discontinuity of switched controllers in the presence of noise. When the noise exists, there is less than a 10% error for remaining in angular acceleration and less than a 2% error in the angular velocity; however, the convergence is fine.

The Effect of Network Topology and the Number of Agents on the Convergence Time
In order to validate the proposed method in much more complex situations, the proposed method is implemented for a different number of robots. Figure 10 shows the effect of the number of robots on the convergence time of the velocity tracking control consensus formation with and without the time-optimal algorithm. Following the state-of-the-art findings in this field, we learned that the convergence time depends on several factors, such as the network topology, initial condition, formation control, number of robots, etc. Therefore, to explore the effect of the number of robots on the final convergence time, the initial conditions of all agents are considered to be similar in every simulation trial.

The Effect of Network Topology and the Number of Agents on the Convergence Time
In order to validate the proposed method in much more complex situations, the proposed method is implemented for a different number of robots. Figure 10 shows the effect of the number of robots on the convergence time of the velocity tracking control consensus formation with and without the time-optimal algorithm. Following the state-of-the-art findings in this field, we learned that the convergence time depends on several factors, such as the network topology, initial condition, formation control, number of robots, etc. Therefore, to explore the effect of the number of robots on the final convergence time, the initial conditions of all agents are considered to be similar in every simulation trial.
In every simulation trial, the robot network is considered fully interconnected, which means that every agent can send and receive information to all the other agents. Our findings demonstrated that the convergence time is reduced by increasing the number of agents. One reason for this could be the dimension and values of the gain matrix elements, which increase when the number of robots increases. As shown in Figures 10 and 11 (right column), the time-optimal velocity tracking consensus formation converged faster, in all In every simulation trial, the robot network is considered fully interconnected, which means that every agent can send and receive information to all the other agents. Our findings demonstrated that the convergence time is reduced by increasing the number of agents. One reason for this could be the dimension and values of the gain matrix elements, which increase when the number of robots increases. As shown in Figures 10 and 11 (right column), the time-optimal velocity tracking consensus formation converged faster, in all those examples, than the standard consensus formation without applying the time-optimal algorithm (Figures 10 and 11, left column).
The results of the previous trial ( Figure 10) show an increase in the convergence time when the number of robots increases. In order to investigate further the relationship between the graph connectivity and the convergence speed of consensus algorithms, a second trial was implemented. In this trial, the effect of the robot's network topology and interconnectivity on the convergence time was investigated. Figure 11 compares the results of the consensus formation of two different topologies. Figure 11a shows a robot network with a fully interconnected structure, while Figure 11b shows a partially interconnected robot network where two connections are missing. As shown, the connections between robot number 6 and the robots numbered 4 and 5 are missing. Comparing these two topologies shows that the convergence time will increase when the network is not fully interconnected.
As Figure 11c shows, the connections between four pairs of robots are missing. Although the proposed method managed to handle the convergence, it demonstrated an oscillatory behaviour in the angular velocity of the wheels. In other words, the developed bang-bang algorithm provides better support and convergence when the topology is fully connected. It tends to give more oscillatory results when the topology is not fully interconnected. those examples, than the standard consensus formation without applying the time-optimal algorithm (Figures 10 and 11, left column).    Comparing the results achieved in this section (shown in Figures 10 and 11), it can be concluded that the convergence time is mainly influenced by two factors i.e., the number of robots in the network and also the network topology. However, as examined, the proposed time-optimal method is efficient if used when both of these factors are changed and it dramatically reduces the convergence time.

Conclusions
In this paper, an optimal time velocity tracking of consensus formation algorithm for multiple nonholonomic wheeled robots is proposed. To apply the motors' extremum conditions for finding the time-optimal trajectory, firstly, the equation of motion along a specified path is obtained versus the left-and right-hand motors' angular acceleration and angular velocities. Then by developing a hybrid Pontryagin principle of time-optimal control and a consensus algorithm for the multi-agent system, the novel switched system algorithm is introduced, and the time-optimal control problem is solved. By using the proposed method, the system achieved the desired velocity tracking formation in the optimal time. The simulation results of this novel switched-system approach and a typical consensus formation algorithm are provided and compared to demonstrate the effectiveness of the proposed approach. In addition to testing the performance of the proposed method, the effect of the robot network topology as well as the number of robots in a network are explored. The numerical simulation results demonstrated that the time-optimal consensus algorithm behaved very well and reduced remarkably the consensus formation time.