# Super-Twisting Sliding Mode Control with SVR Disturbance Observer for PMSM Speed Regulation
## 3 STRL Controller Design
### Support Vector Regression-Disturbance Observer  
Support vector regression (SVR) uses a symmetrical loss function during the training. The training method penalizes misestimates equally. SVR has an advantage that the dimensionality of the input space does not affect the computational complexity. Moreover, the excellent generalization capability ensures a high prediction accuracy. A geometrical perspective can be used to derive an SVR problem formulation. The hyperplane equation can be represented as follows [28]:  
\[\begin{split} y&=f(x)=\langle w,x\rangle+r\\ &=\sum_{j=1}^{M}w_{i}x_{j}+r,\end{split} \tag{12}\]  
where \(r\in\mathbb{R}\), and \(x,w\in\mathbb{R}^{M}\). The hyperplane that is generated from the trained SVR-DOB and unrelated to sliding surface can estimate the disturbance of PMSM. The training dataset \(x\) is measurement of disturbance and rotor speed of PMSM. SVR-DOB is trained according to the relation between disturbance and rotor speed represented as \(x\). In the process of training, SVR-DOB can obtain proper values of \(w\) and \(r\) that generate the hyperplane equation for accurate regression. Here, \(x\) is the training set, \(w\) is the weight vector, and \(r\) is the bias term. This function approximation is formulated using SVR. This becomes an optimization problem and an attempt is made to find a narrow tube centered around the surface. Figure 2 shows the concept of SVR.  
The goal is to minimize the distance, called the prediction error, between the predicted and desired results. The objective function is derived using the former condition in Equation (12). Subsequently, \(\left\lVert w\right\rVert^{2}\) is approximated as the magnitude of the vector to the surface.  
\[\min_{w}\frac{1}{2}\|w\|^{2}. \tag{13}\]  
The magnitude of \(w\) becomes an optimization problem based on the flatness of the solution and a regularizing term.  
To achieve a satisfactory control performance, PMSM control uncertainty caused by the lumped disturbance needs to be estimated. Without a corresponding compensation method, disturbance suppression is highly limited. We propose an SVR-DOB to estimate the lumped disturbance \(d(t)\) and compensate for the system error. According to Equation (4), disturbances \(d(t)\) are considered as extended system states. The extended dynamic equation can then be written as  
\[\dot{\omega}=bi_{q}^{*}+d(t), \tag{14}\]  
where \(d(t)=a(t)+\Delta a(t)\). \(\Delta a(t)\) means modeling uncertainty. In general, the system output includes mismatched disturbances. The results of the estimated system include  
Figure 2: Example of support vector regression.  
disturbances and uncertainties: the SVR-DOB can reject these disturbances. Here, \(\hat{d}\) is an estimation of the lumped disturbance \(d(t)\). The observer is designed as follows:  
\[\hat{d}=\sum_{j=1}^{M}w_{i}x_{j}+r. \tag{15}\]  
Subsequently, as the system adopts SVR-DOB, \(d(t)\) is re-denoted as \(\hat{d}(t)\) in Equation (15).  
\[\dot{\omega}=bi_{q}^{*}+\hat{d}(t). \tag{16}\]  
\(\dot{\omega}\) is the derivative of the rotor speed. This serves as a compensation control input for the system disturbances. Combined with Equation (11), the current reference can be given as:  
\[i_{q}^{*}=\frac{1}{\hat{b}}\bigg{(}k_{1}|s|^{\frac{1}{2}}\text{sgn}(s)+k_{2} \int_{0}^{t}\text{sgn}(s)d\tau-\hat{d}(t)\bigg{)}. \tag{17}\]