# Formation Control and Distributed Goal Assignment for Multi-Agent Non-Holonomic Systems
## 3 Stability of the System
If the robot is in the collision avoidance region of the other robot time derivative of the Lyapunov-like function is calculated as follows:  
\[\frac{dV}{dt}=\sum_{i=1}^{N}\left[e_{ix}\dot{e}_{ix}+e_{iy}\dot{e}_{iy}+e_{i \theta}\dot{e}_{i\theta}+\sum_{j=1,j\
eq i}^{N}\left(\frac{\partial V_{aij}} {\partial e_{ix}}\dot{e}_{ix}+\frac{\partial V_{aij}}{\partial e_{iy}}\dot{e} _{iy}\right)\right]. \tag{21}\]  
Taking into account Equation (15) the above formula can be transformed to the following form:  
\[\frac{dV}{dt}=\sum_{i=1}^{N}\left[E_{ix}\dot{e}_{ix}+E_{iy}\dot{e}_{iy}+e_{i \theta}\dot{e}_{i\theta}\right]. \tag{22}\]  
Next, using Equation (19) one obtains:  
\[\dot{V}=\sum_{i=1}^{N}\left[k_{3}E_{ix}e_{iy}e_{i\theta}-k_{3}E_{iy}e_{ix}e_{ i\theta}-k_{3}e_{i\theta}^{2}-k_{1}E_{ix}^{2}\right]. \tag{23}\]  
Substituting \(E_{ix}=D_{i}\cos\theta_{iE}\) and \(E_{iy}=D_{i}\sin\theta_{iE}\), \(D_{i}=\sqrt{E_{ix}^{2}+E_{iy}^{2}}\) in the above equation one obtains:  
\[\dot{V}= \sum_{i=1}^{N}\left[k_{3}D_{i}\cos\theta_{iE}e_{iy}e_{i\theta}-k_ {3}D\sin\theta_{iE}e_{ix}e_{i\theta}-k_{3}e_{i\theta}^{2}-k_{1}D_{i}^{2}\cos^ {2}\theta_{iE}\right]\] \[= \sum_{i=1}^{N}\left[-\frac{1}{2}k_{3}e_{i\theta}^{2}+k_{3}D_{i} \cos\theta_{iE}e_{iy}e_{i\theta}-\frac{1}{2}k_{3}e_{i\theta}^{2}+k_{3}D_{i} \sin\theta_{iE}e_{ix}e_{i\theta}-k_{1}D_{i}^{2}\cos^{2}\theta_{iE}\right]\] \[= \sum_{i=1}^{N}\left\{-k_{3}\left[(\frac{e_{i\theta}}{\sqrt{2}}- \frac{1}{\sqrt{2}}D_{i}\cos\theta_{iE}e_{iy})^{2}-\frac{1}{2}D_{i}^{2}\cos^{2} \theta_{iE}e_{iy}^{2}\right]\right.\] \[\left.-k_{3}\left[(\frac{e_{i\theta}}{\sqrt{2}}+\frac{1}{\sqrt{2} }D_{i}\sin\theta_{iE}e_{ix})^{2}-\frac{1}{2}D_{i}^{2}\sin^{2}\theta_{iE}e_{ ix}^{2}\right]-k_{1}D_{i}^{2}\cos^{2}\theta_{iE}\right\}.\]To simplify further calculations, new scalar functions are introduced:  
\[a_{i}=\frac{e_{i\theta}}{\sqrt{2}}-\frac{1}{\sqrt{2}}D_{i}\cos\theta_{iE}e_{iy}, \qquad b_{i}=\frac{e_{i\theta}}{\sqrt{2}}+\frac{1}{\sqrt{2}}D_{i}\sin\theta_{iE }e_{ix}. \tag{24}\]  
Taking into account (24) \(\dot{V}\) can be written as follows:  
\[V=\sum_{i=1}^{N}\left[\frac{1}{2}(e_{ix}^{2}+e_{iy}^{2}+e_{i\theta}^{2})+\sum_ {j=1,j\
eq i}^{N}V_{aij}\right]. \tag{20}\]0  
\[V=\sum_{i=1}^{N}\left[\frac{1}{2}(e_{ix}^{2}+e_{iy}^{2}+e_{i\theta}^{2})+\sum_ {j=1,j\
eq i}^{N}V_{aij}\right]. \tag{20}\]1  
The closed-loop system is stable (\(\dot{V}\leq 0\)) if the following condition is fulfilled:  
\[V=\sum_{i=1}^{N}\left[\frac{1}{2}(e_{ix}^{2}+e_{iy}^{2}+e_{i\theta}^{2})+\sum_ {j=1,j\
eq i}^{N}V_{aij}\right]. \tag{20}\]2  
As \(\cos^{2}\theta_{iE}>0\) because of the assumption in Proposition 1 it cannot be arbitrarily small, the condition (27) can be met by setting a sufficiently high value of \(k_{1}\) or by reducing \(k_{3}\). Note that the error dynamics (19) with frozen reference velocities can be decomposed into two subsystems (Figure 4). The origin of the system \(\Sigma_{2}\) is exponentially stable if \(k_{3}>0\). Each of the subsystems is input to state stable (ISS). Stability of the origin may be concluded invoking the small-gain theorem for ISS systems [26]. The boundedness of the output of the collision avoidance subsystem is necessary to prove stability. Taking the first equation in (19), one can state that if \(\frac{\partial V_{aij}}{\partial e_{ix}}\) is sufficiently high (that happens if the robot is very close to the obstacle; there is no problem of boundedness in the other cases (refer to the properties of the APF, Figure 1)), i.e., \(\frac{\partial V_{aij}}{\partial e_{ix}}\gg e_{ix}\), \(\frac{\partial V_{aij}}{\partial e_{ix}}\gg e_{iy}\), and \(\frac{\partial V_{aij}}{\partial e_{ix}}\gg e_{i\theta}\) the error dynamics can be approximated as follows:  
\[V=\sum_{i=1}^{N}\left[\frac{1}{2}(e_{ix}^{2}+e_{iy}^{2}+e_{i\theta}^{2})+\sum_ {j=1,j\
eq i}^{N}V_{aij}\right]. \tag{20}\]3  
\[V=\sum_{i=1}^{N}\left[\frac{1}{2}(e_{ix}^{2}+e_{iy}^{2}+e_{i\theta}^{2})+\sum_ {j=1,j\
eq i}^{N}V_{aij}\right]. \tag{20}\]4 Diagram of the control system in the collision avoidance mode.