## 3 Controller Design and Stability Analysis
### Stability Analysis
Therefore, a fuzzy Q RL mechanism is designed to automatically determine the optimal \(\Lambda_{i}^{*}\)._  
Fuzzy Q learning is a common version of RL applicable on continuous systems, which can explore the optimal policy by interacting with the environment [37]. In this paper, the \(\Lambda_{i}\) is to be tuned by a fuzzy Q learning mechanism according to the tracking error \(e_{i}\) and the angular velocity \(\dot{q}_{i}\). The linguistic rules to determine \(\Lambda_{i}\) can be given as the following form:  
\[|e_{i}|\leq\sqrt{\frac{2}{k_{pi}}}\max\{V_{i}(0),\ (\overline{\Omega}_{i}+\frac{1}{2\psi_{i}} \big{(}2\Gamma_{i}^{*})^{2})i=1,2..,n \tag{21}\]5  
\(\mathcal{L}_{e,i}\), \(\mathcal{L}_{\dot{q},i}\) and \(\mathcal{L}_{\Lambda,i}\) are the linguistic descriptions of tracking error \(e_{i}\), angular velocity \(\dot{q}_{i}\) and parameter \(\Lambda_{i}\) respectively. \(\mathds{k}\) is the current moment. The linguistic description could be \"small\", \"medium\" and \"big\". As a result, an example of linguistic rule could be: IF \(e_{i}(\mathds{k})\) is _small_ AND \(\dot{q}_{i}(\mathds{k})\) is _small_, THEN \(\Lambda_{i}(\mathds{k})\) is _small_. Some intuitive linguistic rules can be given as:  
\(\text{IF }e_{i}(\mathds{k})\text{ is small, and }\dot{q}_{i}(\mathds{k})\text{ is small THEN }\Lambda_{i}(\mathds{k})\text{ is small}\)  
\(\text{IF }e_{i}(\mathds{k})\text{ is large, and }\dot{q}_{i}(\mathds{k})\text{ is large THEN }\Lambda_{i}(\mathds{k})\text{ is large}\)  
\(\text{IF }e_{i}(\mathds{k})\text{ is large, and }\dot{q}_{i}(\mathds{k})\text{ is small THEN }\Lambda_{i}(\mathds{k})\text{ is large}\)  
\(\text{IF }e_{i}(\mathds{k})\text{ is small, and }\dot{q}_{i}(\mathds{k})\text{ is large THEN }\Lambda_{i}(\mathds{k})\text{ is small}\)  
**Remark 8**. : _To carry out the linguistic inference shown by (32) in a numerical form, fuzzy logic inference is required. In detail, initially, numerical variables \(e_{i}(\mathds{k})\) and \(\dot{q}_{i}(\mathds{k})\) at the moment \(\mathds{k}\) are fuzzified to the firing rates of the linguistic descriptions by the triangular membership function shown in \[|e_{i}|\leq\sqrt{\frac{2}{k_{pi}}}\max\{V_{i}(0),\ (\overline{\Omega}_{i}+\frac{1}{2\psi_{i}} \big{(}2\Gamma_{i}^{*})^{2})i=1,2..,n \tag{21}\]6 After that, a group of firing rates of fuzzy rules are obtained by fuzzy reasoning. Then, the numerical values of \(\Lambda_{i}(\mathds{k})\) are calculated by the defuzzification according to the firing rates of all fuzzy rules and the numerical value of the action corresponding to each fuzzy rule._The parameters of membership function shown in Figure 2 are defined as follows:  
\[|e_{i}|\leq\sqrt{\frac{2}{k_{pi}}}\max\{V_{i}(0),\ (\overline{\Omega}_{i}+\frac{1}{2\psi_{i}} \big{(}2\Gamma_{i}^{*})^{2})i=1,2..,n \tag{21}\]7  
\[|e_{i}|\leq\sqrt{\frac{2}{k_{pi}}}\max\{V_{i}(0),\ (\overline{\Omega}_{i}+\frac{1}{2\psi_{i}} \big{(}2\Gamma_{i}^{*})^{2})i=1,2..,n \tag{21}\]8  
where \(\mathbf{\alpha}\) is the number of fuzzy sets (\(\zeta_{1,\mathbf{\alpha}}\)) for the fuzzy input \(e_{i}\), and \(\mathbf{\delta}\) is the number of fuzzy sets (\(\zeta_{1,\mathbf{\delta}}\)) for the fuzzy input \(\dot{q}_{i}\).