# Quadrotor Stabilization and Tracking Using Nonlinear Surface Sliding Mode Control and Observer
## 4 Nonlinear Sliding Surface-Based SMC Design  
For the case of a conventional SMC, a linear sliding surface can be designed using the state error and differential value of the error. In this section, we set up a nonlinear sliding surface for the controller to have a fast transient response. The general linear sliding surface is designed as follows:  
\[\begin{array}{l}\sigma_{i}(\mathbf{x},t)=\dot{x}_{i}-\dot{x}_{i,d}+\lambda_{i }(x_{i}-x_{i,d})\\ =\dot{\epsilon}_{i}+\lambda_{i}\epsilon_{i},\ (i=1,3,5,7,9,11).\end{array} \tag{9}\]  
In Equation (9), \(\dot{\epsilon}_{i}\) represents the error between the desired value \((x_{i,d})\) and the state value \((x_{i})\), and \(\lambda_{i}\) is a positive constant. Figure 3 shows the system trajectory to reach the linear sliding surface. First, the system states move along the acceleration curve to reach the sliding surface and then switch to the deceleration curve. With the deceleration process, the settling time of the state error increases [35]. To reduce the effect of the deceleration curve, we propose a nonlinear sliding surface that compensates the deceleration curve with a sigmoid function. As a first step in designing the nonlinear sliding surface, we set up a new axis-based linear sliding surface as  
\[p_{i}(\mathbf{x},t)=\dot{x}_{i}-\dot{x}_{i,d}-\frac{1}{\lambda_{i}}(x_{i}-x_{ i,d})=\dot{\epsilon}_{i}-\frac{\epsilon_{i}}{\lambda_{i}}, \tag{10}\]  
Figure 2: Control scheme of quadrotor.  
where \(p_{i}(\mathbf{x},t)\) is the axis orthogonal to the linear sliding surface. The axes \(p_{i}(\mathbf{x},t)\) and \(\sigma_{i}(\mathbf{x},t)\) are reconstructed on a new \(\sigma_{i}-p_{i}\) plane to create the nonlinear sliding surface. The nonlinear sliding surface \(\hat{\sigma}_{i}(\mathbf{x},t)\) is modeled using a sigmoid function in the \(\sigma_{i}-p_{i}\) plane as  
\[\hat{\sigma}_{i}(\mathbf{x},t)=\sigma_{i}(\mathbf{x},t)+\left(\frac{{\sigma_{ i}}^{+}-{\sigma_{i}}^{-}}{1+e^{-a_{i}p(\mathbf{x},t)}}+{\sigma_{i}}^{-}\right), \tag{11}\]  
where \({\sigma_{i}}^{+}\) and \({\sigma_{i}}^{-}\) are the maximum and minimum values of the sigmoid function, respectively, and \(a_{i}>0\) is a scaling constant that determines the slope value. As the value of \(a_{i}\) increases, the shape of sliding surface becomes the step function. According to different values of \(a_{i}\), the nonlinear sliding surface will be adjusted to ensure the reduced reaching time. Figure 4 shows the proposed nonlinear sliding surface constructed by following the sigmoid function in the \(\sigma_{i}-p_{i}\) plane. We represent the sigmoid function of Equation (11) in the new \(\varepsilon_{i}-\dot{\varepsilon}_{i}\) plane. Using the angle of \(\theta_{i}=\tan^{-1}(1/\lambda_{i})\), the \(\sigma_{i}-p_{i}\) plane can be transformed to the \(\varepsilon_{i}-\dot{\varepsilon}_{i}\) plane through the angular rotation. In this paper, \(\sigma_{i}^{+}\) and \(\sigma_{i}^{-}\) have the same absolute value of \((q_{i}\cos\theta_{i})/2\). The new nonlinear sliding surface defined in the \(\varepsilon_{i}-\dot{\varepsilon}_{i}\) plane is  
\[\begin{split}\hat{\sigma}_{i}(\mathbf{x},t)&=p_{i}( \mathbf{x},t)+\left(\frac{{\sigma_{i}}^{+}-{\sigma_{i}}^{-}}{\cos\theta_{i}} \right)\left[\frac{1}{1+e^{-a_{i}\sin\theta_{i}\sigma_{i}(\mathbf{x})}}+\frac {{\sigma_{i}}^{-}}{{\sigma_{i}}^{+}-{\sigma_{i}}^{-}}\right]\\ &=\dot{\varepsilon}_{i}-\frac{1}{\lambda_{i}}\varepsilon_{i}+q_{ i}\Big{[}\frac{1}{1+e^{-a_{i}\sin\theta_{i}\sigma_{i}(\mathbf{x})}}+\frac{{ \sigma_{i}}^{-}}{{\sigma_{i}}^{+}-{\sigma_{i}}^{-}}\Big{]}\\ &=\dot{\varepsilon}_{i}-\frac{1}{\lambda_{i}}\varepsilon_{i}+h( \sigma_{i}(\mathbf{x},t)).\end{split} \tag{12}\]  
Figure 4: Nonlinear sliding surface based on a sigmoid function.  
Figure 3: State trajectory with a linear sliding surface.