## 5 AFSMC Design  
### Traditional SMC  
The N-th order SISO uncertain nonlinear control system can be written as follows:  
\[\left\{ \begin{array}{l}x^{(n)}=f(\vec{x},t)+g(\vec{x},t)u\\ \vec{x}=[x_{1}\ x_{2}\cdots x_{n}]^{\rm T}=[x\ \ \ \dot{x}\cdots x^{n-1}]^{\rm T} \in\ \ R^{n}\end{array} \right. \tag{20}\]  
where \(u\in R\) is the control input, \(x\in R\) is the system output, \(\vec{x}\) is the system measurable state vector, and \(g(\vec{x},t)\) and \(f(\vec{x},t)\) are the unknown bounded nonlinear continuous functions. Assume \(g(\vec{x},t)>0\), based on the uncertainty of the system model and external disturbances, the control law is designed so that the state vector tracks the desired state trajectory, as shown in Equation (21). \[\left\{ \begin{array}{l}\vec{x}_{\rm d}=\Big{[}x_{\rm d}\ \ \dot{x}_{\rm d}\ \ \dots\ x_{\rm d} {}^{(n-1)}\Big{]}^{\rm T}\\ \|\vec{x}_{\rm d}\|\leq M\quad\quad if\quad M>0\end{array} \right. \tag{21}\]  
Defining A as tracking error, the tracking error vector can be written as follows:  
\[\vec{e}=\vec{x}-\vec{x}_{\rm d}=\Big{[}e\,\dot{e}\,\dots\ e^{(n-1)}\Big{]}^{ \rm T}\in\ \ R^{n} \tag{22}\]In the state space of error, the sliding mode surface is defined as follows:  
\[\left\{ \begin{array}{l}s=c_{1}e+c_{2}\dot{e}\ \cdots c_{n-1}e^{n-2}+e^{n-1}=c^{ \intercal}\mathbf{e}\\ \mathbf{c}=[c_{1}+c_{2}\ \cdots c_{n-1}]^{\intercal}\\ h(\lambda)=\lambda^{n-1}+c_{n-1}\lambda^{n-2}+\cdots+c_{1}\end{array} \right. \tag{23}\]  
where \(\mathbf{c}\in R_{\text{n}}\) is the Hurwitz polynomial coefficient vector, and \(\lambda\) is the Laplace operator. If \(\mathbf{e}(0)=0,\mathbf{x}=\mathbf{x}_{\text{d}}\), \(t\geq 0\), the error state can remain sliding on the sliding surface, and Equation (24) can be derived. \[\left\{ \begin{array}{l}\frac{1}{2}\frac{\text{d}\mathbf{x}^{2}}{\text{d}t}\leq- \eta|s|\\ \eta>0\end{array} \right. \tag{24}\]  
If \(f(\mathbf{x},t\ )\) and \(g(\mathbf{x},t)\) are known, the controllable law equation can be expressed by Equation (25),  
\[\left\{ \begin{array}{l}u=u_{\text{eq}}-u_{\text{sw}}\\ u_{\text{eq}}=\frac{1}{g(\mathbf{x},t)}\cdot\left[-\sum\limits_{i=1}^{n-1}c_{i}e^{ (i)}-f(\mathbf{x},t)+{x_{\text{d}}}^{(n)}\right]\\ u_{\text{sw}}=\frac{1}{g(\mathbf{x},t)}k\,\text{sgn}\,\text{s}\\ k>0\end{array} \right. \tag{25}\]  
where \(k\) is the switching gain, \(u_{\text{sw}}\) is the switching control, and \(u_{\text{eq}}\) is the equivalent control. Adopting appropriate reaching laws can improve the dynamic characteristics of the sliding mode reaching stage. By using the constant velocity reaching law, when the value of k is large, the motion point can reach the sliding surface quickly, but it will cause significant chattering. When the value of k is very small, the moving point reaches the sliding surface slowly, and the dynamic performance of the system is also poor. The exponential reaching law can be expressed by Equation (26),  
\[\dot{s}=-k\,\text{sgn}\,s-\tau s \tag{26}\]  
where \(\tau\) is positive constants. If Equation (20) is a second-order nonlinear system, then,  
\[\ddot{x}=f(\mathbf{x},t)\ \ +g(\mathbf{x},t)u \tag{27}\]  
Sliding mode surface equation can be written as follows:  
\[s=c_{1}e+\dot{e} \tag{28}\]  
Control law can be expressed as follows:  
\[\left\{ \begin{array}{l}u=\frac{R-f(\mathbf{x},t)}{g(\mathbf{x},t)}\\ \xi(\mathbf{x},t)=\ddot{x}_{\text{d}}-c_{1}\dot{e}\\ R=\xi(\mathbf{x},t)-k\,\text{sgn}\,s-\tau s\end{array} \right. \tag{29}\]  
**Theorem 1**. _According to (27)-(29), nonlinear systems can reach the sliding mode surface in finite time._  
_Prove Lyapunov function,_  
\[V=\frac{1}{2}s^{2} \tag{30}\]  
_Then_  
\[ \begin{array}{l}\dot{V}=s\dot{s}=s\big{(}\ddot{e}+c_{1}e\big{)}=s\big{(} \ddot{x}-\ddot{x}_{\text{d}}+c_{1}\dot{e}\big{)}\\ =s\big{(}f(\mathbf{x},t)+g(\mathbf{x},t)u-\ddot{x}_{\text{d}}+c_{1}\dot{e}\big{)}\end{array}