The Robust Adaptive Control of Leader–Follower Formation in Mobile Robots with Dynamic Obstacle Avoidance

: In this paper, the problem of formation control with regard to leader–follower mobile robots in the presence of disturbances and model uncertainties, without needing to know the velocity of the leader robot, is presented. For this purpose, at first, a first-order kinematic model of leader– follower and leader–leader formations is obtained, and considering the absolute velocity of the leader robots as an uncertainty, a robust adaptive controller is designed to keep the desired formation. In this case, the upper bound of uncertainty is unknown and is obtained via stable adaptive laws. Afterwards, in order to deal with the accelerated robots and obstacles, second-order leader– follower and leader–leader formation models are obtained from the previous models. A robust adaptive controller is then designed to stabilize the entire system in the presence of disturbances and modeling uncertainties, without needing to know the parameters or matrices of the formation models. In addition, by considering one of the leaders in the leader–leader model as a virtual obstacle, the challenge of avoiding moving obstacles is also addressed in the presence of uncertainties. The simulation results show the effect of the presented controllers in effectively keeping the desired leader–follower formations.


Introduction
In recent years, the formation control of several vehicles has received much attention in the discussion of control science.Formation control applications include the coordination of several robots, unmanned air/sea vehicles, satellites, airplanes, and spacecraft.Formation control among multi-robot systems as one of the most widely used examples of multi-agent systems has received special attention in recent years [1][2][3][4].
In fact, a group of small mobile robots (such as one-wheeled, two-wheeled, car-like robots, or unmanned aerial robots) that are networked together can perform a variety of tasks by maintaining a specific formation.Controlling the leader-follower formation of mobile robots is one of the most important methods in the field of maintaining the formation of robots and has been studied by many researchers [5][6][7][8][9].In the leader-follower method, one (or more) robots are considered as the leader and will be responsible for directing the entire formation, and other robots, as followers, are controlled in such a way to track the leader robots with predetermined distances.
One of the advantages of the leader-follower method is its simplicity, comprehensibility, and easy implementation.In [10], a feedback linearization control method for non-homonymic moving robots is presented using the leader-follower method, where the absolute velocity of the leader robot in the local coordinates of the follower robot is considered as an external input.In [11], a formation controller, consisting of a feedback linearization part and a sliding mode compensator, is designed to stabilize the overall system.The proposed controller generates the commanded torques for the follower robot and makes the formation control system robust to the effect of unknown bounded disturbances in dynamic modeling.Furthermore, active obstacle avoidance is presented by considering the obstacle as a virtual leader in the proposed model.In [12], the hybrid feedback approach is presented to solve the navigation problem in the n-dimensional space, containing an arbitrary number of ellipsoidal obstacles; one of the limitations of this method is that the follower robot must have complete information about the acceleration of the leader and obstacle robots.In [13], a distributed formation controller is designed to guide multiple UAVs in order-less states to swiftly reach an intended formation.Inspired by biological creatures, a distributed collision avoidance controller is proposed to avoid unknown and mobile obstacles.Avoiding moving obstacles is one of the challenges in controlling the formation of moving robots.In [3], the problem of non-collision with moving obstacles was investigated, but the speed of the obstacle was considered constant, which does not seem to be a reasonable assumption.Other articles such as [14][15][16][17][18][19] have studied the non-collision with moving obstacles during formation.
In practice, many of the existing control methods that have been presented for dynamic systems may not be applicable, because the considered model may not be accurate or the system may be subject to limited disturbances or un-modeled dynamics.For example, a robot model that is controlled to go in a desired direction may not accurately express its dynamics and may have un-modeled dynamics.Apart from these cases, external disturbances always affect the behavior of a system.In [4], a distributed adaptive back-stepping control approach is elucidated, addressing the challenge of managing the formation control for multiple unmanned aerial vehicles in the presence of input saturation, actuator faults, and external disturbances.By estimating the upper fault and disturbance bounds, the introduced controller adeptly handles scenarios involving external disturbances, actuator faults, and inherent model uncertainties.In [6], an adaptive controller is formulated to uphold leader-follower formation under conditions of leader robot speed ambiguity.This proposed formation control tactic ensures both the continuity of connectivity and the avoidance of collisions between the leader and follower entities.In [15], a robust leaderobstacle formation control scheme is devised, imparting the system with resilience against absolute acceleration influences from both the leader and obstacle elements.Simultaneously, the leader-obstacle formation proposal obviates angular velocity constraints associated with the leader and obstacle components.Refs.[20][21][22][23] can be mentioned among other articles in which robust or adaptive control rules are used in maintaining the formation of mobile robots by considering parametric uncertainties.Regarding the new methods of dealing with obstacle avoidance in mobile robots that have been proposed in the last two years, we can refer to references [24][25][26].In [24,25], the reinforcement learning (RL) method and the nonlinear model predictive control (NMPC) method are, respectively, proposed for obstacle avoidance among mobile robots during the motion planning of robots.In [26], an artificial potential field algorithm is proposed to solve the problem of obstacle avoidance in leader-follower formation control among mobile robots.
In addition, in most of the previous research, only the first-order formation model is considered, yet in the first-order equation, only the linear and angular velocities of robots with formation variables can be expressed, and the acceleration of the robots cannot be studied.The second point is that, in the previous methods that are presented in the field of leader-follower formation, the velocity of the leader robot is needed as a variable for feedback, but it is very difficult to measure the absolute speed of the leader robot for the follower robot, since both are moving along with each other.
After reviewing the issues raised and the results of previous papers related to this topic, the contributions of this paper in formulating a new practical problem in the field of the formation control of mobile robots, as well as the innovations used to solve this problem, become clear in the following: (1) In the first-order model of leader-follower formation in mobile robots, the linear and angular velocities of the follower robot are the control inputs that should be obtained by the designer.However, if we want to also study accelerated mobile robots (which is more applicable in real situations), we have to find the second-order formation model, in which the control inputs are the linear and angular accelerations of the follower robot.(2) The absolute linear and angular velocities of the leader robot (in the first-order model) and the absolute linear and angular acceleration of the leader robot (in the second-order model) will be used by the follower robot as feedback in a closed-loop control system.However, measuring these absolute values is very difficult (and in some situations impossible) for the follower robot due to the constraints of the sensors located on the follower robot.The reason is that both the follower and the leader are moving in respect of each other, and the follower robot can only measure the relative velocity/acceleration of the leader in respect of himself and not the leader's absolute velocity or acceleration.(3) In reality, all of the leader-follower formation systems are subject to undesirable external disturbances or modeling uncertainties.Any external signal or force that affects the velocity or acceleration of the follower robot can be considered as a disturbance.So, the designed formation controller must be robust against these disturbances.(4) It is essential to solve the problem of obstacle avoidance while maintaining the leader-follower and leader-leader formation.Considering the second-order formation model, obstacle avoidance can be solved for accelerating active obstacles.
Taking into account the aforementioned four factors, the problems and primary contributions presented in this paper are discussed below.
This paper discusses the design and stability of comprehensive leader-follower and leader-leader control systems that are robust against uncertainties and disturbances and address the aforementioned problems collectively.The proposed formation controller aims to achieve the desired leader-follower formation in the presence of uncertainties, such as the velocity and acceleration of the leader, as well as unknown external disturbances.This robust adaptive formation controller is applicable to both first-order and second-order models, and it ensures convergence of the follower robot without requiring knowledge of the leader's velocity and acceleration.Additionally, it can handle disturbances with an unknown upper bound.
In addition, the designed robust adaptive controller for the second-order leader-follower formation model can achieve formation without any knowledge or information about the formation's dynamic parameters; this is a significant advancement in this field.
In this paper, unlike in previous papers, both first-order and second-order formation models are investigated.Also, the velocity of the leader robot in the first-order model and its acceleration in the second-order model are both considered to be completely unknown for the follower robot.For this purpose, after stating some preliminaries and first assuming the presence of uncertainties and unknown dynamics in the formation model, a robust adaptive controller (which is independent of the model matrices) will be designed that will maintain the leader-follower formation, despite the modeling uncertainties and unknown dynamics in both the first-and second-order models.Therefore, the innovations of the present paper, compared to previous research, can be highlighted as follows: (1) Obtaining both first-order and second-order kinematic models for leader-follower and leader-leader formations in order to deal with the velocities and accelerations of both robots; (2) Designing new robust adaptive controllers for achieving leader-follower and leaderleader formation in mobile robots, assuming that all of the dynamic parameters and formation model matrices are unknown for the designer due to the large amount of uncertainty in the formation model; (3) Considering the absolute velocity and acceleration of the leader robot, respectively, the in first-order and second-order kinematic formation models, as model uncertainties that are completely unknown for the follower robot; (4) Presenting a solution for avoiding accelerating active obstacles by considering one of the robots in the leader-leader formation to be an unidentified moving obstacle.
The remainder of the paper is organized as follows: In the second section, the kinematic modeling of mobile robots and the models of leader-follower and leader-leader formation are discussed.In the third section, the design of robust adaptive controllers is discussed in order to maintain formation among the robots.The simulation results in the fourth section show the correctness of the obtained control laws; finally, the conclusion is presented in the fifth section of the paper.

Mathematical Modeling of Formation Control
In this section, the first-order and second-order kinematic models of formation for both the leader-follower and leader-leader scenarios, along with the problem formulations, are presented.

First-Order Kinematic Model of Formation
2.1.1.Kinematic Model for Leader-Follower Formation Illustrated in Figure 1 are two robotic entities configured within a leader-follower formation.The follower robot, denoted as  2 , demonstrates adherence to the leader robot, designated as  1 , maintaining a separation denoted as  12 along with a relative orientation marked as  12 .Notably, a relative motion sensor is strategically positioned at point C atop robot  2 .
Expressed concisely, the kinematic equation for each individual robot takes the subsequent form ( = 1,2) [9]: where (    ) symbolizes the coordinates of point C within the broader global coordinate framework, and   signifies the directional angle of the respective robot.As visually depicted in Figure 1,   ⃗⃗⃗ and   ⃗⃗⃗⃗ denote the linear and angular velocities (respectively, with units m/s and rad/s) associated with robot   , with their scalar representations manifesting as  i and   , correspondingly. 0 represents the juncture at which the axis of symmetry intersects with the mobile wheel axis, while d quantifies the distance extending from the center of mass to the reference point C.
The distance between two robots can be obtained from the following relationship: And the relative direction between two robots is as follows: where the units of  12 and  12 and other distance and angles are, respectively, m and rad throughout this paper.By taking derivatives from these two relationships and using the kinematic equations stated in (1), we have [20,21] where matrices M and N are defined as follows: In this relation,  12 =  1 −  2 and, as shown in Figure 1,  2 =  −  12 −  12 show the relative direction between the speed,  2 , and the line,  12 .By defining the state variables as  = ( 12  12 )  and ̇= ( ̇12 ̇1 2 )  and the input of the formation system as  = ( 2  2 )  , we can write Equation (4) in a simplified form as follows: ̇=  × ( + ) +  (5) where  stands for the external disturbances and the G and δ, matrices which are defined as follows: Note 1: The final component, denoted as δ in Equation ( 5), encapsulates the influence stemming from the absolute velocity of the leader robot.This variable proves challenging to precisely gauge and approximate, owing to the constraints that are inherent to motion sensors, thus representing an inherent uncertainty within the system's model.

Leader-Leader Formation Kinematic Model
Depicted in Figure 2 is a triad of non-holonomic mobile robots, each with their unique attributes.Within the context of leader-leader formation control (abbreviated as ll), the objective entails the third robot effectively preserving optimal distances, denoted as  13  and  23  , in relation to its two designated leaders.It is obvious that, for this purpose, the two leader robots should never be placed at a distance of more than  13  +  23  from each other.
By taking derivatives from Equation ( 2) for the distance between the two robots  1 and  3 ( 13 ) and the distance between the two robots  2 and  3 ( 23 ) , and using the kinematic equations stated in (1), the following equation as a first-order model for leaderfollower formation will be achieved: where the matrices M and N are defined as follows:  And we have   =   +  3 −  3 ( = 1,2) .By defining the state variables as  = ( 13  23 )  and ̇= ( ̇13  ̇23 )  , and the input of the formation system as  = ( 3  3 )  , Equation ( 6) is rewritten as follows: ̇=  × ( + ) +  (7) Such that  stands for the disturbance vector and the G and δ matrices are defined as follows: The ultimate term δ within Equation ( 7) illustrates the impact stemming from the linear velocity of the leader robots, serving as a representation of the inherent uncertainty that is intrinsic to the system.

Leader-Follower Formation Kinematic Model
In Equation ( 4), the movement states of the formation in the local frame of the follower robot  2 are depicted.The follower robot has no knowledge of the absolute speed of the leader robot and, as a result, can only estimate the relative speed of the leader robot in respect of itself using motion sensors installed at its front.Equation ( 4) can be written as Deriving from (4) and combining with (8), we have where matrix C and vector δ are defined as follows: where θ ̇12 = ω 1 − ω 2 and θ ̇2 = −φ̇1 2 − θ ̇12 are used in (9), and ( 1  2 )  stands for the bounded external disturbance vector.Note that the state variables with  = ( 12  12 )  and ̇= ( ̇12 ̇1 2 )  and the input of the robot formation system with  = (̇2 ̇2)  are specified.Equation ( 9) can be rewritten as follows: where the function (, ̇,  12 ,  ̇12 ,  2 ,  2 ) is defined as follows: Equation (10) establishes the interconnection between inputs and outputs within the leader-follower robot formation framework.The outputs encompass relative metrics such as the distance, direction, and velocities between the robots, while the inputs correspond to the follower robot's absolute accelerations within local coordinates.The relative motion states , ̇, and  ̇12 , delineated in Equation (10), can be conveniently assessed using the relative motion sensors that are embedded in the follower robot.

Note 2:
The incorporation of the second-order kinematic model (10) results in a multi-variable, non-linear system configuration.This facet facilitates a more comprehensive scrutiny of the control system's effectiveness, enabling the formulation of non-linear control strategies that ensure holistic stability.Moreover, this model opens avenues for pursuing intricate trajectory tracking, transcending the capabilities of the first-order kinematic model.(10), the centripetal accelerations and Coriolis effect, denoted as ̇+  within (10), can be directly computed utilizing the outcomes furnished with both the relative motion sensors and the local motion sensor mounted on the follower robot.Furthermore, these relative accelerations serve to linearize the intricate nonlinear dynamics that are inherent to the leader-follower formation setup.

Note 4:
The ultimate term δ presented within Equation (10) encapsulates the influence originating from the leader robot's absolute acceleration.This parameter proves to be intricate to precisely measure and gauge, owing to the inherent limitations of motion sensors, and consequently represents a quintessential component of the system's model uncertainty.

Leader-Leader Formation Kinematic Model
Through the resolution of Equation ( 6), the absolute linear velocity of the leader robots, a quantity beyond the capacity of measurement by the obstacle robot, is formulated in terms of the formation's motion states and the absolute velocity of the follower robot, as delineated below: By taking the derivative from ( 6) and combining with (12), we have: where the matrices  and  ′ have not been calculated due to the large amount of calculations and the vector  is defined as follows: where ( 1  2 )  stands for the bounded external disturbance vector.We now define the state variables as follows: and the input of the robot formation system is specified as  = [̇3 ̇3]  .Equation ( 13) can be rewritten as follows: where the function ( 1 ,  2 , ̇,  3 ,  3 ) is defined as follows: Equation ( 14) establishes the interplay between inputs and outputs within the leaderleader formation system under the  −  mode.The outputs encompass the relative metrics, specifically the distances and velocities between the robots.In this context, the inputs comprise the absolute accelerations originating from the follower robot's local coordination.The relative motion states  and ̇ , featured in Equation (12), are determined through the utilization of the relative motion sensors positioned on the follower robot.
Note 5: Analogous to the leader-follower formation setup, the ultimate term δ presented within Equation ( 14) signifies the impact arising from the linear acceleration of the leader robots.This parameter proves to be intricate to precisely measure and gauge due to the limitations that are inherent in motion sensors, thereby representing a core element of uncertainty within the system's model.Note 6: Equations ( 10) and ( 14) both have the same structure and, as we will see in next section, the stabilizing controller is same for both models.The designed controller should provide the linear acceleration ( ̇3) and angular acceleration (̇3) of the follower robot in such a way that, despite keeping the formation, the system stays robust against the disturbances and uncertainties of the model and input constraints, and in addition, model matrices are not used in the controller structure.

Design of Robust Adaptive Controller
In this section, at first, a controller will be designed, taking into account the uncertainties and unknown dynamics of modeling in the first-order formation and assuming that there is no knowledge about the upper band of uncertainty, so that the follower robot will be placed at the optimal distance and angle to the leader.In the following, according to the second-order formation models, a robust adaptive controller will be designed to deal with uncertainties and unknown dynamics in the model.In this controller, the unknown parameters of the arrangement model are estimated in the form of an adaptation law.

Robust Adaptive Controller for First-Order Model of Formation
In this section, the design of the controller is performed based on the leader-follower first-order formation model, which is given in Equation ( 5).The controller design for the leader-leader formation in Equation ( 7) is quite similar.
First, we rewrite Equation ( 5) as follows: where  =  ×  +  is considered as the uncertainty and disturbance of the system.Assume that the uncertainty is limited as ‖‖ ≤  and we have no information about the upper band of .After estimating it, we use it as ̅ in the design of the controller.In this case, consider ‖. ‖ as the absolute value of the vector entries, meaning that ‖d‖

Remark:
The units of some variables in the first-order model in Equation (15) and in the secondorder model in Equation ( 21) can be surmised in the following table (Table 1).Note that the units of these variables according to the leader-leader (denoted as  − ) and leader-follower models (denoted as  − ) are different. .Now, given that measuring the absolute velocities of leaders is very difficult for the follower robot due to the constraints of the motion sensors (the follower robot can only measure its relative velocity with leaders and not the absolute velocity of leaders), then the term  is considered as the modeling uncertainty in (15).In the equation  =  ×  + ,  stands for uncertainties and  stands for disturbances, and therefore the term  can be called system perturbation, which can be defined as a summation of the undertrained terms ( × ) and disturbances () of the system.
We write Equation (15) with the definition  ̃=  −   as follows: ̃̇=  +  − ̇ (16) where   = [ 12  ,  12  ] shows the optimal values of the distance and angle of the follower robot relative to the leader robot.

Theorem 1: Consider Equation (5). In this case, the control input is
where ̅ is estimated using the following adaptive law, and Λ is a positive definite matrix; it will cause the states  = [ 12 ,  12 ] to converge to the desired values   = [ 12  ,  12  ] in the closed-loop system.
Proof: Consider the Lyapunov function, as below: in which  ̃=  ̅ − , and  is a positive definite value.By taking the time derivative from ( 19) and using Equations ( 16) and ( 17 Considering the equality of  ̃̅ and ̅     ̃ (because both are scalars), and also  and ̅   ̃ using Equation ( 18), we have:

𝑉 ̇≤ −𝑞 ̃𝑇Λ𝑞 ̃
Which, according to the positive definiteness of Λ, we have:  ̃→ 0 ⇒  →   □ Note 8: The robust adaptive control method which is mentioned in this section can be proven in the case of the leader-leader formation, which will not be repeated again in order to avoid repetition.The formation control law in (17) and (18) can easily be applied for the leader-leader formation model in (7) without the loss of generality, and the only difference is that, for the leader-leader case, we should consider G and δ as in model (7) and  and   as  = ( 13  23 )  and   = ( 13   23  )  to achieve leader-leader formation.

Robust Adaptive Controller for the Second-Order Model
In this section, the design of the controller is carried out based on the second-order kinematic models in (10) and ( 14).In the second-order models, the accelerations of the leader robots are also included in the equations.The goal is to design the controller in such a way that, in the presence of uncertainty and disturbance and without using model matrices, the follower robot can be made to maintain the formation.
In Equations ( 10) and ( 14), the goal is to design the controller  in such a way that   →   , where  = 1,2 .For the leader-follower model in (10) ).The unknown term , which is a sumation of uncertainties and disturbances, can be defined as system perturbation.
Now, with the definition of   =   −   , where   shows the desired formation for each of the follower robots in both models, and with the definition of   =   + ̇, the robust adaptive controller for the i-th model will be in the following form [22]: In this relation,   is a positive definite diagonal and square matrix, and we have where the scalar,   , is obtained from the following relation: and the scalar function,  ̂, is obtained from the following equation: Here,   is the regressor matrix and  ̂ is the parameter estimator vector.The adaptive law that estimates the unknown parameters is in the following form: In this law,   is an arbitrary positive constant.
Theorem 2: By applying the control law (22), the formation error in both the leader-follower and leader-leader models in (21) converges to zero, and the estimated parameters in (28) will also remain limited.

Proof:
The stability proof of applying the formation controller ( 22) into the formation model in ( 21) is similar to the proof given in [22], which is presented for applying a controller with a similar structure to that of (22), which was used for solving the desired path tracking problem using a model of mechanical arms, similar to the model in (21).We assume that the dynamics given below show uncertainty for the follower controller in the i-th model [22].
Suppose that a scalar function like ρ  can be used to limit this uncertain dynamic.
The unknown dynamics of   can be limited as follows: In relation (31), parameters  0 ,  1 , and  2 are limited and positive constants.According to the relations ̇ = ̇ − ̇ and ̈ = ̈ − ̈, and increasing and decreasing the expressions   ̈ and   ̇ in the formation model (21), we have In order to achieve relation (29) again, by adding and subtracting other similar terms, we will reach the following relation: where we have ̇ = ̈ + ̇.By applying the controller in (22), Equation (33) will be as follows: Now we define the proposed Lyapunov function for the i-model as follows: By taking the derivative from (35), we have Given the system parameters in the parameter vector,   = ( 0  1  2 )  in ( 25) and ( 26), meaning that  0 ,  1 , and  2 are some scalar and constant values which are invariant with time, so  ̇ = 0. Therefore, deriving from the relation  ̃ =   −  ̂ in (36), it can be concluded that By substituting Equations ( 28), (37), and (34) in Equation (36) and simplifying, we will have By using the property of antisymmetry, the term ( ̇ − 2  )   becomes zero, and by using Equations ( 25) and (30) and also the property of vector norms    ≤ ‖‖‖‖, we will have By replacing  ̂ =   −  ̃, and substituting ( 23) and ( 24) into (39), we will have After simplifying and taking the common denominator in the terms on the left, we have Therefore,  ̇ will always be negative definite, and   will decrease in this region and tends towards .In this part, the signals are limited and the signal  is a member of the space   ∈  2  .As it has been said, the value of the estimated parameters  ̂ and ̇ are also limited.□ Note 10.Note that the robust adaptive formation control designed for the first-order formation kinematic model in (15) is robust to the presence of uncertainty,  ×  , and disturbance,  (which we called the sum of uncertainty and disturbance as perturbation named  =  ×  + ).The parameter ̅ in controller (17) is the estimation of the upper bound of perturbation, meaning that  in ‖‖ ≤  and is obtained from the stable adaptive law in (18).The designed robust adaptive control law in (17), according to the proof of stability made using Lyapunov's theorem in (19) and (20), guarantees the formation in the presence of perturbation, which, not only do we not know, but we also do not know about its upper bound.Note 11.Also, the robust adaptive control law designed for the second-order kinematic formation model in (21) is also robust against perturbation,   .Parameter  ̂, which is present in the controllers of Equations ( 22) and (23), is the estimate of the upper band of perturbation in (30), like   ≥ ‖  ‖, and is obtained from Equation (25) and, as a result, via adaptive law (28).This robust adaptive control law, considering the proof of stability made using Lyapunov's theorem in Theorem 1, establishes the formation not only in the presence of perturbation but also without any knowledge of the system's matrices.

Leader-Obstacle Formation Control
A significant challenge within the control of leader-follower mobile robot formation revolves around safeguarding the follower robot against collisions with dynamic obstacles, while simultaneously maintaining the designated formation alongside the leader robot.In the context of the leader-leader formation model outlined in Equation ( 14), this challenge is addressed by conceptualizing the obstacle as a virtual leader, thus giving rise to the leader-obstacle formation framework (depicted in Figure 3).In this paradigm, the primary objective involves orchestrating the follower robot, denoted as  3 , to track the leader robot  1 while preserving the desired distance,  13  , and concurrently maintaining a predetermined separation from the accelerated moving obstacle, a span indicated as  23  .In order to have an applicable dynamic obstacle avoidance, there should be a predefined scenario for the follower robot.In this scenario, the formation system, particularly the follower robot, necessitates the integration of a switching mechanism.This mechanism ensures that, as soon as the follower robot detects the presence of an obstacle, it seamlessly transitions its formation strategy from leader-follower to leader-obstacle.To achieve this, strategies like control graphs or the supervisory control of discrete event systems [23], or time-varying switching topologies [27], can be employed.Upon the obstacle's relocation, and once it exits the follower robot's visual scope, the formation mode transitions back from leader-obstacle to leader-follower, allowing the follower robot to reestablish alignment with the leader robot.
By implementing the control laws expressed in Equations ( 17) and ( 22), the leaderobstacle formation structure can be effectively established, even when confronted with model uncertainties and unfamiliar dynamics.At the end of this section, in order to better understand the methodology presented in this paper, the complete robust adaptive control systems that are proposed in this section to achieve leader-follower and leader-leader formations are presented in the form of block diagrams in Figures 4 and 5.The robust adaptive controller blocks in the first-order formation model in Figure 4 and second-order formation model in Figure 5, respectively, provide the linear and angular velocity (input of the first-order formation model) and linear and angular acceleration (input of the second-order formation model) for the follower robot.As we can also see from the block diagrams, the adaptive law in Figure 4 estimates the upper bound of disturbance and uncertainties, which is a parameter for control law.In Figure 5, this adaptive law estimates the parameters of the repressor form of the upper bound of the uncertain dynamics, as in ( 25), (27), and (30).
It is also worth mentioning that the input controller in Figure 4 uses some parts of the formation model, meaning matrix G (which is defined after Equation ( 5) in the leaderfollower model and after Equation ( 7) in leader-leader model), which includes some parameters of the formation model.However, the robust adaptive controller in Figure 5, as it is clear, only uses variables   and ̇, meaning that it does not use any part of the formation model.Therefore, the robust adaptive formation controller in Figure 5 is also said to be model-free to some extent.

Simulation Results
This section will showcase the outcomes derived from the implementation of robust adaptive controllers, specifically tailored for the leader-follower formation configuration within mobile robots.These results will be demonstrated through simulation within the MATLAB environment.

First Simulation Example
In the first simulation, the robust adaptive control law (17) will be applied to a leaderfollower formation system.We define the desired state of the system as follows: We consider the controller parameter as follows: By applying controller (17), the distance and relative orientation errors are shown in Figure 6.As we can see, the relative distance and relative orientation errors between the leader and the follower robot converge to zero, and as a result, the follower robot will follow the leader robot with the desired formation.
In addition, the estimated uncertainty is also shown in Figure 7, and as we can see, this parameter is converged.

Second Simulation Example
In the second simulation, the robust adaptive control law (22) will be applied to a leader-follower formation system.The simulation results show that the designed controller works well for both the leader-follower and leader-obstacle formations.First, we consider the leader-follower formation.We define the desired state of the system as follows: We consider the controller parameters as follows: Upon the application of controller (22), the ensuing Figure 8 illustrates the evolution of the distance and relative orientation errors.Notably, the controller's implementation precipitates the convergence of both the relative distance and relative orientation errors to zero.Consequently, the follower robot achieves a state of conformity, trailing the leader robot, while adhering to the stipulated formation criteria.Figure 9 provides a visualization of the trajectories pursued by both robots.Notably, the leader robot's trajectory is characterized by a sinusoidal pattern.Evidently, the follower robot adeptly tracks the leader robot's path, successfully achieving the intended formation, as evident from the depicted trajectories in Figure 9.
By looking at Figures 6 and 7, it can be found that, despite being in the presence of disturbance and uncertainty, the formation errors in Figure 6 become zero in less than 1 s, and this convergence does not have any overshoot, but the convergence of the upper bound of the uncertainties and disturbances to the constant bounded values in Figure 7 last about 20 s, and this convergence, of course, has no effect on maintaining the formation, which is also shown in Figure 9 as an example for the sinusoidal path of the leader.

Third Simulation Example
For the subsequent simulation, the focus shifts to the leader-obstacle formation paradigm, with the designated formation outlined as follows: The control parameters are similar to the previous simulation.In this case, the formation errors are shown in Figure 10.The distance error concerning the follower robot and the leader robot (first diagram in Figure 10) as well as the distance error involving the follower robot and the obstacle (second diagram in Figure 10) both exhibit a trajectory that converges toward zero.This convergence signifies that, as the obstacle draws near the leader-follower formation, the follower robot adeptly navigates around it, meticulously preserving a predefined separation from both the leader and the obstacle robots.
As we can see in this figure, the tracking error values between the follower robot and the leader robot, as well as the follower robot and the accelerated moving obstacle, both converge to zero in less than 4 s.The settling time is about 3.5 s and this convergence occurs without any overshoot.In addition, note that, similar to the previous simulation, here, the system is subject to additive uncertainties, and more importantly, the accelerations of both the leader and the obstacle are assumed as uncertainties in the system formation model and are unknown to the follower mobile robot.
In Figure 11, the moving obstacle avoidance challenge is simulated.Considering the previous simulation parameters, in Figure 11a, the follower robot follows the leader robot with the desired formation.However, when an obstacle approaches the formation in Figure 11b, the follower robot changes his path to avoid it and to be at a safe distance from it, while keeping the desired formation with the leader as much as possible.In Figure 12, the adaptive parameters of the control law (21-28), which are actually the outputs of the adaptive rule (28), are shown.These are the elements of vector  ̂, which is one of the parameters of the control law.As expected, and as we expect from stability proof of Theorem 1, the adaptive parameters in vector  ̂ all have limited values and converge to constant values, which indicates the stability of the adaptive law.

Conclusions
In this paper, the problem of maintaining the leader-follower formation among mobile wheeled robots is dealt with.First, a robust adaptive control law is designed to deal with modeling uncertainties and unknown dynamics in the leader-follower formation model and according to the first-order kinematic model of formation.In this rule, the upper band of uncertainty is estimated using an adaptive rule.Next, in order to introduce acceleration in the formation model, a new robust adaptive control law was designed based on the second-order kinematic model, which establishes a formation despite disturbances, uncertainties, and unknown dynamics.In the designed controllers, the absolute velocity and acceleration of the leader robot, which are unknown for the follower, are considered as uncertainties, of which the upper bound is also unknown for the designer.In this paper, by considering the moving obstacle as a virtual leader, the problem of not encountering accelerated moving obstacles during formation, and considering uncertainty and disturbances, has also been solved.

Figure 1 .
Figure 1.A pair of robots organized within a leader-follower configuration.

Figure 2 .
Figure 2. Three robots in a leader-leader formation.

Figure 4 .
Figure 4. Block diagram of a closed-loop system of the robust adaptive controller for the first-order model of formation.

Figure 5 .
Figure 5. Block diagram of a closed-loop system of the robust adaptive controller for the secondorder model of formation.

Figure 6 .
Figure 6.Distance and relative orientation errors in the leader-follower formation in the first simulation.

Figure 7 .
Figure 7. Estimate of the upper band of uncertainty in the first simulation.

Figure 8 .
Figure 8. Distance and relative orientation errors within the leader-follower formation during the second simulation.

Figure 9 .
Figure 9.The path of the robots in the leader-follower formation in the second simulation.

Figure 10 .
Figure 10.Distance errors in the leader-obstacle formation in the third simulation.

Figure 11 .
Figure 11.Leader-obstacle formation (a) without obstacle and (b) with a moving obstacle.

Figure 12 .
Figure 12.Adaptive parameters of the robust adaptive formation controller in the third simulation.

Table 1 .
Units of variables in this study.It should be noted in the leader-follower model that the term  includes  1 and  1 , and in the leader-leader model  includes  1 and  2 (  )̈ +   (  , ̇)̇ +   +   =  (21)Note 9.In the leader-follower model, the uncertain term  is the summation of the leader's linear . In order to design the controller, we use the following model, which corresponds to both the leader-follower and leader-leader formation models: Now we can consider a new upper band for  ̇, such that, using the following relation,   (  )‖   ‖ 2 ≤        ≤   (  )‖   ‖ 2 (   ̂) ‖  ‖    ̂‖  ‖+  is always smaller than zero, so the derivative of the proposed Lyapunov function for the i-th model becomes negative.