Pressure Model of Control Valve Based on LS-SVM with the Fruit Fly Algorithm

: Control valve is a kind of essential terminal control component which is hard to model by traditional methodologies because of its complexity and nonlinearity. This paper proposes a new modeling method for the upstream pressure of control valve using the least squares support vector machine (LS-SVM), which has been successfully used to identify nonlinear system. In order to improve the modeling performance, the fruit fly optimization algorithm (FOA) is used to optimize two critical parameters of LS-SVM. As an example, a set of actual production data from a controlling system of chlorine in a salt chemistry industry is applied. The validity of LS-SVM modeling method using FOA is verified by comparing the predicted results with the actual data with a value of MSE 2.474 × 10 − 3 . Moreover, it is demonstrated that the initial position of FOA does not affect its optimal ability. By comparison, simulation experiments based on PSO algorithm and the grid search method are also carried out. The results show that LS-SVM based on FOA has equal performance in prediction accuracy. However, from the respect of calculation time, FOA has a significant advantage and is more suitable for the online prediction.


Introduction
The control valve is a common element in modem process control, which is used to control the flow of a fluid.Its mathematical model is usually necessary in designing the automatic control or fault diagnosis systems.Song K. et al. [1,2] described the system of control valve based on fluid mechanics.However, there are a lot of limitations for the theory analysis method because of the complexity of the structure, nonlinearity and time-lag of the control valve.This makes it is quite difficult to accurately forecast the physical variable of control valve.To overcome this problem, some simulation calculation methods are used, such as bondgraph approach [3] and system identification.Especially the latter is wildly used.J.W. Ma [4] predicted the characteristics of hydraulic valve using support vector machine.A. Helling [5] deduced the dynamic mathematic model of the control valve using neural network.
The least squares support vector machine (LS-SVM) is a reformulation of the support vector machine (SVM) which solves linear programming problem rather than quadratic programming problem [6,7].LS-SVM can approach the nonlinear system with high precision, making it an excellent method for modeling nonlinear systems [8,9].The LS-SVM model has been successfully used to solve forecasting problems in many fields, such as CO concentration [10], gas [11,12], short term electric load [13][14][15], revenue [16], precipitation [17], wind speed [18], hydropower consumption forecasting [19], and so on.However, we regret that few literatures study the modeling of control valve using LS-SVM.This paper explores the feasibility of using the LS-SVM model to forecast the upstream pressure of control valve.The forecasting performance of the LS-SVM model largely depends on the values of its two parameters.Currently, several meta-heuristic algorithms have been used to determine the optimal values of these two parameters, including particle swarm optimization [11], genetic algorithm [12], chaotic differential evolution approach [20], artificial bee colony algorithm [21], and simulated annealing algorithm [22].However, these algorithms have some drawbacks such as being hard to understand and reaching the global optimal solution slowly.
The fruit fly optimization algorithm (FOA) is a novel evolutionary optimization technique, which was proposed by Pan in 2011 [23].This new optimization algorithm has the advantages of being easy to understand and of reaching the global optimal solution fast.Recently, the FOA has been applied for different problems, for example PID controller tuning [24], power load forecasting [25,26], web auction logistics service [27] and financial distress [23].Therefore, this paper attempts to use the FOA to optimize the two necessary parameters in order to improve the performance of the LSSVM model in upstream pressure forecasting of the control valve.
The outline of the paper is as follows.Section 2 introduces the physical model and LS-SVM model of upstream pressure.Section 3 studies the influence of the LS-SVM parameters on identification performance.Then, in Section 4, the process of optimizing the parameters of LS-SVM based on FOA is introduced in detail.Section 5 introduces the method of sampling the test data, the predicting results and comparison between FOA, the particle swarm optimization (PSO) and the grid search method.Finally, the proposed modeling method is concluded in Section 6.

Physical Model of the Upstream Pressure of Control Valve
The upstream pressure adjusting equation of the control valve can be deduced from the physical properties of the fluid and the restriction characteristics [28], that is: where p 1 is the upstream pressure, p 2 is the downstream pressure, q is the flow rate, ρ is the mean density of fluid, β is ratio of contractive section diameter to the pipe diameter, ε is the expansion factor which is influenced by the temperature T, A r is the area of contractive section which is the function of the opening of the control valve (%) and E is velocity coefficient.
From Equation (1), the upstream pressure can be written as a function f of the physical properties of the fluid and control valve in Equation ( 2): Now, if the non-linear relation in Equation ( 2) is known, the upstream pressure of control valve can be obtained by simply measuring the downstream pressure, the flow rate, temperature and the percentage of opening of the control valve.However, the computational calculations of the upstream pressure from Equation (2) may not be practical for the real-time control of the upstream-pressure-control valve due to the strong non-linearity and complexity.To overcome this problem, the LS-SVM is used to capture the relationship between the upstream pressure and the properties of the fluid and the 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, L , l, where x i ∈R n is the input values, y i ∈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) = ωφ(x) + b is constructed in the high-dimensional space.According to structure risk minimization, ω and b can be obtained from minimizing J = ||ω|| 2 + CE.Where φ(x) is the feature map mentioned above, J is the regularized cost function, ω is the weight vector of the high dimensional feature space, ||ω|| 2 = ω T ω 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 ξ.
The regression problem of function can be represented as the optimization problem of the regularized cost function J: To solve the optimization problem of Equation ( 3), a Lagrange function is constructed: where α i are Lagrange multipliers.The conditions for optimality are: Equation ( 5) can be rewritten as: After contracting ω and ξ i , we get: According to the Mercer's condition, there is the kernel function as: , ) φ( )φ( ) Then we can obtain the estimate LS-SVM function of the upstream pressure in Equation (2) as: where x ∈ R 4 is the input variables including p 2 , q, T, %.Lagrange multipliers α 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 Consequently, there are two sensitive parameters in the estimation of LS-SVM including the regularization constant C and kernel bandwidth σ.

Influence of the LS-SVM Parameters on Identification Performance
The performance of LS-SVM with RBF kernel function is influenced by the regularization constant C and kernel bandwidth σ.C is introduced to measure the trade-off between complexity and losses.It adjusts empirical risk and confidence interval to lead to a good generalization performance.If the value is too small, the punishment of error is small, which makes big training error and poor generalization ability.If the value is too big, then only the risk of experience is minimized but the complexity of the model is not considered, which will also bring poor generalization ability.Smaller σ might yield the SVM over trained and make the kernel matrix trend toward unit matrix.On the contrary, bigger σ will make the kernel function tend to be constant.
In order to contrast the influences of different C and σ, simulated tests are carried out four times respectively.The sampling set is from an actual pressure control system of chlorine in a salt industry plant which will be introduced in Section 5. Six hundred sample data are randomly divided into five groups.Among them, four groups are the training data and the other group is the test data.The mean squared error (MSE) is used to estimate the forecast accuracy.
In the first set of experiments σ is fixed at 0.04 while the value of C is varied.Then in the second set of experiments C is set to 200 while the different σ values are tested.The relationships of MSE versus C and σ are displayed in Figure 1a,b respectively.The values of C and σ that minimize MSE are listed in Table 1.It can be observed from Figure 1 and Table 1: Firstly, for the fixed sampling data set, different parameter values (e.g., C of the first test in Figure 1a) make the performance of LS-SVM different.There is an optimal parameter value minimizing the MSE.Secondly, the test data is different among the four times experiments because of they are fetched randomly from the sample set.Moreover, the optimal parameter values of four times are also different.Thereby, we can draw the conclusion that the optimal parameter value varies with the sample data, even for the same predicting object.In brief, to get the best modeling performance, it is necessary to optimize the parameters C and σ before every regression for any data set.

Optimize Parameters of LS-SVM Employing Fruit Fly Optimization Algorithm
Fruit Fly Optimization Algorithm (FOA) is a new approach for finding global optimization based on the food finding behavior of the fruit fly [23].
The process of optimizing the parameters C and σ using FOA is divided as follows and the flow diagram is illustrated in Figure 2 [25,29,30].

LS-SVM model
Set n = 1 Step 1. Data preprocessing, mainly including normalization processing and dividing the sample data into training data and test data.
Step 2. Initialize the parameters and the initial position of FOA: first, set the maximum number of generations (gen), the initial value of Smellbest (bigger enough than the actual max MSE) and population size (NP); and second, randomly initial fruit fly group location (X G , Y G ) = (X 0 , Y 0 ).
Step 3. Give the random direction η and swarm radius R. The coordinates of the nth fruit fly (X n ,Y n ) is: where n = 1, 2, …, NP and η ∈ [0,1] is a random number.
Step 4. Because the food location cannot be known, the distance to the origin is estimated first (D n ), then the smell concentration judgment value (S) is calculated whose value is the reciprocal of distance and C n , σ n can be calculated.
Step 5. Train LS-SVM model using σ n , C n and then conduct the 4-fold cross-validation tests.The smell concentration judgment function (or called fitness function) is defined as:

Smell y y m
where m is the number of the data in every sample subset, ŷ ij is the predicted value and y ij is the actual value.
Step 6. Find out the fruit fly with the minimum Smell value in the whole fly swarm and its index among the fruit fly swarm.
Step 7. Judge if the bestSmell is superior to the previous Smellbest, if so, the fruit fly swarm will use vision to fly towards that location.The Smellbest and the coordinate of the fly group (X G , Y G ) are updated: Otherwise, go to step 8.
Step 8. Judge if the iteration is end, if not, go to step 3 and continue to cycle.Otherwise, obtain the optimal values of C and σ, and begin to predict using LS-SVM.
According to the iteration steps above, there are only three parameters to be set including the population size, the initial position of population and the maximum iteration times.

Sampling Data
As an example, a sample set from an actual pressure control system of chlorine in a salt industry plant (shown in Figure 3) is used to model the upstream pressure of the control valve.In order to maintain a normal production, the pressure of the chlorine pipeline should be maintained between 29-30 KPa.This is accomplished by a control valve.Its opening is adjusted according to the actual production situation to guarantee the needed upstream pressure.In the process of production, the temperature of chlorine changes little and the downstream pressure is influenced by the upstream pressure, opening and the flow rate.Consequently, in order to improve the computing speed, the simulation test uses the opening and the flow rate as the input data to predict the upstream pressure.The test results shown in Section 5.2 indicate that using the two independent variables can reach a satisfactory accuracy.
A set of 600 data is sampled in the process of commissioning by the DCS every 20 s.Table 2 shows the descriptive statistical values of the indexes.The data set is divided averagely into five groups.Among them, four groups are used as training data and the other group is used to test the model.

Simulation Result and Analysis
The upstream pressure of control valve shown in Figure 3 is modeled using LS-SVM.The parameters σ and C are optimized using the proposed FOA.The population size is 10 and the iteration number is 50.The mean square error (MSE) is calculated as the smell concentration judgment function (or called fitness function).The optimal values of parameters are: σ = 102.6146,C = 0.0410.The simulation results are shown in Figures 4 and 5. Figure 4 is comparison of the predicted value and the actual output and Figure 5 is the estimated errors curve.The MSE value is 2.474 × 10 −3 and the mean absolute error (MAE) is 0.808 × 10 −3 kPa.These indicate that the presented approach shows a quite satisfactory accuracy.The convergence histories of three different fruit fly swarm initial positions (X 0 and Y 0 which are obtained randomly in the interval [0, 10]) are compared in Figure 6.Table 3 gives their corresponding optimal performances.In Figure 6, the three smell concentrations (minimum mean square error, MSE) of the first iteration are different because of their various initial positions.Nevertheless, all the three lines decline sharply at the early stage of iterations and eventually converged to a steady.In Table 3, it can be found that three optimal results (values of C and σ) and computing time are almost the same, and the three MSE values of predicting the upstream pressure using the optimal C and σ are basically the same too.This indicates that the initial position of the fruit fly swarm does not affect the optimal speed, the optimal results, the computing time and the accuracy of prediction basically.At present, in the area of parameter optimization, particle swarm optimization (PSO) algorithm is the most frequently studied and is widely applied, and the grid search method is the simplest algorithm.In this article, parameters of C and σ are also optimized by PSO and the grid search algorithm respectively.The scope of C is [2 −10 , 2 10 ] and that of σ is [0, 0.2].Without loss of generality, the iteration times of the two algorithms are set to be 50 and number of particle is 10, which are the same with FOA.Comparison of the convergence histories is shown in Figure 7 and the predicting performance indicators are listed in Table 4 in which MSE are the mean square error, MAE are the mean absolute error.
Figure 7 shows that FOA has faster convergence speed and equal optimal result compared with the other two algorithms.The test indicators in Table 4 further improve the above conclusion.All the three methods could give good LSSVM parameters with offering small MSE and MAE as shown in Table 4.They are equal in forecasting performance.However, from the time consuming point of view, FOA has a significant advantage.Therefore, FOA is more suitable for the online prediction of the pressure of control valve.

Conclusions
A new modeling method of control valve based on LS-SVM with the parameters optimized by the fruit fly optimization algorithm is presented.Firstly, the influence of regularization constant C and kernel bandwidth σ on the LS-SVM modeling performance is studied.Results indicate the optimal parameter value will be different for different sampling data set.Secondly, the article introduces the detailed steps of optimizing parameters of LS-SVM employing FOA.Finally, as an example, the method is used to forecast the upstream pressure of a control valve in a salt industry plant.
The test data is sampled by the DCS of the plant.The validity of FOA is verified by comparing the predicted results with the actual data.The values of MSE and MAE respectively are 2.474 × 10 −3 and 0.808 × 10 −3 kPa.In addition, in order to further observe the optimization ability, simulation experiments based on PSO algorithm and the grid search method are carried out.With the prediction results comparison, the LS-SVM model based on FOA has equal performance in prediction accuracy.However, FOA has a significant advantage because it is less time consuming and is more suitable for the online prediction.

Figure 2 . 1 Find
Figure 2. The flow diagram of fruit fly optimization algorithm (FOA).

Figure 3 .
Figure 3. Diagram of chlorine pressure control system.

Figure 4 .
Figure 4. Comparison between the actual values and predict output.

Figure 5 .
Figure 5. Output errors of upstream pressure.

Figure 7 .
Figure 7. Convergence histories of least squares support vector machine (LS-SVM) parameters using different optimization algorithms. 0

Table 1 .
The optimal parameters for different training and test sampling.

Table 3 .
Influence of different fruit fly initial position.

Table 4 .
Prediction performances using FOA, PSO and grid search.