# LAMDA Controller Applied to the Trajectory Tracking of an Aerial Manipulator
## 3 Proposed Controllers
### LAMDA Controller  
The LSMC is an intelligent Sliding Mode controller based on LAMDA. The sliding surface defined in Equation (16) and its derivative defined in Equation (17) are composed of vectors with dimensions \(7\times 1\), therefore \(s\) and \(\dot{s}\). have the form: \(s=\big{[}s_{1}\,s_{2}\ldots\,s_{7}\big{]}^{T}\) and \(s=\big{[}\dot{s}_{1}\,\dot{s}_{2}\ldots\,\dot{s}_{7}\big{]}^{T}\). The LAMDA controller (see Figure 5) is combined with the fundamentals of SMC for the calculation of continuous and discontinuous control actions [24]. For this purpose, the sliding surface \(s_{i}\) and its derivative \(\dot{s}_{i}\) are required, which describe an object \(O_{i}\), such as: \(O_{i}=\left[s_{i}\,\dot{s}_{i}\right]\); \(\forall i=1,\cdots,7\), for all the variables to be controlled. The predefined classes \(\,C=\{C_{1};\cdots\) ; \(C_{k};\)\(\cdots\) ; \(C_{m}\}\), are used to detect the current functional state of the system [23]. If we change the variables \(s_{1}=o_{i1}\) and \(\dot{s}_{i}=o_{i2}\), then the object \(O_{i}\) is defined as:  
\[O_{i}=\left[o_{i1}\,o_{i2}\right] \tag{27}\]  
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 class (\(\rho_{k,ij}\)) and its standard deviation set as \(\sigma_{k,ij}=0.25\)[25]. \[MAD_{k,ij}=e^{-\frac{1}{(\frac{\sigma_{ij}-\rho_{k,ij}}{\rho_{k,ij}})}^{2}} \tag{28}\]  
\[\rho_{k,ij}=\frac{1}{n_{k,ij}}\sum_{t=1}^{n_{k,ij}}o_{ij}(t) \tag{29}\]  
where \(n_{k,ij}\) is the amount of data of the descriptor \(ij\) in the class \(k\). The Global Adequacy (GAD) measures the membership degree of the object to each class and it is computed by mixing the MADs using fuzzy logic operators, and the Dombi operator [26] has been used in this work. The GADs are linear interpolations between the T-norm \"\(T(a,b)\)\" and the S-norm \"\(S(a,b)\)\" of the Dombi operator. The parameters \(a,b\) are the MADs in the class \(k\) to be operated with the T-norm and the S-norm, and \(\ p\geq 1\) is used to modify the sensitivity. The GAD for the object \(O_{i}\) to each class \(k\) is computed by the combination of T-norm and the S-norm as:  
\[GAD_{k,O_{i}}(MAD_{k,i1},MAD_{k,i2})=\pi T(MAD_{k,i1},MAD_{k,i2})+(1-\alpha)S (MAD_{k,i1},MAD_{k,i2}) \tag{30}\]  
where \(\alpha\in[0,1]\) is the exigency parameter. If \(\alpha\) increases, then the algorithm is stricter, and if \(\alpha\) decreases, then the algorithm is permissive. Figure 5: LSMC controller scheme. The inference method presented in [24] proposes the use of LAMDA classes to evaluate the current state of the system and take corrective action to bring the system to the desired state. The analytical expression that describes the decision-making process is defined as:  
\[R^{(k)}{}_{i}:IF\;o_{i1}\;\textit{is}\;F_{1}^{p}\;\textit{and}\;o_{i2}\;\textit{is} \;F_{j}^{q}\;\textit{THEN}\;\textit{y}_{ki}\;\textit{is}\;G_{ki} \tag{31}\]  
where \(R^{(k)}{}_{i}\) is the rule applied for the functional state (class) \(k\), \(o_{ij};\forall j=1,2\) is the descriptor \(j\) of the object \(O_{i}\) which takes on values of the universe of discourse \(U_{j}\). The output linguistic variable \(y_{ki}\) is defined on a universe of discourse \(V\). \(F_{j}=\left\{F_{j}^{q}:q=1,2,\ldots,Q\right\}\) is a fuzzy set on \(U_{j}\) where \(Q\) is the number of linguistic values and \(G_{ki}\) is a fuzzy set on \(V\). The inference mechanism added to LAMDA is based on each GAD. The first-order TSK (Takagi-Sugeno-Kang) inference method [27] is employed, where \(G_{ki}=\gamma_{ki}\). The parameter \(\gamma_{ki}\) is a constant value specified for each class to bring the system to the desired functional state, which is \(o_{i1}=0\) and \(o_{i2}=0\).