# LAMDA Controller Applied to the Trajectory Tracking of an Aerial Manipulator
## 3 Proposed Controllers
### Sliding Mode Controller (SMC)  
The Sliding Mode algorithm considers the dynamics of a system that allows the fulfilment of the control objective by taking the system to a state space through a sliding surface, minimizing the disturbances that may occur. The scheme of this controller is shown in Figure 4.  
The sliding surface s of the SMC is described below:  
\[s=\lambda_{p}\widetilde{\mu}(\mathrm{t})+\lambda_{i}\int\widetilde{\mu}( \mathrm{t})\ dt+\lambda_{d}\ \dot{\widetilde{\mu}}(t) \tag{16}\]  
Thus, \(\widetilde{\mu}(t)=\mu_{c}(t)-\mu(t)\) is the error vector of velocities of the aerial manipulator robot; \(\dot{\widetilde{\mu}}(t)=\dot{\mu}_{c}(t)-\dot{\mu}(t)\) is the derivative of the error with respect to time; \(\lambda_{p},\ \lambda_{i}\ y\ \lambda_{d}\) is the positive definite calibration matrices of the proportional, integral, and derivative part of the controller, respectively.  
Figure 4: Sliding Mode Controller scheme.  
Obtaining the first derivative of the surface (16) and replacing the errors calculated above, we obtain:  
\[\dot{s}=\lambda_{p}\big{(}\dot{\mu}_{c}(t)-\dot{\mu}(t)\big{)}+\lambda_{i}\widetilde {\mu}(t)+\lambda_{d}\ \dot{\widetilde{\mu}}(t) \tag{17}\]  
where \(\widetilde{\mu}(t)\) is the second derivative of \(\widetilde{\mu}(t)\). The SMC control scheme is described with Equation (18)  
\[u_{SMC}(t)=u_{a}(t)+u_{d}(t) \tag{18}\]  
where \(u_{a}(t)\). is the continuous part and \(u_{d}(t)\) is the discontinuous part of the control action \(u_{SMC}(t)\).  
Considering \(\dot{s}=0\) and \(u_{d}(t)=0\) and replacing in Equation (17) we obtain:  
\[u_{a}(t)=M(q(t))\dot{\mu}_{c}(t)+C\big{(}q(t),\dot{q}(t)\big{)}\ \mu(t)+G(q(t))+M(q(t)) \lambda_{i}\lambda_{p}{}^{-1}\widetilde{\mu}(t)+M(q(t))\lambda_{d}\lambda_{p} {}^{-1}\ \ddot{\widetilde{\mu}}(t) \tag{19}\]  
Subsequently, the discontinuous part is determined by selecting the Lyapunov candidate \(\mathcal{L}\) described in Equation (20), as a function of the area \(s\).  
\[\mathcal{L}=\frac{1}{2}s^{T}s \tag{20}\]  
Deriving \(\mathcal{L}\) with respect to time we obtain,  
\[\dot{\mathcal{L}}=s^{T}\dot{s} \tag{21}\]  
By replacing Equations (17) and (8) in Equation (21) and developing the expressions, we determine the derivative of \(\mathcal{L}\).  
\[\dot{\mathcal{L}}=s^{T}\left(-\lambda_{p}(M(q(t)))^{-1}u_{d}(t)\right) \tag{22}\]  
For Equation (22) to satisfy \(\dot{\mathcal{L}}\leq 0\), \(u_{d}(t)\) is defined by:  
\[u_{d}(t)=M(q(t))\ k_{2}\ sig(s) \tag{23}\]  
where \(k_{2}\) is a positive defined constant. By replacing Equation (23) in Equation (22) we obtain:  
\[\dot{\mathcal{L}}=s^{T}\left(-\lambda_{p}\ k_{2}\ sig(s)\right) \tag{24}\]  
It is verified that if \(k_{2}>0\) y \(\lambda_{d}>0\), then \(\dot{\mathcal{L}}<0\), therefore, \(s\to 0\) with \(t\to\ \infty\), hence, the error \(\widetilde{v}\to 0\) with \(t\to\ \infty\). Then, the proposed controller is:  
\[u_{SMC}(t)=M(q(t))\dot{\mu}_{c}(t)+C\big{(}q(t),\dot{q}(t)\big{)}\ \mu(t)+G(q(t))+M(q(t))\lambda_{i}\lambda_{p}{}^{-1}\widetilde{\mu}(t)+M(q(t)) \lambda_{d}\lambda_{p}{}^{-1}\ \ddot{\widetilde{\mu}}(t) \tag{25}\]  
To improve the chattering condition, we propose that \(k_{2}\ sig(s)\ \cong\frac{s}{|s|+\delta}\) with \(\delta>0\); finally, we obtain the control law given by:  
\[u_{SMC}(t)=M(q(t))\dot{\mu}_{c}(t)+C\big{(}q(t),\dot{q}(t)\big{)}\ \mu(t)+G(q(t))+M(q(t))\lambda_{i}\lambda_{p}{}^{-1}\widetilde{\mu}(t)\]  
\[+M(q(t))\lambda_{d}\lambda_{p}{}^{-1}\ \ddot{\widetilde{\mu}}(t)+M(q(t))k_{2}\frac{s}{|s|+\delta} \tag{26}\]