# Gaze-Guided Control of an Autonomous Mobile Robot Using Type-2 Fuzzy Logic
## 2 Method of Gaze Guided System
### Interval Type2 Fuzzy Control System
#### 2.3.2 Fuzzy Inference Engine  
The inference engine combines rules and gives an outline from input to output type-2 fuzzy sets. Figure 8 shows a graphical representation of the relationship between input and output. It is necessary  
\begin{table}
\begin{tabular}{l l l l l l l l l} \hline
**LengthX** & 409 pixel & Start (\(\lambda\)) = 104 & Start (\(\gamma\)) = 253 & End (\(\lambda\)) = 513 & End (\(\gamma\)) = 253 & Mean = 61.1 & StdDev = 45.7 & Min = 9 & Max = 157 \\ \hline
**LengthY** & 247 pixel & Start (\(\lambda\)) = 310 & Start (\(\gamma\)) = 98 & End (\(\lambda\)) = 310 & End (\(\gamma\)) = 345 & Mean = 30.6 & StdDev = 29.4 & Min = 5 & Max = 131 \\ \hline \end{tabular}
\end{table}
Table 1: Eye region information.  
Figure 10: Membership functions of robot direction and speed.  
to compute the intersection and union of type-2 sets and implement compositions of type-2 relations. The desired behavior is defined by a set of linguistic rules. It is necessary to set the rules adequately for the desired result. For instance, a type-2 fuzzy logic with \(p\) inputs (\(x_{1}\in X_{1}\),...\(x_{p}\in\ X_{p}\)) and one output \((y)\) with \(M\) rules have the following form.  
\[R^{\mathcal{L}}:\text{ IF }x_{1}\text{ is }\widetilde{F}_{1}^{\mathcal{L}}\ldots \text{and }x_{p}\text{ is }\widetilde{F}_{p}^{\mathcal{L}}\text{ THEN }y\text{ is }\widetilde{G}^{\mathcal{L}},\ \mathcal{L}=1\ldots M.\]  
The knowledge bases related to the robot wheels speed are reported in Table 2. The approximate locations of the rules formed in the knowledge base in the coordinate plane are shown in Figure 12.  
In this experiment, we used type-2 fuzzy sets and minimum t-norm operation. The rule firing strength \(F^{i}(x)\) for crisp input vector is given by type-1 fuzzy set.  
\[F^{l}(x^{\prime})=\left[\underline{f}^{l}\ (x^{\prime}),\ \overline{f}^{l}(x^{ \prime})\right]\equiv\left[\underline{f}^{l},\ \overline{f}^{l}\right] \tag{3}\]  
where  
\[\underline{f}^{l}(x^{\prime})=\underline{\mu}_{\widetilde{P}_{1}}\Big{(}x_{1 }^{\prime}\Big{)}*\ldots*\underline{\mu}_{\widetilde{P}_{p}}\Big{(}x_{p}^{ \prime}\Big{)}, \tag{4}\]  
\[\overline{f}^{l}(x^{\prime})=\overline{\mu}_{\widetilde{P}_{1}}\Big{(}x_{1 }^{\prime}\Big{)}*\ldots*\overline{\mu}_{\widetilde{P}_{1}}\Big{(}x_{p}^{ \prime}\Big{)}. \tag{5}\]  
The graphical representation of the rules of the system is shown in Figure 12. These are composed of input and output linguistic variables. Nine inference rules are designed to determine how the mobile robot should be steered and velocity. In each rule, a logic and operation is used to deduce the output. In Table 2 we present the rule set whose format is established as follows:  
Rule 1: IF Direction (X) is left and speed (Y) is medium, then left wheel speed (Lws) is small and right wheel speed is medium.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline \(\mathbf{Y}\) (Speed) & \(\mathbf{X}\) (Direction) & **Left** (\(\widetilde{\mathbf{L}}\)) & **Straight** (\(\widetilde{\mathbf{S}}\)) & **Right** (\(\widetilde{\mathbf{R}}\)) \\ \hline \multirow{4}{*}{**Near (\(\widetilde{\mathbf{N}}\))**} & \(\text{Lws}=\widetilde{\mathbf{S}}\) & Lws = \(\widetilde{\mathbf{S}}\) & Lws = \(\widetilde{\mathbf{F}}\) \\  & \(\text{Rws}=\widetilde{\mathbf{F}}\) & Rws = \(\widetilde{\mathbf{S}}\) & Rws = \(\widetilde{\mathbf{S}}\) \\ \cline{1-1}  & \(\text{Lws}=\widetilde{\mathbf{S}}\) & Lws = \(\widetilde{\mathbf{M}}\) & Lws = \(\widetilde{\mathbf{M}}\) \\ \cline{1-1}  & \(\text{Rws}=\widetilde{\mathbf{M}}\) & Rws = \(\widetilde{\mathbf{M}}\) & Rws = \(\widetilde{\mathbf{S}}\) \\ \cline{1-1}  & \(\text{Lws}=\widetilde{\mathbf{M}}\) & Lws = \(\widetilde{\mathbf{F}}\) & Lws = \(\widetilde{\mathbf{F}}\) \\ \cline{1-1}  & \(\text{Rws}=\widetilde{\mathbf{F}}\) & Rws = \(\widetilde{\mathbf{F}}\) & Rws = \(\widetilde{\mathbf{M}}\) \\ \hline \hline \end{tabular}
\end{table}
Table 2: Rule base for robot wheel speed fuzzy controller.  
Figure 12: Graphical distribution of the rule table.