# LAMDA Controller Applied to the Trajectory Tracking of an Aerial Manipulator
## 3 Proposed Controllers
### LAMDA Controller
Then, the crisp output is computed as follows:  
\[u_{i}=\zeta_{i}\sum_{k=1}^{m}\gamma_{ki}GAD_{k,O_{i}} \tag{32}\]  
where \(u_{i}\) is the controller output for the object \(O_{i}\), \(\gamma_{ki}\) is its weight applied in the \(k-\text{th}\) rule, and \(\zeta_{i}\) is the adjustment parameter for saturation of the output of the controller. The value of \(\zeta_{i}\) is computed by:  
\[\zeta_{i}=\frac{\text{argmax}(\gamma_{ki})}{\sum_{k=1}^{m}\gamma_{ki}GAD_{k, argmax(O_{i})}} \tag{33}\]  
The procedure shown in Equations (27)-(33) is used to compute the control actions of for each variable (each controller). Now, to compute \(u_{c_{L}}\) and \(u_{d_{L}}\) of the SMC control action, the same surface defined in Equation (16) and its derivative defined in Equation (17) are used. Replacing Equation (8) in Equation (17) we obtain:  
\[ \begin{split}\dot{s}=\lambda_{p}\Big{(}\dot{\mu}_{c}(t)-(M(q(t) ))^{-1}\big{[}u_{c_{L}}-C\big{(}q(t),\dot{q}(t)\big{)}\mu(t)-G(q(t))\big{]} \Big{)}+\lambda_{i}\widetilde{\mu}(t)+\lambda_{d}\;\dot{\widetilde{\mu}}(t) \\ \dot{s}=\lambda_{p}\Big{(}\dot{\mu}_{c}(t)-(M(q(t)))^{-1}u_{c_{L} }+\big{(}M(q(t))\big{)}^{-1}C\big{(}q(t),\dot{q}(t)\big{)}\mu(t)-\big{(}M(q(t) )\big{)}^{-1}G(q(t)\big{)}\Big{)}\\ +\lambda_{i}\widetilde{\mu}(t)+\lambda_{d}\;\dot{\widetilde{\mu}}( t)\end{split}  \tag{34}\]  
\(M(q(t))\) is defined as positive, thus, analyzing Equation (34), we can note that \(\dot{s}\) decreases as \(u_{c_{L}}\) Now, the algorithm computes the Marginal Adequacy Degree (MAD), which is a parameter that measures the similarity of a descriptor with the same descriptor in a class using probability density functions, which require the average value of the descriptor \(j\) belonging to the \(\dot{s}=0\), which is the desired condition in SMC schemes. The number of classes defined in each descriptor depends on the knowledge of the expert (designer). However, in the sensitivity analysis of [PERSON] et al. [24], it is stated that with five classes per descriptor, very good results can be obtained without affecting the computational load. Thus, five classes are considered in this work \(C\in[-1,1]\) for \(\dot{s}\), as is detailed in [28]. The fuzzy sets for the classes of \(\dot{s}\) are: Negative Big (\(NB=-1\)), Negative Small (\(NS=-0.5\)), zero (\(ZE=0\)), Positive Small (\(PS=0.5\)), and Positive Big (\(PB=1\)). These classes are used to define the rules to compute the normalized continuous control action \(u_{nc_{L}}\). The scaling gain \(k_{c_{L}}\) is used for tuning at the input \(\dot{s}\), and the scaling gain \(k_{c}\) at the output as:  
\[u_{c_{L}}=k_{c_{L}}u_{nc_{L}}\;\;\Rightarrow\;\;\;\;u_{c_{L}}=k_{c}LSMC\big{(} \dot{s}\big{)};\;k_{c_{L}}>0 \tag{35}\]  
As a practical example, we can note that in Equation (35), if \(\dot{s}\) is \(PB\), then large positive control action \(u_{c}\) is required to decrease quickly \(\dot{s}\) in order to obtain \(\dot{s}=0\). If \(\dot{s}=ZE\), the desired condition is satisfied, then no control action is needed, thus \(u_{c_{L}}=ZE\). The rule table corresponding to the continuous control action is shown in Table 1.  
Consider that the values presented in Table 1 for each of the classes is the one corresponding to the weight applied to the control output \(\gamma_{k}\). To compute the discontinuous control action \(u_{d_{L}}\), which is in charge of attracting the system to the sliding surface, we use the derivative of the Lyapunov function \(\dot{\mathcal{L}}\) defined in Equation (21). Replacing Equation (34) in Equation (21), and considering only the discontinuous control action \(u_{LSMC}=u_{dL}\), we obtain:  
\[s^{T}\dot{s}=s^{T}\lambda_{p}\Big{(}\dot{\mu}_{c}(t)-(M(q(t)))^{-1}u_{a_{L}}+( M(q(t)))^{-1}C\big{(}q(t),\dot{q}(t)\big{)}\mu(t)-(M(q(t)))^{-1}G(q(t))\Big{)}\]  
\[+s^{T}\lambda_{i}\widetilde{\mu}(t)+s^{T}\lambda_{d}\,\widetilde{\widetilde{ \mu}}(t) \tag{36}\]  
To guarantee stability, [PERSON] theory establishes to satisfy the condition \(\dot{\mathcal{L}}\)< 0.