# High-Performance Speed Control of PMSM Using Fuzzy Sliding Mode with Load Torque Observer
## 3 Controller Design
### Speed Sliding Mode Controller Design
That is, \(\varepsilon=fuzzy\left(S,\dot{S}\right)\), the \(S\), \(\dot{S}\), and \(\varepsilon\) fuzzy sets are \(\left\{NB,NM,NS,ZO,PS,PM,PB\right\}\), respectively, where PB is positive big, PM is positive middle, PS is positive small, ZO is zero, NS is negative small, NM is negative middle, and NB is negative big. The analysis shows that when the state of the system is far away from the sliding mode surface and the state track is in the approaching mode, \(\varepsilon\) should have a larger value. When the system state trajectory is close to the sliding mode surface, the values of \(\varepsilon\) should be smaller in order to reduce the chattering; the fuzzy rules formulated based on these principles are shown in Figure 2:3  
Figure 2:4 \(f(S,\gamma,\beta)\) characteristic curve with different \(\beta\) value. Figure 2:5 \(f(S,\gamma,\beta)\) characteristic curve with different \(\gamma\) value. When \(|S|\) is large, the exponential switching term \(-kS\) can ensure that the system state point approaches the sliding mode at a relatively high speed. Therefore, the exponential reaching law is particularly suitable for solving the response control problems with step inputs. If \(k\) is too large, even if the terminal error is small, the overshoot will be excessive, and the system chattering will be intensified in the steady state. If \(k\) is small, the initial response will be slow. In order to consider the rapidity of the system and the maximum control force that the system can provide, \(n\) segment variable control is proposed. In the initial stage of regulation, when the system error is large, \(k\) should have a larger value. In the final stage of regulation, when the system error is small, \(k\) should have a smaller value. Based on the absolute value of the velocity error \(|e|\), \(k\) segmented function is determined as follows  
\[k=\left\{ \begin{array}{l}k_{n}\,,|e|\geq\ A_{n}\\ k_{n-1}\,A_{n}\geq\ |e|\geq A_{n-1}\\ k_{n-2}\,,A_{n-1}\geq\ |e|\geq A_{n-2}\\ \vdots\,\ ;\\ k_{1}\,,|e|\leq A_{1}\end{array} \right. \tag{19}\]  
where \(n\) is the number of segments in the formula, \(A_{n}>A_{n-1}>A_{n-2}\cdots A_{1}\), and \(k_{n}>k_{n-1}>k_{n-2}\cdots k_{1}>0\). As can be seen from Table 1, although \(\varepsilon\) is large when \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \multirow{2}{*}{\(\varepsilon\)} & \multirow{2}{*}{\(\frac{}{}\)} & \multicolumn{8}{c}{\(\dot{s}\)} \\ \cline{3-10}  & & **NB** & **NM** & **NS** & **ZO** & **PS** & **PM** & **PB** \\ \hline \multirow{4}{*}{\(s\)} & NB & PB & PB & PB & PM & PB & PB & PB \\  & NM & PB & PB & PM & PS & PM & PB & PB \\  & NS & PB & PM & PM & NM & PM & PM & PB \\  & ZO & PB & PM & NM & NB & NM & PM & PB \\  & PS & PB & PM & PM & NM & PM & PM & PB \\  & PM & PB & PB & PM & PS & PM & PB & PB \\  & PB & PB & PB & PB & PM & PB & PB & PB \\ \hline \end{tabular}
\end{table} 
Table 1: Determine the fuzzy rule table for \(\varepsilon\). Figure 5: The \(\varepsilon\) fuzzy control output control surface. the system state is far from the switching surface, the value of \(k\) is even larger, thus ensuring that the transition phase still has the advantages of both small chattering and short transition time. According to the Lyapunov stability theory, taken the energy function is \(V=\frac{1}{2}S^{2}\), the system stability of sliding mode control should meet the following conditions, namely  
\[\dot{V}=S\dot{S}<0 \tag{20}\]  
From Equation (8) \(\dot{S}=S(-\varepsilon\text{sgn}(S)-kS)\) can be obtained; as long as \(\varepsilon>0\) and \(k>0\), it can be guaranteed that S and \(\dot{S}\) have opposite signs, satisfying the system stability condition.