# Sliding Mode Control of Servo Feed System Based on Fuzzy Reaching Law
## 2 Flexible Dynamics Modeling of the Feed System
### Fuzzy Convergence Law Sliding Mode Controller Design
#### 3.2.3. Parameter Fuzzification and Fuzzy Rule Design  
The sliding mode control system of the servo feed system is built in Matlab/simulink, and the range of variation in the basic theoretical domain of each fuzzy variable is obtained. According to the range of variation, the fuzzy domains of input \(\sigma\), \(\overset{\bullet}{\sigma}\) and output \(\epsilon\), \(h\)  
Figure 3: Comparison of hyperbolic tangent function and symbolic function.  
are divided into the following classes: \(\left\{\sigma,\sigma\right\}\in\left\{-3,-2,-1,0,1,2,3\right\}\), \(\left\{\varepsilon\right\}\in\left\{0,1,2,3\right\}\), \(\left\{h\right\}\in\left\{0,1,2,3,4,5,6,7,8,9,10,11,12\right\}\). The ranges of the basic and fuzzy domains are shown in Table 2.  
From the exponential convergence law, it can be solved that:  
\[\sigma(t)=\frac{\varepsilon}{h}+(\sigma_{0}-\frac{\varepsilon}{h})e^{-ht} \tag{18}\]  
From Equation (18), it can be seen that decreasing \(\varepsilon\) and increasing \(h\) can accelerate the convergence process and reduce the chattering. When \(|\sigma|\) is large, increasing \(h\) will have a large control effect. However, when \(|\sigma|\) is small and \(|\sigma|\) becomes small, a large \(h\) should be chosen to ensure the convergence speed. Similarly, when \(|\sigma|\) is large, a larger value of \(\varepsilon\) ensures the arrival time; When \(|\sigma|\) is small, the value of \(\varepsilon\) is smaller to avoid the increase in chattering. In summary, the following conclusions can be drawn: When \(|\sigma|\) is large, a large value of \(\varepsilon\) and a small value of \(h\) are selected, and when \(|\sigma|\) is small, a small value of \(\varepsilon\) and a large value of \(h\) are selected. Based on the above findings, a fuzzy control rule table for the two output parameters was developed, as in Tables 3 and 4.  
By inputting the above empirical rules into the software, a fuzzy 3D rule map can be obtained, as shown in Figure 4.  
\begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline \multirow{2}{*}{} & \multirow{2}{*}{\(\varepsilon\)} & \multicolumn{8}{c}{\(\sigma\)} \\ \cline{3-10}  & & **NB** & **NM** & **NS** & **Z** & **PS** & **PM** & **PB** \\ \hline \multirow{5}{*}{\(\sigma\)} & **NB** & NS & NS & PS & PM & PS & NM & NB \\  & **NM** & NM & NS & PM & PM & PS & NM & NB \\  & **NS** & NM & NS & PM & PM & Z & NM & NB \\  & **Z** & NM & NS & PM & PS & NS & NS & NM \\  & **PS** & NB & NM & PB & PS & NS & NS & NM \\  & **PM** & NB & NM & PB & PS & NM & NS & NM \\  & **PB** & NB & NM & PB & PS & NM & NS & NS \\ \hline \hline \end{tabular}
\end{table}
Table 4: Table of fuzzy control rules for \(\varepsilon\).  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Variables** & **Basic Domain** & **Fuzzy Domain** \\ \hline \(\sigma\) & \([-1.5\times 10^{-3},1.5\times 10^{-3}]\) & \([-3,3]\) \\ \(\sigma\) & \([-1.5,1.5]\) & \([-3,3]\) \\ \(\varepsilon\) & \([0,100]\) & \([0,3]\) \\ \(h\) & \([0,100]\) & \([0,12]\) \\ \hline \hline \end{tabular}
\end{table}
Table 2: Scope of thesis.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Variables** & **Basic Domain** & **Fuzzy Domain** \\ \hline \(\sigma\) & \([-1.5\times 10^{-3},1.5\times 10^{-3}]\) & \([-3,3]\) \\ \(\sigma\) & \([-1.5,1.5]\) & \([-3,3]\) \\ \(\varepsilon\) & \([0,100]\) & \([0,3]\) \\ \(h\) & \([0,100]\) & \([0,12]\) \\ \hline \hline \end{tabular}
\end{table}
Table 3: Table of fuzzy control rules for \(h\).