## 2 Mathematical Modeling
### Optimal Super-Twisting Sliding Mode Controller Design
#### 2.2.3 Proposed Control Input Parameter Estimation  
From the literature, we find out that they just used the non-optimal method for calculating the value of the parameters of the super-twisting sliding mode controller. However, this technique does not guarantee the performance of the system rather it might cause instability. To solve such drawbacks and for the optimality of the super-twisting sliding mode controller, we have introduced an estimator to estimate its parameters usingone of the machine learning algorithms known as linear regression based on the gradient descent method [36; 37; 38]. To apply this method for our parameter estimation purpose, we first identified three main variables: the target variable, the input feature, and the unknown parameters. The target variable, also known as the dependent variable represents the measured data used to predict the unknown parameters. The features, also referred to as independent variables are considered as input data to the measured output data. With these two datasets, the simplified linear regression model of the predicted model with one variable can be formulated as stated in [36; 37; 38]; the measured data can be related with the feature data as \(y=wx\), where \(y\) is the measured data, \(w\) is unknown parameters, \(x\) the independent variable and linear regression model for multiple variable features can be also reformulated by extending the one variable model to vectorized form. Consequently, we have applied this estimation technique to estimate the uncertain parameters of our proposed method. We have provided the following assumption since finding the experimental data of the actual control input \(u\) was difficult. **Assumption 1**. : _It is assumed that data of the actual control input \(u\) needed for parameter estimation are obtained from simulated data since it was difficult to find the experimental data of the actual control input. The simulated data are obtained using the method provided in [34]._  
How we applied this algorithm for our parameter estimation purpose is that, first, we rearranged [18] to a form of the linear regression model as [20] to make it linear in parameters \(c\) and \(b\), then the predicted model of \(u\) is described as,  
\[\hat{u}=\hat{c}|s|^{\frac{1}{2}}\operatorname{sgn}(s)+\hat{b}\int\operatorname {sgn}(s)dt, \tag{20}\]  
then, from [20] we separate the independent and dependent variables as follows,  
\[ \begin{split} y_{1}&=|s|^{\frac{1}{2}}\operatorname {sgn}(s),\\ y_{2}&=\int\operatorname{sgn}(s)dt,\end{split}  \tag{21}\]  
where \(y_{1}\) and \(y_{2}\) are the independent variables or features whereas \(\hat{u}\) is the dependent or target variable. Therefore, [20] could be rewritten as,  
\[\hat{u}=\hat{c}y_{1}+\hat{b}y_{2}, \tag{22}\]  
thus, [22] is a linear equation in terms of the unknown parameters \(\hat{c}\) and \(\hat{b}\). Therefore, we can estimate the unknown parameters using the linear regression from the experimental data we have performed. From [21] and [22], both the variables and the parameters could be rewritten in vectorized form as,  
\[ \begin{split} Z&=\begin{bmatrix}y_{1}&y_{2} \end{bmatrix}^{T},\\ \zeta&=\begin{bmatrix}\hat{c}&\hat{b}\end{bmatrix},\end{split}  \tag{23}\]  
thus, the linear regression could be reformulated as a dot product,  
\[\hat{u}=\zeta\cdot Z, \tag{24}\]  
since our model is a multiple-feature model, then [24] should be reformulated as a multiple-variable linear regression form which is,\[\hat{u}=\zeta\cdot Z^{(i)}, \tag{25}\]  
let \(\hat{u}\) represent the predicted output, and \(u\) is the actual measured output. Then, the cost function \(J\) could be defined as the sum of squared errors between the predicted and actual values of \(u\) over all the simulation data. **Remark 4**.