## 2 LS-SVM Upstream Pressure Model of Control Valve
### Introduction to LS-SVM  
LS-SVM is a kind of learning machine which can estimate the relationships between input and output of a system. The algorithm is as follows:  
Given a training sample set (\(x_{i}\), \(y_{i}\)), \(i=1\), \(2,\cdots\), \(l\), where \(x_{i}\in R^{n}\) is the input values, \(y_{i}\in R\) is the output values and l is the number of the samples. First, the sample set is mapped to a high-dimensional feature space \(R^{nh}\) from the original space \(R^{n}\) through a nonlinear mapping. Then, an optimal linear regression function \(f(x)=\omega\omega(x)+b\) is constructed in the high-dimensional space. According to structure risk minimization, \(\omega\) and \(b\) can be obtained from minimizing \(J=\left\|\omega\right\|^{2}+CE\). Where \(\varphi(x)\) is the feature map mentioned above, \(J\) is the regularized cost function, \(\omega\) is the weight vector of the high dimensional feature space, \(\left\|\omega\right\|^{2}=\omega^{T}\omega\) is the complexity of algorithm model, \(b\) is the deviation, \(C\) is the regularization constant and \(E\) is the loss function using the quadratic term of the slack variable \(\xi\). The regression problem of function can be represented as the optimization problem of the regularized cost function \(J\):  
\[\min J(\omega,\xi)=\frac{1}{2}\omega^{T}\omega+\frac{C}{2}\sum_{i=1}^{l}{ \xi_{i}}^{2}\hskip 14.226378 ptst.\hskip 14.226378 pty_{i}=\omega^{T}\varphi(x_{i})+b+ \xi_{i}\hskip 14.226378 pt\xi_{i}\geq 0\hskip 14.226378 pti=1,2,\cdots,l \tag{3}\]To solve the optimization problem of Equation (3), a Lagrange function is constructed:  
\[L=\frac{1}{2}\omega^{T}\omega+\frac{1}{2}C\sum_{i=1}^{l}\xi_{i}^{2}-\sum_{i=1}^{l }\alpha_{i}[\omega^{T}\varphi(x_{i})+b+\xi_{i}-y_{i}] \tag{4}\]  
where \(\alpha_{i}\) are Lagrange multipliers. The conditions for optimality are:  
\[\frac{\partial L}{\partial\omega}=\frac{\partial L}{\partial b}=\frac{ \partial L}{\partial\xi_{i}}=\frac{\partial L}{\partial\alpha_{i}}=0 \tag{5}\]  
Equation (5) can be rewritten as:  
\[\begin{cases}\omega=\sum_{i=1}^{l}\alpha_{i}\varphi(x_{i})\\ \sum_{i=1}^{l}\alpha_{i}=0\\ \alpha_{i}=C\xi_{i}\\ y_{i}=\omega^{T}\varphi(x_{i})+b+\xi_{i}\\ i=1,2,\cdots,l\end{cases} \tag{6}\]  
After contracting \(\omega\) and \(\xi_{i}\), we get:  
\[\begin{bmatrix}0&1&\cdots&1\\ 1&\varphi(x_{1})\varphi(x_{1})\cdots&\varphi(x_{1})\varphi(x_{t})\\ \vdots&\vdots&&\vdots\\ 1&\varphi(x_{t})\varphi(x_{1})&\cdots&\varphi(x_{t})\varphi(x_{1})+\frac{1}{C }\end{bmatrix}\begin{bmatrix}b\\ \alpha_{1}\\ \vdots\\ \alpha_{t}\end{bmatrix}=\begin{bmatrix}0\\ y_{1}\\ \vdots\\ y_{t}\end{bmatrix} \tag{7}\]  
According to the Mercer's condition, there is the kernel function as:  
\[K(x,x_{i})=\varphi(x)\varphi(x_{i}) \tag{8}\]  
Then we can obtain the estimate LS-SVM function of the upstream pressure in Equation (2) as:  
\[p_{1}=f(x)=\sum_{i=1}^{l}\alpha_{i}K(x,x_{i})+b \tag{9}\]  
where \(x\in R^{4}\) is the input variables including \(p_{2}\), \(q\), \(T\), \(\%\). Lagrange multipliers \(\alpha_{i}\) and the deviation \(b\) are obtained from the set of linear Equation (7). The kernel function can be any symmetric function satisfying the mercer condition. Typical examples are linear kernel, polynomial kernel and radical basis function (RBF). In this study, the RBF kernel function \(K(x,x_{i})=\exp[-\|x-x_{i}\|^{2}/(2\sigma^{2})]\) is used. Consequently, there are two sensitive parameters in the estimation of LS-SVM including the regularization constant \(C\) and kernel bandwidth \(\sigma\).