# Robust Control for a Slung-Mass Quadcopter Under Abrupt Velocity Changes
## 2 System Modeling and Robust Control Design  
### Slung-Mass Quadrotor Modeling  
The slung-mass quadrotor dynamical model and the design of the robust control algorithm are presented in this section. In order to simplify the dynamical model, the following hypothesis are assumed:  
* The air vehicle is considered as a rigid body. * The load is rigid and its mass is constant. * The mass is suspended under the vehicle by a rigid rod. * The slung-mass angular position is bounded. * The suspended mass does not rotate on its azimuthal axis. In the same way, the control algorithm is designed to be robust against the following:  
* External disturbances such as wind and gust. * Disturbances caused by slung-mass oscillations. * Uncertainties not modeled in the system. The generalized coordinates of the aircraft system are \(q=(\xi,\eta)\in\Re^{6}\) where the translational and rotational coordinates are \(\xi=(x,y,z)\in\Re^{3}\) and \(\eta=(\phi,\theta,\psi)\in\Re^{3}\), respectively. Figure 1 depicts the quadrotor with slung-load diagram, where \(f_{i}=k\omega_{i}\) represents the \(i\)-rotor force where \(i=1,2,3,4\). \(k\) represents a set of the aerodynamic constants, \(d\) is the distance from the rotors to the center of the mass and the angular velocity is represented by \(\omega_{i}\). The inertial frame \(O=(x,y,z)\) represents the longitudinal, lateral, and vertical axes, \(B=(B_{x},B_{y},B_{z})\) is the body fixed coordinate frame. \(M\) represents the quadrotor mass and \(m\) the slung-load mass, \(l\) is the distance from the center of the mass to the slung mass, \(g\) is the acceleration due gravity, \(\alpha\) and \(\beta\) are the angular position of the slung mass in the longitudinal and lateral axes, respectively. The total thrust is defined as \(u=(f_{1}+f_{2}+f_{3}+f_{4})\) and the rotor torque \(\tau=(\tau_{\phi},\tau_{\theta},\tau_{\phi})^{T}\) is defined as follows:  
\[\tau_{\phi}= (f_{1}-f_{2})d\] \[\tau_{\theta}= (f_{3}-f_{4})d\] \[\tau_{\psi}= \sum_{i=1}^{4}\tau_{i}\]  
where \(\tau_{i}\) is the torque produced by each rotor. Therefore, according to [36] the equations of motion for the quadrotor with slung mass are as follows:  
\[\mathbf{M}(q)\ddot{q}+C(q,\dot{q})\dot{q}+G(q)=Bu \tag{1}\]  
where \(\mathbf{M}(q)\in\Re^{8\times 8}\), \(C(q,\dot{q})\in\Re^{8\times 8}\), \(G(q)\in\Re^{8}\), \(B(q)\in\Re^{8\times 4}\) are defined as follows  
\[\mathbf{M}(q)= \begin{bmatrix}(M+m)I_{3\times 3}&0_{3\times 3}&\Phi_{\mu}\\ 0_{3\times 3}&\Omega_{\eta}&0_{3\times 2}\\ \Phi_{\mu}^{T}&0_{2\times 3}&\Gamma_{\mu}\end{bmatrix} ;\quad C(q)= \begin{bmatrix} 0_{3\times 3}&0_{3\times 3}&C_{\mu}\\ 0_{3\times 3}&C_{\eta}&0_{3\times 2}\\ 0_{2\times 3}&0_{2\times 3}&\gamma_{\mu}\end{bmatrix} ;\]  
\[G(q)= \begin{bmatrix}G_{z}&0_{1\times 3}&G_{\alpha}\end{bmatrix} ^{T};\quad B(q)= \begin{bmatrix}Re_{3}&0_{1\times 3}&0_{1\times 2}\\ 0_{3\times 3}&I_{3\times 3}&0_{3\times 2}\end{bmatrix} \]  
with  
\[\Phi_{\mu}= \begin{bmatrix}ml\cos\alpha\cos\beta&-ml\sin\alpha\sin\beta\\ ml\cos\alpha\sin\beta&ml\sin\alpha\cos\beta\\ ml\sin\alpha&0\end{bmatrix} ;\quad\Gamma_{\mu}= \begin{bmatrix}ml^{2}+I_{p}&0 \\ 0&ml^{2}\sin^{2}\alpha+I_{p}\end{bmatrix} ;\]  
\[\Omega_{\eta}= \begin{bmatrix}I_{\psi}\sin^{2}\theta+\cos^{2}\theta(I_{\theta} \sin^{2}\phi+I_{\psi}\cos^{2}\phi)&(I_{\theta}-I_{\psi})(\cos\theta\sin\phi \cos\phi)&-I_{\psi}\sin\theta\\ (I_{\theta}-I_{\psi})(\cos\theta\sin\phi\cos\phi)&I_{\theta}\cos^{2}\phi+I_{ \phi}\sin^{2}\phi&0\\ -I_{\psi}\sin\theta&0&I_{\psi}\end{bmatrix} ;\]  
\[C_{\mu}= \begin{bmatrix}-ml((\cos\alpha\sin\beta)\dot{\phi}+(\sin\alpha\cos \beta)\dot{\alpha})&-ml((\cos\alpha\sin\beta)\dot{\alpha}+(\sin\alpha\cos\beta )\dot{\beta})\\ ml((\cos\alpha\cos\beta)\dot{\beta}-(\sin\alpha\sin\beta)\dot{\alpha})&ml(( (\cos\alpha\cos\beta)\dot{\alpha}-(\sin\alpha\sin\beta)\dot{\beta})\\ ml(\cos\alpha)\dot{\alpha}&0\end{bmatrix} ;\]  
\[C_{\eta}= \begin{bmatrix}C_{\eta_{11}}&C_{\eta_{12}}&C_{\eta_{13}}\\ C_{\eta_{21}}&C_{\eta_{22}}&C_{\eta_{23}}\\ C_{\eta_{31}}&C_{\eta_{32}}&0\end{bmatrix} ;\quad G_{z}=