# Backstepping Based Formation Control of Quadrotors with the State Transformation Technique
## 3 Backstepping-Based Quadrotor Formation Control
### Position Control of a Quadrotor with the State Transformation Technique
\), (26) can be rewritten as follows:  
\[\dot{e}_{pi,1}=-k_{i,3}e_{pi,1}.\]  
If \(k_{i,3}>0\), the above error dynamics becomes a stable system, then the error \(e_{pi,1}\) converges to zero. Therefore, supposing \(V_{p,li}\) as a virtual \(x,y\) position control input vector and defining it as \(\bar{V}_{p,li}\), the virtual \(x,y\) position control input vector of the \(i\)-th follower \(\bar{V}_{p,li}\) to converge the first formation error vector related to the \(x,y\) position of the \(i\)-th follower \(e_{pi,1}\) to zero is given by:  
\[\bar{V}_{p,li}=-k_{i,3}e_{pi,1}+ \begin{bmatrix}\dot{d}_{i,x}\\ \dot{d}_{i,y}\end{bmatrix} , \tag{27}\]  
where \(k_{i,3}\) is a positive constant. The second formation error vector related to the \(x,y\) position of the \(i\)-th follower quadrotor \(e_{pi,2}\) is the difference in velocity between the leader and follower on the \(x\) and \(y\) each axis, and the definition is as follows:  
\[e_{pi,2}=V_{p,li}-\bar{V}_{p,li}.\]  
Differentiating the second formation error vector related to the \(x,y\) position of the \(i\)-th follower \(e_{pi,2}\) with respect to time and substituting (24), we obtain:\[\dot{e}_{pi,2}=\tilde{P}_{li}-\hat{V}_{p,li}=\tilde{P}_{l}-\hat{P}_{i}-\hat{V}_{p, li}=\tilde{P}_{l}-T_{i,2}\big{(}e_{zi,1},e_{zi,2},\phi_{fi},\theta_{fi},\psi_{fi} \big{)}\ u_{i,p}-\hat{V}_{p,li}. \tag{28}\]  
The actual \(x,y\) position control input vector of the \(i\)-th follower \(u_{i,p}\) to converge the second formation error vector related to the \(x,y\) position of the \(i\)-th follower \(e_{pi,2}\) to zero is given by:  
\[u_{i,p}=T_{i,2}\big{(}e_{zi,1},e_{zi,2},\phi_{fi},\theta_{fi},\psi_{fi}\big{)}^ {-1}\left(\tilde{P}_{l}+k_{i,4}e_{pi,2}-\hat{V}_{p,li}+e_{pi,1}\right), \tag{29}\]  
where \(k_{i,4}\) is a positive constant. **Theorem 2**: _Consider the \(x,y\) position of the \(i\)-th follower in (20) controlled by the actual \(x,y\) position control input of the \(i\)-th follower in (29). Then, there exist the design parameters \(k_{i,3}\) and \(k_{i,4}\) such that the actual \(x,y\) position control input of the \(i\)-th follower in (29) asymptotically stabilizes the formation error systems related to the \(x,y\) position of the \(i\)-th follower in (26) and (28)._  
Let us consider the following Lyapunov function candidate:  
\[V_{pi}(e_{pi,1},e_{pi,2})=\frac{1}{2}\left(\|e_{pi,1}\|^{2}+\|e_{pi,2}\|^{2} \right), \tag{30}\]  
Differentiating \(V_{pi}(e_{pi,1},e_{pi,2})\) with respect to the time and substituting (26) and (28), we obtain:  
\[ \begin{split}\dot{V}_{pi}(e_{pi,1},e_{pi,2})=&\frac {1}{2}\left(2e_{pi,1}^{T}\dot{e}_{pi,1}+2e_{pi,2}^{T}\dot{e}_{pi,2}\right)\\ =& e_{pi,1}^{T}\dot{e}_{pi,1}+e_{pi,2}^{T}\dot{e}_{pi,2}\\ =& e_{pi,1}^{T}\bigg{(}V_{p,li}-\begin{bmatrix}d_{i, x}\\ d_{i,y}\end{bmatrix}\bigg{)}+e_{pi,2}^{T}\bigg{(}\ddot{P}_{l}-T_{i,2}(e_{zi,1},e_{zi,2 },\phi_{fi},\theta_{fi},\psi_{fi})\ u_{i,p}-\hat{V}_{p,li}\bigg{)}\\ =& e_{pi,1}^{T}\bigg{(}e_{pi,2}+\hat{V}_{p,li}-\begin{bmatrix}d_{i, x}\\ d_{i,y}\end{bmatrix}\bigg{)}+e_{pi,2}^{T}\bigg{(}\ddot{P}_{l}-T_{i,2}(e_{zi,1},e_{zi,2 },\phi_{fi},\theta_{fi},\psi_{fi})\ u_{i,p}-\hat{V}_{p,li}\bigg{)}\end{split}  \tag{31}\]  
Using (27), (29) and (31) can be rewritten as follows:  
\[ \begin{split}\dot{V}_{pi}(e_{pi,1},e_{pi,2})&=e_{pi,1}^{T} \left(e_{pi,2}-k_{i,3}e_{pi,1}\right)+e_{pi,2}^{T}\left(-k_{i,4}e_{pi,2}-e_{pi,1}\right)\\ &=-k_{i,3}\|e_{pi,1}\|^{2}-k_{i,4}\|e_{pi,2}\|^{2}<0.\end{split}  \tag{32}\]  
Therefore, by the Lyapunov stability theorem [31], the formation error systems related to the \(x,y\) position of the \(i\)-th follower in (26) and (28) are asymptotically stable with the actual altitude control input of the \(i\)-th follower in (29). Finally, the follower maintains the formation separated by the relative distance on the \(x,y\)-axis \(d_{i,x},d_{i,y}\) from the leader.