## 3 Formation Controller Design
### The Selection of the Path Parameter  
As described in Section 3.1, \(\dot{s}\) is the time derivative of the path parameter for all desired trajectories. Equation (4) implies that \(\dot{s}\) determines the desired linear and angular velocity.  
For a single mobile robot trajectory tracking problem, \(s=t\) is chosen intuitively. However, in the formation control problem, for the selection of \(s\), two situations need to be considered to be follows:  
(P1) \(s\) should reflect the overall formation tracking status.  
Thus, for a group of \(N\) mobile robots, define  
\[V=\sum_{i=1,\dots,N}(\frac{1}{2}\xi_{xi}^{2}+\frac{1}{2}\xi_{yi}^{2}+(1-\cos \frac{\xi_{gi}}{2})) \tag{14}\]  
where \(\xi_{xi}\), \(\xi_{yi}\) and \(\xi_{gi}\) are tracking errors, which can be defined as  
\[\left(\begin{array}{c}\xi_{xi}\\ \xi_{yi}\\ \xi_{gi}\end{array}\right)=\left(\begin{array}{ccc}\cos\theta_{i}&\sin \theta_{i}&0\\ -\sin\theta_{i}&\cos\theta_{i}&0\\ 0&0&1\end{array}\right)\left(\begin{array}{c}x_{di}-x_{i}\\ y_{di}-y_{i}\\ \theta_{di}-\theta_{i}\end{array}\right) \tag{15}\]  
where \(\left[\begin{array}{cc}x_{di}&y_{di}&\theta_{di}\end{array}\right]^{T}\) are basic desired trajectories. Therefore, \(V\) can reflect the formation tracking errors well and can blow up whenever any robot deviates from the desired trajectories and converge to \(0\) whenever all the robots are on the track.  
From (4), the time derivative of path parameter \(\dot{s}\) determines the desired formation velocities. Thus, \(\dot{s}\) is expected to decrease to slow down the velocities of desired trajectories whenever \(V\) is large, which means that some robots are out of track. Then, there is plenty of time left for these robots to reach their desired trajectories. On the other hand, \(\dot{s}\) is expected to converge to \(1\) whenever all the robots on the track, meaning that the formation velocities can reach a desired value. In conclusion:  
\[\begin{split}\dot{s}&\to 0,whenV\rightarrow\infty,\\ \dot{s}&\to 1,whenV\to 0,\end{split} \tag{16}\]Thus, \(\dot{s}\) can be designed as follows [16]:  
\[\dot{s}=1-\alpha\arctan V, \tag{17}\]  
where \(\alpha\in[0,1]\); this choice is discussed later.  
(P2) Consider a situation in which a robot becomes stuck due to obstacles or needs to deviate with a large range to get around obstacles. It will break the tracking status without doubt; then, \(V\) will blow up and \(\dot{s}\) will converge to 0 correspondingly, which leads to a low speed of the whole formation. Therefore, the reference velocities are expected to reach the desired velocities in this situation instead of converging to 0. By doing this, the robots who do not get close to the obstacle can maintain formation with the desired velocities, while those who are impeded by obstacles can move away from the obstacles by adjusting their desired velocities continuously. Thus, the design of \(\dot{s}\) can be modified.  
Define \(F=\sum_{i=1,...,N}\Gamma_{i}\), which can indicate whether some robots become stuck. \(F\) will blow up whenever any robot is impeded by obstacles. On the contrary, \(F\) converges to 0 under normal conditions. When \(F\) has a large value, \(\dot{s}\) will converge to 1 instead of 0 despite \(V\) being large. Therefore, the parameter \(\alpha\) is modified to achieve the following target:  
\[\begin{split}&\alpha\to 0,when\ V\rightarrow\infty,\\ &\alpha\to 1,when\ V\to 0,\end{split} \tag{18}\]  
Thus, \(\alpha\) is designed as follows:  
\[\alpha(F)=-\exp(-kF), \tag{19}\]  
where \(k\) is a positive constant.  
In conclusion:  
\[\dot{s}=1-\exp(-kF)\arctan(V), \tag{20}\]