A centrifugal pump turbine performance prediction method of an improved PSO-GA algorithm
By optimizing the BP neural network with an improved PSO-GA algorithm, the problems of modeling complexity and low accuracy in centrifugal pump turbine performance prediction are solved, achieving fast and accurate turbine performance prediction and improving prediction accuracy and computational efficiency.
Patent Information
- Application Number
- CN202211109337.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-13
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2042-09-13
AI Technical Summary
Existing technologies for predicting the turbine performance of centrifugal pumps suffer from problems such as cumbersome modeling, significant impact of grid quality on prediction accuracy, and high computational resource consumption. Furthermore, neural networks have low accuracy in predicting hydraulic characteristics under all operating conditions.
An improved PSO-GA algorithm (C-PSO-GA) combined with a BP neural network is adopted. By constructing a dataset, initializing the population, optimizing algorithm parameters and crossover operations, the weights and thresholds of the BP neural network are optimized. The LeakyReLU activation function and adaptive crossover strategy are used to improve prediction accuracy and speed.
It enables rapid and accurate prediction of centrifugal pump turbine performance, improves prediction accuracy and computational efficiency, reduces computational complexity, and meets the needs of engineering practice.
Smart Images

Figure CN115455821B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of centrifugal pump performance prediction as turbine, and particularly relates to a centrifugal pump turbine performance prediction method based on improved PSO-GA algorithm. BACKGROUND
[0002] In the field of centrifugal pump performance prediction as turbine, the accuracy and prediction speed of the traditional simulation method using CFD can indeed reach a high degree, but the modeling process is tedious, the prediction accuracy is greatly affected by the grid quality, and a large amount of resources is required for operation, so that the method cannot be applied to engineering problems that require rapid acquisition of centrifugal pump performance parameters as turbine. For the method of using loss function model for prediction, the model has the problems of great difficulty in establishment, inconvenient input parameter acquisition and poor model generalization ability, and the engineering problems that require rapid acquisition of centrifugal pump performance parameters as turbine are still not well solved.
[0003] In recent years, machine learning methods based on neural networks have developed rapidly. Neural network is a learning model that achieves fitting effect through continuous iteration, and has good applicability and generalization performance. At present, the prediction of the best operating point of centrifugal pump in turbine state by using artificial neural network can achieve a certain accuracy, but the method for predicting the hydraulic characteristics of the whole operating condition in turbine state is still less and has low accuracy. SUMMARY
[0004] In view of the deficiencies of the prior art, the application provides a centrifugal pump turbine performance prediction method based on improved PSO-GA algorithm, which can accurately and quickly predict the hydraulic characteristics of the pump in turbine state under the condition that part of the parameters in the pumping state are known.
[0005] The object of the application is achieved by the following technical solutions:
[0006] A centrifugal pump turbine performance prediction method based on improved PSO-GA algorithm (C-PSO-GA) comprises the following steps:
[0007] Step 1: Construct a data set and divide it into a training set and a validation set.
[0008] The training set includes the operating data of multiple centrifugal pumps in turbine state, and each training sample includes the geometric parameters, specific speed, flow rate and corresponding head of each flow rate in turbine state of the centrifugal pump.
[0009] Step 2: Construct a BP neural network, and use the reciprocal of the mean square error of the neural network as the fitness function of the optimization algorithm.
[0010] Step 3: Initialize the C-PSO-GA hybrid optimization algorithm to initialize the population, and perform normalization operation on the data set.
[0011] Step four: the initial weight and threshold of BP neural network are optimized by using C-PSO-GA hybrid optimization algorithm.
[0012] The C-PSO-GA optimization algorithm selects n individuals, each of which includes all the weights and thresholds of the BP neural network, and uses the initialization population strategy of back learning for population initialization, and the inertia weight w is an adaptive weight coefficient, and the calculation method is as follows:
[0013]
[0014] Wherein, w k is the kth generation weight, n1 value is 0.6, n2 value is 0.3, ax_iter is the maximum iteration number, and k is the iteration number.
[0015] In each iteration, the position information of the best fitness value obtained by the operation of the individual in the population will be saved in the global best position information (gbest), and the position information of the best fitness value obtained by the operation of each individual itself will be saved in the individual best position information (pbest).
[0016] Step five: the optimized BP neural network is trained by using the training set, and a random pump is taken in the validation set for verification.
[0017] Further, the BP neural network includes an input layer, two hidden layers and an output layer, the input layer includes 9 neurons corresponding to the specific speed under the centrifugal pump pumping state, the flow under each working condition, the blade number, the impeller inlet diameter, the volute outlet width, the volute inlet diameter, the impeller outlet width, the impeller inlet installation angle and the impeller outlet installation angle; the output layer includes 1 neuron, which is the head corresponding to the flow input by the input layer; the number of neurons in the first and second hidden layers is obtained by using the trial and error method.
[0018] Further, the activation function of the BP neural network is LeakyReLU function.
[0019] Further, the improved C-PSO-GA hybrid optimization algorithm uses the initialization population strategy of back learning for population initialization, and the calculation method is as follows:
[0020] Firstly, the random population is initialized by using uniform distribution, and the upper limit of the population individual is b and the lower limit is a.
[0021] Secondly, an individual reverse digital matrix is generated corresponding to each population individual matrix, and the reverse digital generation method is as follows:
[0022] P=a+b+p
[0023] Wherein, P is the reverse number of initial population individuals, p is the number of population individuals.
[0024] Finally, according to the order, the individuals are taken out from the initialized random population and the reverse number matrix, and the fitness is calculated using the fitness function. The individuals with higher fitness are selected and put into the corresponding positions of the final initial population.
[0025] Further, the improved PSO-GA hybrid optimization algorithm (C-PSO-GA) normalizes the data set during optimization, and adopts a combination of sin function and min-max normalization method for normalization operation, and the calculation formula is as follows:
[0026]
[0027] Wherein, y is the normalized value, x is the original data value before normalization, max is the maximum value of the original data set, and min is the minimum value of the original data set.
[0028] Further, the C-PSO-GA hybrid optimization algorithm updates the individual information using the position and speed information update formula, and the specific update formula is as follows:
[0029]
[0030]
[0031] Wherein, i is the i-th individual, is the current speed information of the i-th individual in the k-th generation, w is the inertia weight, c1 and c2 are the individual learning factor and group learning factor respectively, r1 and r2 are random numbers in [0, 1], is the optimal position information of the i-th individual in the k-th generation, g k is the group optimal position information in the k-th generation, is the current position information of the i-th individual in the k-th generation.
[0032] Further, the improved PSO-GA hybrid optimization algorithm adopts the crossover strategy of retaining the elite for crossover operation, and the calculation method is as follows:
[0033] After one iteration is completed, several groups of individuals are randomly selected and crossed with the population optimal position to obtain offspring individuals. The parent individuals and offspring individuals are mixed and then put into the fitness function for calculation, and the R 2 value is calculated for evaluation, and the individual with larger fitness function value is selected as the elite individual and put into the next generation population. When the fitness function values are similar, the individual with larger R 2 value is selected as the elite individual. The crossover formula is as follows:
[0034]
[0035]
[0036] Wherein, L is a cross factor, and m is an adaptive cross coefficient.
[0037] The beneficial effects of the present application are as follows:
[0038] (1) The reserved elite crossover strategy adopted by the present application can improve the convergence speed of the prediction method to a certain extent, and further improve the operation efficiency. Compared with the traditional PSO-BP or GA-BP algorithm, the convergence speed is faster, the optimization accuracy is higher, and the effectiveness and operation efficiency are improved.
[0039] (2) The present application is more convenient to use than the existing simulation method, has a short calculation period, and can accurately predict the centrifugal pump turbine performance. BRIEF DESCRIPTION OF DRAWINGS
[0040] Figure 1 It is a flow chart of the centrifugal pump turbine performance prediction method of the improved PSO-GA-BP algorithm;
[0041] Fig. 2(a) is a structure parameter diagram of the water plenum;
[0042] Fig. 2(b) is a structure parameter diagram of the impeller;
[0043] Figure 3 It is the change condition of the iteration R 2 value of different hidden layer neuron numbers;
[0044] Figure 4 It is a comparison diagram of the fitness value changes of four algorithms;
[0045] Fig. 5(a) is a comparison diagram of the head prediction error predicted by four methods;
[0046] Fig. 5(b) is a head prediction diagram of four methods. DETAILED DESCRIPTION
[0047] The purpose and effect of the present application will become more apparent from the following detailed description of the preferred embodiments according to the drawings, and it should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0048] As Figure 1 shown, the centrifugal pump turbine performance prediction method based on the C-PSO-GA-BP algorithm of the present application comprises the following steps:
[0049] Step 1: Construct a training set, and divide it into a training set and a validation set according to an 8:2 ratio.
[0050] The training set includes operation data of multiple centrifugal pumps in turbine state, each training sample including geometric parameters of the centrifugal pump, specific speed, flow rate, and head corresponding to each flow rate in turbine state.
[0051] In the embodiment, each training sample inputs 9 data to the input layer, including specific speed Ns of the centrifugal pump in pumping state, flow rate Q in each working condition, number of blades Z, impeller inlet diameter D0, volute outlet width D2, volute inlet diameter D1, impeller outlet width b, impeller inlet setting angle β1, and impeller outlet setting angle β2. The output of the output layer is one, which is the head H corresponding to the flow rate input to the input layer. The structure parameter diagrams of the centrifugal pump impeller and the water plenum are shown in FIG. 2(a) and FIG. 2(b), in which D0 is the impeller inlet diameter, D2 is the volute outlet width, D1 is the volute inlet diameter, b is the impeller outlet width, β1 is the impeller inlet setting angle, and β2 is the impeller outlet setting angle.
[0052] Part of the data of the training set is shown in Table 1 below:
[0053] Table 1 Training set data of centrifugal pump as turbine
[0054]
[0055] Step two: build a BP neural network, and use the reciprocal of the mean square error of the neural network as the fitness function of the optimization algorithm:
[0056] In the embodiment, the artificial neural network includes an input layer, two hidden layers, and an output layer. The number of neurons in the two hidden layers is determined by trial and error method. After 500 iterations of different numbers of neurons in the hidden layers, the R 2 value changes as shown in FIG. 3. Figure 3 It can be seen that when the first hidden layer has 16 neurons and the second hidden layer has 10 neurons, the R 2 value is the largest, so the first hidden layer has 16 neurons and the second hidden layer has 10 neurons. The specific structure of the BP neural network is shown in Table 2 below.
[0057] Table 2 Specific structure of BP neural network
[0058]
[0059]
[0060] The loss function adopts mean square error as the loss function of BP neural network. Compared with other loss functions, the mean square error is simple to calculate, and the gradient is also reduced with the decrease of error, which is conducive to convergence. LeakyReLU function is used as the activation function. Compared with other activation functions, ReLU activation function can better excavate relevant features and fit training data. And using ReakyReLU function can effectively solve the problem of gradient disappearance. The LeakyReLU activation function adds a small slope to the negative part based on the ReLU function, which solves the problem of neuron death. The BP neural network activation function is LeakyReLU function, and its expression is as follows:
[0061]
[0062] Wherein, a i is a fixed parameter in (1, +∞), 1 / a i is a negative slope coefficient, which is 0.01; x i represents the input quantity of the current layer neuron, and y i represents the output quantity of the current layer neuron.
[0063] In addition, the reciprocal of the mean square error of the neural network is used as the fitness function of the optimization algorithm. Compared with directly using the mean square error as the fitness function of the optimization algorithm, using the reciprocal can amplify the fitness function value, which is convenient for intuitive feeling of the optimization effect.
[0064] Step three: initialize the C-PSO-GA hybrid optimization algorithm, initialize the population, and normalize the data set.
[0065] In this embodiment, the population is initialized by using the initialization population strategy of reverse learning. Compared with the traditional uniform random initialization or 0-1 initialization method, this method retains more elite population individuals, which can improve the convergence speed of the optimization algorithm to a certain extent. The calculation method is as follows:
[0066] Firstly, the random population is initialized by using uniform distribution, and the upper limit of the population individual is b and the lower limit is a.
[0067] Secondly, a reverse digital matrix is generated for each population individual matrix. The reverse digital generation method is as follows:
[0068] P = a + b + p
[0069] Wherein, P is the reverse number of the initial population individual, and p is the number of the population individual.
[0070] Finally, in order, from the initialization of the random population and the individual in the reverse digital matrix, the fitness function is used to calculate its fitness. Select the individual with higher fitness and put it in the corresponding position of the final initial population.
[0071] In this embodiment, the sin function is combined with the min-max normalization method to perform normalization operation. In the centrifugal pump turbine data set, when the flow rate is small or large, the change rate of the head is fast, which makes the head data all accumulate in the interval of 0.3-0.7 when the min-max normalization method is used alone, resulting in a large prediction error. The sin function combined with the min-max normalization method can make the head data more uniformly distributed in the interval of 0-1, thereby reducing the error to some extent. The specific calculation formula is as follows:
[0072]
[0073] Where y is the normalized value, x is the original data value before normalization, max is the maximum value of the original data set, and min is the minimum value of the original data set.
[0074] Step four: the C-PSO-GA hybrid optimization algorithm is used to optimize the initial weight and threshold value of the BP neural network.
[0075] In this embodiment, the C-PSO-GA optimization algorithm selects 20 individuals, each individual includes all the weights and thresholds of the BP neural network, uses the reverse learning initialization population strategy to initialize the population, the iteration number is selected as 50, the inertia weight w is the adaptive weight coefficient, and the calculation method is as follows:
[0076]
[0077] Where w k is the kth generation weight, n1 value is 0.6, n2 value is 0.3, ax_iter is the maximum iteration number, and k is the iteration number.
[0078] The crossover probability is 0.6, c1 and c2 are 2, the BP neural network iteration number is selected as 500, and the training set is substituted for operation. In each generation, the individual position information of the best fitness value obtained by operation in the population will be saved in the global best position information (gbest), and the position information of the best fitness value obtained by each individual itself will be saved in the individual best position information (pbest). The position and speed information update formula is as follows:
[0079]
[0080]
[0081] wherein i is the ith individual, is the current velocity information of the ith individual in the kth generation, w is the inertia weight, c1 and c2 are the individual learning factor and the group learning factor respectively, r1 and r2 are random numbers in [0, 1], is the optimal position information of the ith individual in the kth generation, g k is the group optimal position information in the kth generation, is the current position information of the ith individual in the kth generation.
[0082] In addition, after one iteration is completed, several groups of individuals are randomly selected to perform crossover operation with the population optimal position (the probability is 0.6), to obtain offspring individuals, the parent individuals and the offspring individuals are mixed and then put into the fitness function for calculation, and the R 2 value is calculated for evaluation, the fitness value is divided into intervals, every 100 numbers are taken as an interval, when in different intervals, the individual with a larger fitness value is selected as the elite individual and put into the next generation population, when in the same interval, the individual with a larger R 2 value is selected as the elite individual. The crossover formula is as follows:
[0083]
[0084]
[0085] wherein L is the crossover factor, and m is the adaptive crossover coefficient, which is taken as 0.6 in the embodiment.
[0086] After the iteration is completed, the global optimal position information (gbest) is taken as the initialization weight and threshold of the BP neural network, and the optimized BP neural network is obtained. The optimized fitness function value is as shown in the following formula: Figure 4 It can be seen that, compared with the traditional PSO optimization algorithm, the PSO optimization algorithm with the adaptive crossover operator has a faster optimization speed and a better optimization effect. In addition, the reverse learning strategy is used to initialize the population, which can make the optimization algorithm find the position information with a higher fitness value faster in the initial stage, thereby improving the function convergence speed and the accuracy to a certain extent.
[0087] Step five: the training set is used to train the optimized BP neural network, and a random pump in the verification set is used for verification:
[0088] Fig. 5 (a) and Fig. 5 (b) are centrifugal pump performance prediction graphs and prediction error comparison graphs with a specific speed of 75, and it can be seen that, compared with the prediction errors of the three, the prediction errors of the PSO-BP and GA-BP neural networks are basically within 10%, wherein the maximum error occurs at the prediction point 2, and the maximum value is 7.01%, the prediction error is relatively large, while the prediction error of the PSO-GA-BP neural network is basically within 4%, the maximum error is 5.61%, and the average error value is 1.44%. The prediction error of the neural network optimized by the C-PSO-GA algorithm is 2.14% at most, and the average error is 0.97%, compared with other algorithms, the average prediction error of the C-PSO-GA algorithm using the back learning method and the adaptive crossover operator is improved by about 2.5%, and the average error is similar. The comparison test results show that the C-PSO-GA algorithm proposed in the application can effectively establish a prediction model under multiple working conditions, and compared with other algorithms, the maximum error of the algorithm is smaller, which can provide higher precision and better meet the requirements of engineering practice.
[0089] The method of the application is different from the existing prediction method of the performance of the centrifugal pump as a turbine in that the genetic algorithm crossover idea is added to the PSO-BP algorithm with poor local search ability and low search precision to perform crossover operation on individuals, which improves the search precision of the PSO algorithm to a certain extent, and the reverse learning strategy is added to further improve the convergence speed and search precision of the algorithm, thereby obtaining better prediction effect.
[0090] Those skilled in the art can understand that the above description is only a preferred example of the application and is not used to limit the application, although the application has been described in detail with reference to the foregoing examples, those skilled in the art can still modify the technical solutions recorded in the foregoing examples or replace some technical features with equivalent ones. Any modification, equivalent replacement, etc. within the spirit and principles of the application shall be included in the protection scope of the application.
Claims
1. A method for predicting the performance of a centrifugal pump turbine using an improved PSO-GA algorithm, characterized in that The method comprises the following steps: Step one: constructing a data set, dividing the data set into a training set and a validation set; The training set comprises operation data of multiple centrifugal pumps in a turbine state; Step two: constructing a BP neural network, using the reciprocal of the mean square error of the neural network as the fitness function of the optimization algorithm; Step three: initializing the C-PSO-GA hybrid optimization algorithm, normalizing the data set; The initialization population strategy of reverse learning is used for population initialization, and the process is as follows: First, a random population is initialized using a uniform distribution, with an upper limit of b and a lower limit of a for the population individuals; Second, for each population individual matrix, a reverse digital matrix is generated; Finally, in order according to the order, individuals are taken out from the initialization random population and the reverse digital matrix, the fitness is calculated using the fitness function, the individuals with high fitness are selected, and the corresponding positions in the final initial population are put in; The data set is normalized by combining the sin function with the min-max normalization method, and the calculation formula is as follows: Where y is the normalized value, x is the original data value before normalization, max is the maximum value of the original data set, and min is the minimum value of the original data set; Step four: using the C-PSO-GA hybrid optimization algorithm to optimize the initial weights and thresholds of the BP neural network; The C-PSO-GA hybrid optimization algorithm selects n individuals, each individual includes all the initial weights and thresholds of the BP neural network, and the initialization population strategy of reverse learning is used for population initialization; the inertia weight w is an adaptive weight coefficient, which is calculated as follows: where w k is the weight of the kth generation, n1 has a value of 0.6, n2 has a value of 0.3, ax_iter is the maximum number of iterations, and k is the iteration number. In each iteration, the individual position information of the best fitness value obtained by operation in the population is saved in the global best position information, and the position information of the best fitness value obtained by each individual itself is saved in the individual best position information. The position and speed information update formula updates the individual information, and the specific update formula is as follows: where i is the ith individual, is the current velocity information of the ith individual in the kth generation, w is the inertia weight, c1 and c2 are the individual learning factor and the group learning factor respectively, and r1 and r2 are random numbers in [0, 1], is the optimal position information of the ith individual in the kth generation, g k is the group optimal position information in the kth generation, is the current position information of the ith individual in the kth generation; The elitist crossover strategy is used for crossover operation, and the process is as follows: After one iteration, several groups of individuals are randomly selected and crossoverdated with the optimal position in the population to obtain offspring individuals. The parent and offspring individuals are then mixed and their fitness functions are calculated, along with their R-values. 2 The values are used for evaluation, and individuals with larger fitness function values are selected as elite individuals and placed into the next generation population; the crossover formula is shown below: Where L is the crossover factor and m is the adaptive crossover coefficient. Step five: using the training set to train the optimized BP neural network, and verifying a random pump sample in the validation set.
2. The improved PSO-GA algorithm-based method for predicting the performance of a centrifugal pump turbine according to claim 1, characterized in that: The operation data of step one includes the geometric parameters, specific speed, flow rate, and head corresponding to each flow rate of the centrifugal pump in the turbine state.
3. The improved PSO-GA algorithm-based method for predicting the performance of a centrifugal pump turbine according to claim 2, characterized in that: The geometric parameters include the number of blades, impeller inlet diameter, volute outlet width, volute inlet diameter, impeller outlet width, impeller inlet setting angle, and impeller outlet setting angle.
4. The improved PSO-GA algorithm-based method for predicting the performance of a centrifugal pump turbine according to claim 1, characterized in that: The BP neural network of step two comprises an input layer, two hidden layers, and an output layer, the input layer comprises nine neurons, the output layer comprises one neuron, and the number of neurons in the first and second hidden layers is obtained by trial and error; The activation function of the BP neural network is the LeakyReLU function.
5. The improved PSO-GA algorithm-based method for predicting the performance of a centrifugal pump turbine according to claim 1, characterized in that: The individual reverse digital matrix of step three is as follows: P = a + b + p Where P is the reverse number of the initial population individual, and p is the number of the population individual.
6. The improved PSO-GA algorithm-based method for predicting the performance of a centrifugal pump turbine according to claim 1, characterized in that: The crossover operation described in step four involves selecting R when fitness function values are similar. 2 Individuals with higher values are considered elite individuals.
Citation Information
Patent Citations
Dynamic robust prediction method for centrifugal pump rotor with uncertain bearing parameters
CN114330083A
Centrifugal pump performance intelligent prediction method considering performance constraint
CN114398838A