A novel optimized SVM algorithm based on PSO with saturation and mixed time-delays for classification of oil pipeline leak detection

ABSTRACT In this paper, a novel particle swarm optimization (PSO) algorithm is proposed in order to improve the accuracy of the traditional support vector machine (SVM) approaches with applications in analyzing data of oil pipeline leak detection. In the proposed saturated and mix-delayed particle swarm optimization (SMDPSO) algorithm, the evolutionary state is determined by evaluating the evolutionary factor in each iteration, based on which the velocity updating model switches from one to another. With the purpose of reducing the possibility of getting trapped in the local optima and also expanding the search space, time-varying time-delays and distributed time-delays are introduced in the velocity updating model to respectively reflect the history of previous personal and global optimum particles. The introduction of saturation constraint ensures that the particles will convergence in case that the velocity of the particles is too large. Eight well-known benchmark functions are employed to evaluate the proposed SMDPSO algorithm which is shown via extensive comparisons to outperform some currently popular PSO algorithms. To further illustrate the application potential, the developed framework SMDPSO-based SVM algorithm is exploited in the problem of oil pipeline leak detection. Experiment results demonstrate that the SMDPSO-based SVM method is superior over other well-known classification algorithms.


Introduction
Oil, as an important strategic resource, is needed as energy and raw materials in daily life, industrial production and aerospace industry. With the rapid development of the economy, the demand for oil is increasing, and the problem of transportation has gradually attracted people's attention. Pipelines have the characteristics of high pressure, flammable and explosive medium, and environmental sensitivity. During pipeline transportation, accidents of pipeline leakage are frequent due to corrosion of materials, natural disasters, third-party damage and other reasons. In the event of leakage of oil pipelines, it not only causes economic losses, but also brings environmental pollution and major accidents such as destruction, casualties, etc. The safe operation of oil pipelines affects the production order, economic development, social stability and national energy security supply directly.
Therefore, it is necessary to inspect the oil pipeline regularly. After decades of development of pipeline leak detection technology, at present, there are many CONTACT Yong Zhang dqpizy@163.com methods for pipeline leakage detection and location, which have been extensively applied. According to the principle of pipeline leak detection technology, it can be classified into hardware-based methods and software-based methods; direct detection methods and indirect detection methods; internal detection methods and external detection methods. Among these methods, hardware-based methods and software-based methods are widely used in the pipeline leakage detection.
Hardware-based methods include distributed optical fibre detection method, magnetic flux leakage detection method, gas infrared imaging detection method, radioactive tracing detection method, characteristic impedance detection method and self-organizing wireless sensor detection. Software-based methods include sound wave detection, wavelet analysis, negative pressure wave detection, flow balance detection, generalized correlation analysis, support vector machine detection, fuzzy-neural network detection, statistical detection and real-time model detection.
In actual pipeline operating conditions, there are fewer pipeline leakage samples. Due to the advantages of small sample learning and strong generalization ability, support vector machines (SVM) have been applied to pipeline leakage detection by many scholars. SVM has been used in Qu, Feng, Zeng, Zhuge, and Jin (2010) to classify and identify characteristics of distributed optical fibre sensor vibration signal based on extraction, so as to judge whether there is leakage along the pipeline. In Wang, Zhang, and Liang (2010), independent quantitative analysis has been applied to noise reduction of pressure detection signal on the basis of SVM. The improved SVM is trained by collecting samples of 100 different working conditions and 24 leakage working conditions. Compared with 77.4% of the BP neural network, its classification accuracy is 90.3%. In Sun, Xiao, Wen, and Zhang (2016), according to the leakage of different apertures, the effective numerical entropy (RMS entropy) of the signal is used as the eigenvector to train the SVM. The experiment is carried out in a test pipeline of 62 metres. When the leakage aperture is 5 mm, the accuracy of the test results reaches 95%.
So far, SVM, as a popular supervised learning algorithm, has been successfully applied to solve data classification and regression problems due to its excellent performance and small computation cost. It should be mentioned that although the SVM detection method has the ability to classify the pipeline leakage signal, how to choose the appropriate SVM kernel function and penalty parameters is very important for identifying pipeline leakage signal effectively. Currently, a series of optimization algorithms is used to optimize the parameters of SVM (e.g. genetic algorithm (Huerta, Duval, & Hao, 2006), particle swarm optimization algorithm (Huang & Dun, 2008), artificial bee colony algorithm (Alshamlan, Badr, & Alohali, 2016)). It avoids the empirical allocation of penalty parameters to SVM, and the choice of kernel function improves the accuracy of pipeline leak condition identification. Therefore, it is a natural idea to optimize SVM parameters using the evolutionary computation (EC) algorithm to maximize the effectiveness of SVM. In order to find a suitable EC algorithm, the PSO algorithm has been proposed by Kennedy and Eberhart (1995) as an appropriate candidate algorithm. PSO is a population-based stochastic optimization algorithm, which simulates the behaviour of birds, fish and other organisms.
The PSO algorithm simulates the group intelligent optimization algorithm for the foraging flight of the bird population in the biological world. The PSO algorithm is simple and easy to implement. However, the PSO algorithm has some congenital inadequacies, such as easy premature convergence, trap local optima and weak target. In the last few decades, various modified PSO algorithms have been proposed to improve the search ability of PSO algorithms and reduce the possibility of falling into local optima (Song, Wang, & Zou, 2017;Tang, Wang, & Fang, 2011;Zeng, Wang, Zhang, & Alsaadi, 2016;Zhan, Zhang, Li, & Chung, 2009). In Zhan et al. (2009), an adaptive PSO (APSO) algorithm of system parameter based on evolutionary factors has been proposed for automatic control of parameters such as inertial weight and acceleration coefficient. A switching PSO (SPSO) algorithm has been developed in Tang et al. (2011), in which the velocity model is updated according to the Markov chain, thereby exploring the search space more thoroughly than the APSO algorithm. In addition, a switching delayed PSO (SDPSO) algorithm has been presented in Zeng, Wang, et al. (2016) to further enhance search capability by utilizing delay information (including previous personal best and global optimal particles). At the same time, a switching local evolutionary PSO algorithm has been introduced in Zeng, Zhang, Chen, Chen, and Liu (2016) to plan path for intelligent robot. more recently, a multimodal delay PSO (MDPSO) algorithm has been introduced in Song et al. (2017), which adds multi-modal time-delays to the velocity update model to reduce the possibility of falling into the local optimum and expand the search space. PSO has better global optimum performance, but the local search ability is poor. At the same time, the problem of convergence is not considered.
It should be noted that the PSO algorithm introduces saturation and time-delays into the model of velocity update, which achieves better results. Saturation can control the particle velocity, too high velocity will make the system not converge, using ζ instead of velocity of 0 can ensure that the system is dynamic stable and has better robustness. On the other hand, time-delayed information is fully utilized to expand the search space so as to reduce the possibility of falling into local optimization. By introducing time-varying delays, the optimal position of the particle can be fully utilized. Distributed time-delays is the signal propagation delay distributed through a certain number of parallel paths at a given time. So far, systems with distributed time-delays have been well studied, such as complex networks, sensor networks and networked control systems. The introduction of distributed timedelays can make full use of the local optima of all particles to reach the effect of jumping out of the local optima and enlarging the search space. A seemingly natural idea is proposed to introduce the saturation term, timevarying time-delays and distributed time-delays into the velocity update model to make better use of the historically optimal particles. Therefore, the main purpose of this paper is to study the saturated and mix-delayed particle swarm optimization (SMDPSO) algorithm and apply it to the classification of pipeline leakage detection data.
PSO algorithm has been proved to be a strong competitor of other optimization algorithms in SVM optimization. For instance, PSO optimized support vector machine has been used in Subasi (2013) to classify EMG signals for the diagnosis of neuromuscular diseases. A hybrid PSO/SVM and GA/SVM method has been mentioned in Alba, Garcia-Nieto, Jourdan, and Talbi (2007) to be used in gene selection in cancer classification. An application of the PSOCSVM model has been developed in Ranaee, Ebrahimzadeh, and Ghaderi (2010) for recognition of control chart patterns. A hybrid PSOCSVM method has been proposed in Selakov, Cvijetinović, Milović, Mellon, and Bekut (2014) to predict the short-term load in Burbank city when the temperature changes greatly. A hybrid PSOCSVM-based method has been introduced in Nieto, Garcia-Gonzalo, and Lasheras (2015) to predict the remaining service life of aircraft engines and evaluate their reliability. Very recently, a new switching-delayed-PSO-based optimized SVM algorithm in Zeng et al. (2018) for diagnosis of Alzheimer's disease. It is a seemingly natural idea to introduce the SMDPSO method into the classification problem and then it is tested in oil pipeline leak detection.
In the present paper, a modified PSO with SVM algorithm is proposed to deal with the issue of pipeline leak detection. The main contributions can be summarized in four aspects as follows: 1. A novel SMDPSO is introduced where the saturation term ensures that the velocity of PSO algorithm is not very large and prevents its non-convergence. At the same time, the velocity of 0 is substituted by ζ which makes the system dynamic stable and improves the system robustness. The time-delay terms are helpful for (a) a thorough exploration of the entire search space; (b) a significant reduction of the possibility of trapping into local optima and (c) a proper balance between the local and global search abilities. Finally, nonlinear inertial weighting is introduced to improve the searching ability of the PSO algorithm. 2. A mixed kernel function support vector machine with gaussian kernel function and polynomial kernel function is proposed based on the weight of a certain combination, which can improve the learning ability and generalization ability of SVM classification model effectively. 3. A hybrid classification algorithm is proposed, which combines the proposed SMDPSO algorithm with the traditional SVM algorithm. The proposed SMDPSO algorithm optimizes the parameters of the SVM, which affects the predictive power and efficiency of the SVM algorithm directly, thereby promoting better classification effectiveness. 4. The proposed SMDPSO-based SVM algorithm is successfully employed to analyse the data to realize oil pipeline leakage detection. With proper classification, pipeline leaks can be discovered accurately and quickly, which greatly reduces economic losses.

PSO algorithms
The PSO algorithm which is proposed by Kennedy to imitate the behaviour of such as fish schooling or birds flocking is an evolutionary algorithm, and has been applied to deal with a large number of optimization problems. In PSO algorithm, each particle of the swarm is regarded as a feasible candidate of the problem. Consider a swarm with all the particle in a D-dimensional target search space. In the kth iteration, the velocity and position of the ith particle are represented by two vectors, namely the velocity vector , respectively. In the iterative process, in order to get global optimum, the velocity of each particle is updated according to its own optimal position (pbest) represented by p i = (p i1 , p i2 , . . . , p iD ), and the global position (gbest) represented by p g = (p g1 , p g2 , . . . , p gD ). The velocity and the position of the ith particle at the (k + 1)th iteration are updated as follows: where k represents the current iteration number; ω represents the inertia weight; c 1 and c 2 are the acceleration coefficients called as cognitive and social parameters, r 1 and r 2 are two random numbers which are uniformly distributed on the interval [0, 1]. In the past decade, a host of well-known improved algorithms have been proposed to promote the searching performance of the traditional PSO algorithm. The larger inertia weight is good for the particle to wake up the global exploration, and the smaller weight is beneficial for the particle to trend to the local exploration. Therefore, linearly decreasing inertia weights (PSO-LDIW)have been proposed by Eberhart in Shi and Eberhart (1999), where ω is given as follows: where ω 1 and ω 2 represent the initial and final value of the inertia weight, respectively; the current number of iteration is represented by iter and the maximum iteration number is represented by iter max . Moreover, a PSO with time-varying acceleration coefficients (PSO-TVAC) has been proposed in Ratnaweera, Halgamuge, and Watson (2004), and two acceleration coefficients c 1 and c 2 are linearly decreased and increased as follows: where c 1i and c 2i denote the initial values of the acceleration coefficients. c 1f and c 2f represent the final value of the cognitive acceleration coefficient c 1 , and the social acceleration coefficient c 2 , respectively. It should be touched that the parameters c 1i = 2.5, c 1f = 0.5, c 2i = 0.5 and c 2f = 2.5 are determined based on experiment experience. In addition, in order to the performance of searching, a PSO with the constriction factor(PSO-CK) has been developed in Clerc and Kennedy (2002), where the recommended inertia weight, as well as acceleration coefficients, are 0.729 and 1.49, respectively. Note that all of above variants of PSO algorithms have mainly focused on adjusting parameters of the PSO algorithms, but the parameters can not be adjusted adaptively. Furthermore, an adaptive PSO (APSO) has been put forward in Zhan et al. (2009) to overcome the above defect, in which an evolutionary factor is applied to identify four evolutionary states of the whole particle swarm, including the exploration state, the exploitation state, the convergence state and the jumping-out state. Thus the inertia weight and acceleration coefficients are controlled according to the four states defined by the evolutionary factor. And then, an SPSO has been proposed to optimize the APSO. In SPSO, Markov chain has been introduced to predict the next state from the current state. Recently, the time-delays have been added into the velocity updating model of the SDPSO in Zeng, Zhang, Liu, Liang, and Alsaadi (2017). More recently, The MDPSO algorithm has been proposed in Song et al. (2017) where have introduced multimodal delays and new terms into the model updating velocity of the traditional PSO algorithm according to the evaluated evolution state.

A novel SMDPSO algorithm
In this section, a novel SMDPSO algorithm is proposed to further improve the searching ability of the traditional PSO algorithm. The main novelty of the proposed SMDPSO lies in the introduction of the mixed time-delays and the saturation in the velocity updating the model. At the same time, the nonlinear inertia weight is addicted to increases the searching ability of PSO algorithm. On the other hand, the artificial fish swarm algorithm in Wang, Zhang, Wang, and Liang (2015) is introduced to defined four states, foraging behaviour, clustering behaviour, following and stochastic behaviour. SMDPSO algorithm overcomes the shortcomings of the basic PSO algorithm that it is difficult to jump out of the local optima and to guarantee convergence.
(1) make better use of accumulated history about the population evolution with better accuracy; (2) pursue stronger capability of avoiding local optima trapping problems; (3) maintain an appropriate balance between convergence and diversity; (4) the addition of saturation guarantees the convergence of PSO algorithm and (5) the addition of nonlinear inertia weights enhances the spatial search capability of the SMDPSO algorithm.
In the proposed SMDPSO algorithm, the velocity and position equations are updated according to the evolutionary state depending on the evolutionary factor and Markov chain. The searching characteristics of the PSO algorithm are revealed through the four evolutionary behaviours, foraging behaviour, clustering behaviour, following and stochastic behaviour denoted by ξ(k) = 1, ξ(k) = 2, ξ(k) = 3 and ξ(k) = 4, respectively.
As mentioned in Zhan et al. (2009), the evolutionary factor is calculated based on the distance between the particles. The mean distance between the ith particle and other particles denoted by d i is given as follows: where S denotes the swarm size and D represents the dimension of the particle. The evolutionary factor denoted by δ is shown as follows: where d g represents the global best particle among d i , d max , d min represent the maximum and minimum of d i in the swarm, respectively. In this paper, the equal division strategy is employed to classify the four evolutionary states represented by ξ(k) as follows: where ε(k) = 1, 2, 3, 4 represent the foraging behaviour, clustering behaviour, following and stochastic behaviour, respectively. In this paper, is defined as The velocity of saturation function is defined as follows: Remark 1 In literature [22], the switching time-delay is introduced into the velocity update model, which effectively reduces the possibility of falling into the local optima. In this paper, when introducing the time-delay, the saturation constraint is added to the velocity, which limits the velocity constraint to a certain range and effectively ensures the convergence of the system.
Sigmoid function is a common s-shaped function in biology, also known as s-shaped growth curve. In information science, sigmoid function is often used as the threshold function of neural network to map variables to between 0 and 1 due to its singularities and inverse singularities. the sigmod function in the neural network is introduced as a nonlinear inertia weight ω as follows: where ω ∈ [0.5, 0.731].
In this paper, a novel velocity updating strategy is demonstrated for four behaviour as follows: 1. Foraging behaviour is denoted by ε(k) = 1, the velocity and the position of the ith particle at the (k + 1)th iteration are updated as follows: where ω is the inertia weight defined in Equation (9), acceleration coefficients c 1 and c 2 are updated according to Equations (3) and (4), the particles are trying to fly into the globally optimal region as soon as possible. Therefore, the velocity updating model in the traditional PSO algorithm is employed. 2. Clustering behaviour is denoted by ε(k) = 2, the velocity and the position of the ith particle at the (k + 1)th iteration are updated as follows: where τ 1 (k) represents time-varying time-delays and satisfies d m ≤ τ 1 (k) ≤ d M , where d m and d M are normal numbers, which are the upper and lower limits of the timevarying time-delays, respectively. This behaviour enables the particles to refer to the optimal position when they have experienced in determining the direction of the next step, reducing the blindness of particles movement, and the particles in the group are willing to remain in the area around the local optimal particles. Therefore, Time-varying time-delays are introduced in local search to reduce falling into local optima. 3. Following behaviour is denoted by ε(k) = 3, the velocity and the position of the ith particle at the (k + 1)th iteration are updated as follows: where N represents the upper bound of the distributed time-delays, τ 2 (k) represents distributed time-delays to meet p g (k − τ 2 ) = 0, ∀(k − τ 2 ) ∈ Z − . This behaviour allows the particles to refer to the optimal position of the particles when determining the next step. The communication and sharing between individuals in the particle swarm search process is strengthened, and the blindness of particle search is further reduced. It is important to search for the best location as much as possible. Therefore, Distributed time delay is introduced to explore the entire search space in a more thorough way. 4. Stochastic behaviour is denoted by ε(k) = 4, the velocity and the position of the ith particle at the (k + 1)th iteration are updated as follows: the particles that are stuck in local optima are hoping to jump out of local optima. Therefore, stochastic behaviour is introduced to provide energy for these particles to escape from the region. The flowchart of the novel SMDPSO algorithm is given in Figure 1.

Selection of Benchmark functions
In this section, the performances of the novel SMDPSO algorithm are proven through a series of simulation experiments. The benchmark functions from (14) to (21) are typical test functions, and they are difficult to get the optimal solution. It is important to note that the details of the benchmark function are shown in Table 1, including the function number, function name, threshold, search space for each dimension, dimension and a minimum value of the benchmark function. Note that all the benchmark functions are highdimensional problems. The Sphere function f 1 (x) is generally exploited to evaluate the convergence rate of the algorithm. The Rosenbrock function f 2 (x), which is viewed as a mono-modal optimization problem is often used to verify not only the local search but also the global search ability. The Schwefel 1.2 function f 3 (x) and the Schwefel 2.21 function f 6 (x) are single-peak functions that are easily trapped in local optima. The Griewank function f 4 (x) is a typical nonlinear multimodal function. The extensive search space is usually considered as a complex multimodal problem which is difficult to deal with by the optimization algorithm. The Penalized1 function f 5 (x) and the Schwefel 2.21 function f 6 (x) an irregular function, which is difficult to converge to the optimal value. The Step function f 7 (x) is a common benchmark function which is widely used to test the convergence of optimization algorithms. The Penalized1 function f 5 (x) and The Penalized 2 function f 8 (x) are multi-peak functions, it is difficult to find the optimal value.

Experiment results of the SMDPSO algorithm
In this section, a host of simulation experiments are employed to illustrate the performance of the introduced SMDPSO algorithm. The parameter settings of the simulation experiments are shown as follows: S = 20 for the particle swarm, D = 20 for the dimension of each particle, K = 20,000 for the maximum iteration of each experiment, and T = 50 for the repeated times of each experiment. For the SMDPSO algorithm, the inertia weight w is decreased from 0.731 to 0.5. The acceleration coefficients c 1 andc 2 are belonging to [0.5, 2.5]. The setting of the time-delay τ is determined based on the simulation results. The performance of the SMDPSO algorithm in the 20-dimensional search space with settings of the upper bound of the distributed time-delay N = 100. The upper and lower limits of the saturation constraint are 20 and −20, respectively. The superiority of the proposed SMDPSO algorithm is demonstrated over six popular PSO algorithms, including the PSO-LDIW (Shi & Eberhart, 1999), , , SPSO (Tang et al., 2011), SDPSO Zeng, Wang, et al. (2016) and MDPSO (Song et al., 2017). The performance tests for the proposed SMDPSO algorithms are shown in Figure 2 to Figure 9. The vertical coordinate represents the logarithmic formation of the mean fitness value of all the tested PSO algorithms, and the horizontal coordinate denotes the number of iteration for Figure 2 to Figure 9. Additionally, detailed information of the optimization performance is listed in Table 2, where the mean, the minimum and the standard deviation of the fitness value with respect to each benchmark function is presented to demonstrate the algorithms performance as well as the successful convergence ratio.
The results show that the proposed SMDPSO algorithm is superior to other PSO algorithms in the mean, minimum and standard deviation of fitness values of functions (14)-(21). It is worth saying that the mean fitness of SMDPSO algorithm is smaller than others, which shows the superiority of SMDPSO algorithm in achieving global optimum. In particular, the SMDPSO algorithm shows great superiority over other PSO algorithms, for functions (15) and functions (17). In terms of the optimal mean fitness, although the SMDPSO algorithm is not the smallest for other functions, the SMDPSO algorithm shows better competitive performance than the PSO-LDIW algorithm, PSO-TVAC algorithm, PSO-CK algorithm and SPSO algorithm.
Another important indicator in verifying the convergence performance of the optimization algorithm is the successful convergence rate. Table 2 shows the global optimal convergence rate of all benchmark functions, from which we can see that the convergence rate is not always 100%. It is indicated that not possible for some functions to achieve global optimal convergence. It is worth mentioning that the SMDPSO algorithm is superior to other PSO algorithms in the convergence rate. Because the Griewank function has a large number of local minimum values, it is difficult to detect the global minimum value, so its successful convergence rate can not reach 100%. We can see that all the testing PSO algorithms have low successful convergence ratio for function (17) which are 12%, 14%, 28%, 26%, 22%, 16%, 40%, respectively. Nevertheless, the improved SMDPSO algorithm still has the best convergence among all algorithms, which indicates that it has better performance than other PSO algorithms.
The plots of the convergence rate for testing algorithms are depicted in Figure 2 to Figure 9. Obviously the convergence rate of the SMDPSO algorithm is faster than that of other PSO algorithms for the function (14), which means that the saturation term in SMDPSO guarantees the convergence of the algorithm. In addition, it can be seen that SMDPSO algorithm has lower mean fitness value and higher successful convergence rate, and can reach the global optimal robustness for all benchmark functions. Among the benchmark functions of single-mode and multi-mode optimization, the proposed SMDPSO algorithm is superior to six well-known PSO algorithms, indicating that SMDPSO algorithm can get rid of local optimization. For instance, the SMDPSO algorithm can solve the optimization problem with satisfactory convergence speed and convergence accuracy.

The SVM algorithm
Support vector machine (SVM) algorithm that was proposed by Cortes and Vapnik in 1995, shows many unique advantages in solving small samples, non-linear and highdimensional pattern recognition. Based on the principle of Structural risk minimization (SRM), SVM can achieve the best learning ability according to the limited samples and can make regression prediction effectively. Note that all the samples are set D = {(x 1 , y 1 ), (x 2 , y 2 ), . . . , (x m , y m )} in the regression problem, the original sample space is mapped into the feature space of high dimensions by introducing a non-linear reflection spline x to input n dimension and output 1 dimension of sample set D. The decision function is supposed to be as follows: where ω is the weight vector, ϕ(x) is the eigenvector after mapping x, and b is the threshold. According to the principle of structural risk minimization, the relaxation variability ξ i of the algorithm is introduced, and SVM can be formalized into the quadratic programming problem described as follows: where C (C > 0) is the penalty parameter. The penalty factor C affects the loss value of the objective function, that is, the error value. More specifically, the larger the C, the greater the error, especially when the loss function is given. When the error is large, the SVM is prone to overfitting. Otherwise, when C is too small, SVM may have the problem of inadequate fitting.
The construction of Lagrange's function is available as follows: where μ i ≥ 0, α i ≥ 0.
The following equation constraints can be obtained from the KKT condition as follows: According to Hilbert-Schmidt principle, the kernel function satisfying Mercer condition is introduced as follows: The kernel method is introduced and the form of feature map is considered, then the final decision function is obtained as follows: where α i is the optimal Lagrangian coefficient, b is the optimal value of b, sgn denotes a symbolic function. The commonly used kernel functions(Linear kernel function, polynomial kernel function, gaussian kernel function, Laplace kernel function and sigmod kernel function) are as shown: For the complex classification problem, due to different sources of data, it may be composed of heterogeneous data sets, which leads to the complexity of data distribution. If only the SVM model of a single kernel function is selected, it is difficult to achieve satisfactory classification performance. For the kernel functions described in Equations (28)-(32), they can be divided into global and local kernel functions according to their effects on classification problems. The typical representative of global kernel functions is polynomial kernel functions. Its outstanding feature is that the generalization performance is strong and the number of samples can be well extracted. As one of the typical representatives of local kernel function, Gaussian kernel function has a good learning ability for samples within a certain distance, but its generalization ability is relatively poor. Therefore, considering the advantages and disadvantages of the two kernels, the above two kernels are combined. According to certain weights, the final kernel function is formed, which can improve the comprehensive performance of the model.
According to the above analysis, if the weight coefficient of Gaussian kernel k G is α and the polynomial kernel k P is 1−a in the final mixed kernel function, the final mixed kernel function is obtained as follows: In this paper, the SVM needs to select four model parameters, the positive normalization constant C, the width of Gaussian kernel σ , polynomial times d and the weight of final mixed kernel function combination α. C determines the size of training error and the strength of generalization ability; σ and α reflect the distribution characteristics of training samples. These parameters affect the predictive ability and algorithm efficiency of the model directly.
Usually, the optimal parameter combination is determined by the comparison of multiple parameter combinations such as cross validation or gradient descent. However, practical experience shows that these methods have many human factors, large blindness and low efficiency. PSO algorithm not only has the ability of fast solution, but also can carry out global search. In this paper, the optimal value of SVM model parameters is obtained through SMDPSO algorithm.

The SMDPSO-based SVM model
A hybrid classifier, namely, SMDPSO-based SVM model, is proposed to enhance the classification performance by utilizing the SMDPSO to optimize the positive normalization constant C, the width of Gaussian kernel σ , polynomial times d and the weight of final mixed kernel function combination α. The classification accuracy of SVM is selected as the fitness function of SMDPSO, which is formulated as follows:  where TP, FP, TN and FN indicate true positives, false positives, true negatives and false negatives, respectively. The flowchart of proposed SMDPSO-SVM algorithm is shown in Figure 10.

Results and analysis of the SMDPSO-based SVM algorithm
Pipelines are widely used to transport oil in the oil field. As a result of natural factors, human factors and other  factors, it is easy to cause oil leakage in pipeline transportation. The loss and harm caused by the leakage of the oil pipeline make people have to pay attention to the detection of the leakage of the oil pipeline. Therefore, the research of oil pipeline leakage detection technology has become a hot topic. At present, there are mature methods for leak detection of oil pipeline, but with the development of industrial technology, the accuracy of oil pipeline leak detection is also increasing. Therefore, the detection technology of oil pipeline leakage is put forward higher request.

Data pre-processing
In this section, the classification performance of the SVM algorithm based on SMDPSO is evaluated from the aspect of accuracy, and the error curve is given. The data is provided by the oil and gas pipeline leakage detection simulation experiment platform of Northeast Petroleum University. A total of 470 groups were collected, of which 300 were used for training and 170 were used for testing. The schematic diagram of pipeline leakage simulation experiment system is shown in Figure 11. The test bench is the HD-II type pipe leak detection system. The pipe has a length of 160m, a pipe wall thickness of 1 cm, and a pipe diameter of DN 50 (nominal diameter). The pipeline is equipped with a leak valve every 10 m. The experimental platform has a total of 15 leak points. Each leak point is connected by a 4-point ball valve, and a 4-point ball valve is used to simulate the leakage of the pipeline. The pipeline pressure is 0.5 MPa, the flow rate is 60 m 3 /h and the ambient temperature is 24.3 • C. The pipe layout plan is shown in Figure 12.
The simulation experiment software uses the LABVIEW development environment, and datas are collected using the NI-9215 acquisition card. The sampling frequency is 5KHz, and the piezoelectric acoustic wave sensor is used to transmit the data to the computer. The simulation experiment signals mainly include normal signals and leakage signals. Among them, the leakage signal is obtained by quickly switching the 4-point ball valve switch to simulate the pipeline leakage. Install a 10m high-pressure sonic attenuator at the leak point, and install a 4-point ball valve and a plug with a leakage aperture of 1mm at the end to reduce the impact of

Experiments results of the SMDPSO-based SVM algorithm
In this paper, The proposed SMDPSO-based SVM, together with back propagation neural network(BP-NN), stack sparse self-encoding(SSAE) (including three-layer network, four-layer network and five-layer network) is applied to the classification of long-distance pipeline       the proposed SMDPSO-based SVM demonstrates satisfactory and superiority over others.

Conclusion
In this paper, a new PSO algorithm is proposed for the sake of improving the accuracy of the traditional support vector machine approaches with applications in analysing data on oil pipeline leak detection In the proposed saturated and mix-delayed particle swarm optimization algorithm, the introduction of time-delays reduces the possibility of falling into local optima, the introduction of saturated term ensures convergence and the addition of nonlinear inertial weight increases the diversity of particles, thus greatly enhancing the search ability of the algorithm. Eight famous benchmark functions are used to evaluate the proposed SMDPSO algorithm, and a large number of comparisons prove that the performance of SMDPSO algorithm is better than some currently popular PSO algorithms.In order to further illustrate the application potential of this algorithm, the SMDPSO algorithm is applied to oil pipeline leakage detection. Experimental results show that SMDPSObased SVM is superior to other well-known classification algorithms. Future work can be summarized into two aspects: (1) How to improve the search performance of PSO and apply it to higher dimensional and more complex space; (2) How to prove the convergence of PSO from theory.