Centrifugal pump performance prediction method and system based on hyper-parameter optimization and genetic algorithm

By optimizing hyperparameters in genetic algorithms and BP neural networks, combining genetic algorithms and backpropagation neural networks, the problem of long calculation time and low accuracy in centrifugal pump performance prediction is solved, improving prediction accuracy and adaptability, and reducing R&D costs.

CN118940606AInactive Publication Date: 2024-11-12JIANGSU UNIV

Patent Information

Application Number
CN202410927413.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-11-12
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing centrifugal pump performance prediction methods have long calculation time, lack of universal applicability and accuracy of prediction results, especially due to the randomness of the training set and the fixed hyperparameter settings.

Method used

By optimizing hyperparameters based on genetic algorithms and BP neural networks, including adjustment of the number of hidden layer neurons and learning rate, a prediction model combining genetic algorithms and backpropagation neural networks is constructed to improve the prediction accuracy of centrifugal pump performance and the adaptability of the model.

Benefits of technology

It significantly improves the accuracy and stability of the centrifugal pump performance prediction model, enhances the adaptability and generalization capabilities of the model, reduces the number of tests, and reduces R&D costs and design risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118940606A_ABST
    Figure CN118940606A_ABST
Patent Text Reader

Abstract

The invention discloses a centrifugal pump performance prediction method and system based on hyper-parameter optimization and a genetic algorithm, and the method comprises the steps: collecting and preprocessing sample data of a centrifugal pump, and obtaining the processed data; the hyper-parameters are optimized; constructing a prediction model based on the processed data and the optimized hyper-parameters; training a prediction model by using the processed data to obtain a final model; and the final model is utilized to predict the performance of the centrifugal pump. According to the method, the hyper-parameters of the neural network are optimized through the genetic algorithm, and the number of neurons in the hidden layer and the learning rate are adjusted, so that the accuracy and stability of the centrifugal pump performance prediction model are remarkably improved, and the influence of the randomness in a training set on the accuracy of a prediction result is effectively solved. And the BP neural network structure is changed by changing the number of neurons of the hidden layer, so that the adaptability and generalization ability of the model to data are remarkably enhanced, and the model can be ensured to maintain relatively high prediction precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of centrifugal pump performance prediction, and particularly to a centrifugal pump performance prediction method and system based on hyperparameter optimization and genetic algorithm. Background Art

[0002] As a fluid mechanical device, centrifugal pumps have been widely used in many fields such as construction, industry, water treatment and chemical industry. Its core component, the impeller, undertakes the key task of converting rotational mechanical energy into fluid kinetic energy and pressure energy, thereby realizing the effective transportation of fluid. The structural design of the impeller has a decisive influence on the overall performance of the centrifugal pump. The key structural parameters affecting the performance of the centrifugal pump include the number of blades, the placement angle of the blades, the blade outlet width, and the outer diameter of the impeller. Due to the complexity of the internal flow of the impeller, there is a complex nonlinear relationship between these structural parameters and the performance of the centrifugal pump. In some cases, the degree of influence of the adjustment of structural parameters on the performance is difficult to measure through simple qualitative analysis, which brings challenges to the design and optimization of centrifugal pumps. Therefore, how to effectively predict the performance of centrifugal pumps is also a hot topic of current research.

[0003] At present, the methods for predicting centrifugal pump performance are mainly divided into the following three types: numerical simulation flow field analysis, theoretical empirical formula method based on hydraulic loss model, and machine learning technology with neural network as the core. Numerical simulation flow field analysis is a common means to predict the performance of centrifugal pumps. It can reveal the dynamic behavior of the fluid in the pump in detail, but this method often requires a lot of computing time, has high requirements on the quality of the computational grid, and the process is relatively complicated. The hydraulic loss model law calculates various hydraulic losses inside the pump by combining semi-empirical and semi-theoretical formulas, and derives the performance curve by combining the basic fluid dynamics equations of the pump. However, due to the design differences between different pump types, this method lacks universal applicability, which limits its promotion and application in a wider range.

[0004] In recent years, machine learning methods based on neural networks have developed rapidly and have been widely used in the field of centrifugal pump performance prediction. At present, the common method is to use genetic algorithms to determine hyperparameters and use a single hidden layer BP neural network for performance prediction. However, due to the randomness of the training set and the fixed hyperparameter settings, the accuracy of the prediction results may be limited. Summary of the invention

[0005] To solve the technical problems in the above background, the present invention aims to optimize hyperparameters, including learning rate and number of hidden layer neurons, based on genetic algorithm and BP neural network, so as to improve the prediction accuracy of centrifugal pump performance.

[0006] To achieve the above object, the present invention provides a centrifugal pump performance prediction method based on hyperparameter optimization and genetic algorithm, the steps comprising:

[0007] Collect sample data of the centrifugal pump and perform preprocessing to obtain processed data;

[0008] Optimize hyperparameters;

[0009] Building a prediction model based on the processed data and the optimized hyperparameters;

[0010] Using the processed data to train the prediction model to obtain a final model;

[0011] The final model is used to predict the performance of the centrifugal pump.

[0012] Preferably, the method for obtaining the processed data includes: dividing the sample data into 90% as a training set and 10% as a test set; and at the same time, performing data standardization processing on the sample data using MATLAB.

[0013] Preferably, the optimized hyperparameters include: the number of hidden layer neurons and the learning rate of the model to be constructed, wherein the method for optimizing the number of hidden layer neurons includes: optimizing the number of hidden layer neurons by adding functions based on an empirical formula to obtain the best model complexity, the formula includes:

[0014]

[0015]

[0016] Among them, h min 、h max Represents the minimum and maximum number of neurons in the hidden layer; INT means rounding down; CEILING means rounding up; m means the number of neurons in the input layer; n means the number of neurons in the output layer; a is an integer from 1 to 10.

[0017] Preferably, a linear function is proposed to dynamically adjust the learning rate to optimize model performance, and the adjustment of the learning rate follows the following linear relationship:

[0018]

[0019] Where lr() represents the learning rate and lr()∈[0.01,0.1].

[0020] Preferably, the prediction model constructed by performing genetic algorithm optimization and creating a neural network part based on the training set and the optimized hyperparameters is a prediction model that combines a genetic algorithm and a back propagation neural network.

[0021] Preferably, in the process of training the prediction model, the method of calculating the error includes:

[0022]

[0023] Among them, z is the number of test set samples, To predict performance, y i Actual performance.

[0024] The present invention also provides a centrifugal pump performance prediction system based on hyperparameter optimization and genetic algorithm, the system is used to implement the above method, including: an acquisition module, an optimization module, a construction module, a training module and a prediction module;

[0025] The acquisition module is used to collect sample data of the centrifugal pump and perform preprocessing to obtain processed data;

[0026] The optimization module is used to optimize the hyperparameters;

[0027] The prediction module is used to build a prediction model based on the processed data and the optimized hyperparameters;

[0028] The training module is used to train the prediction model using the processed data to obtain a final model;

[0029] The prediction module is used to complete the prediction of the centrifugal pump performance using the final model.

[0030] Preferably, the workflow of the acquisition module includes: dividing the sample data into 90% as a training set and 10% as a test set; and at the same time, performing data standardization processing on the sample data using MATLAB.

[0031] Compared with the prior art, the present invention has the following beneficial effects:

[0032] First, the hyperparameters of the neural network are optimized through genetic algorithms, and the number of hidden layer neurons and the learning rate are adjusted, which significantly improves the accuracy and stability of the centrifugal pump performance prediction model, and effectively solves the impact of randomness in the training set on the accuracy of the prediction results. Secondly, by changing the number of hidden layer neurons, the BP neural network structure is changed, which significantly enhances the model's adaptability and generalization ability to data, ensuring that the model can maintain a high prediction accuracy under different operating conditions. Thirdly, the present invention reasonably sets the number of iterations, population size, and crossover and mutation probabilities of the genetic algorithm, thereby effectively controlling the consumption of computing resources while ensuring search efficiency. Finally, due to the improvement in prediction accuracy, this method can significantly reduce the number of tests, thereby reducing R&D costs and design risks. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0034] Figure 1 A schematic diagram of a method flow chart of an embodiment of the present invention;

[0035] Figure 2 A schematic diagram of a process framework of an embodiment of the present invention;

[0036] Figure 3 A comparison chart of the lift prediction results and actual values ​​of 11 test sets in an embodiment of the present invention;

[0037] Figure 4 A comparison chart of the efficiency prediction results and actual values ​​of 11 test sets in an embodiment of the present invention;

[0038] Figure 5 Schematic diagram of the fitting situation of an embodiment of the present invention; wherein (a) represents the training set; (b) represents the test set; and (c) represents all samples. DETAILED DESCRIPTION

[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0040] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0041] Embodiment 1

[0042] like Figure 1 FIG. 1 is a schematic diagram of the method flow of this embodiment, and the steps include:

[0043] S1. Collect sample data of the centrifugal pump and perform preprocessing to obtain processed data.

[0044] The collected sample data is divided into 90% as a training set and 10% as a test set to ensure sufficient training data and sufficient test data for evaluating the generalization ability of the model. At the same time, in order to reduce the model training time and ensure the prediction accuracy, MATLAB sample data is also used for data standardization. Specifically, calling the "mapminmax" function in MATLAB to linearly map the data to a specified range helps to eliminate the dimensional influence between different features and improve the convergence speed of model training and the accuracy of prediction.

[0045] S2. Optimize the hyperparameters.

[0046] The number of hidden layer neurons and learning rate of the model to be constructed are used as key hyperparameters (hereinafter referred to as hyperparameters) for optimization. The specific steps include:

[0047] The number of neurons in the hidden layer is selected based on the number of neurons in the input layer and output layer of the model to be constructed and the complexity of the problem. Based on the empirical formula, the number of neurons in the hidden layer is optimized by adding functions, and the network performance with different numbers of neurons in the hidden layer is tested by cross-validation. The specific formula is as follows:

[0048]

[0049]

[0050] Among them, h min 、h max Represents the minimum and maximum number of neurons in the hidden layer; INT means rounding down; CEILING means rounding up; m means the number of neurons in the input layer; n means the number of neurons in the output layer; a is an integer from 1 to 10.

[0051] In addition, in each round of cross-validation iteration, a linear function is proposed to optimize the learning rate for dynamic adjustment to optimize model performance. Specifically, the adjustment of the learning rate follows the following linear relationship:

[0052]

[0053] Where lr() represents the learning rate and lr()∈[0.01,0.1].

[0054] S3. Build a prediction model based on the processed data and optimized hyperparameters.

[0055] Based on the training set and the optimized hyperparameters, the genetic algorithm is optimized and the neural network part is created. The constructed prediction model is a prediction model that combines the genetic algorithm and the back propagation (BP) neural network. Specifically, in order to enhance the generalization ability of the model, five independent optimization calculations are performed on the neural network part created in this embodiment. In view of the fact that the optimization of the number of hidden layer neurons will lead to changes in the length of the gene sequence in each round of optimization, this embodiment adopts the following parameter settings to optimize the computational efficiency: the overall number of iterations of the genetic algorithm is limited to 100 times, the population size is set to 50 individuals, the probability of the crossover operation is 0.8, and the probability of the mutation operation is 0.05. Such parameter configuration is intended to balance the breadth of the search while controlling the consumption of computing resources; ultimately, the optimal bias and weight parameters are determined by the roulette selection mechanism.

[0056] S4. Use the processed data to train the prediction model to obtain the final model.

[0057] The model is trained using the constructed training set, and the genetic algorithm and BP neural network are iteratively optimized until the preset convergence conditions are reached to obtain the final model. The final model after training is verified using the test set to evaluate the model's prediction performance and generalization ability. The error calculation is performed on the prediction performance value after each training. The error calculation formula is as follows:

[0058]

[0059] Among them, z is the number of test set samples, To predict performance, y i Actual performance.

[0060] In this embodiment, a performance prediction and verification step is also added. Based on the existing impeller model, the final model is used to perform performance prediction. The accuracy and reliability of the prediction results are verified by comparing with the actual performance data. Specifically, the five groups of data with the smallest error are selected, and the number of hidden layer neurons, learning rate, and predicted performance corresponding to these five groups of errors are selected from the structure. Then, the average of the five groups of predicted performance values ​​is taken as the final estimated value.

[0061] S5. Use the final model to complete the prediction of centrifugal pump performance.

[0062] Embodiment 2

[0063] The following will describe in detail how the present invention solves the technical problems in practical work in conjunction with this embodiment.

[0064] The collected sample data are standardized. According to the "Compilation of Centrifugal Pump Hydraulic Models" and the data provided by the Wenling Institute of Fluid Machinery of Jiangsu University, a total of 107 sets of impeller hydraulic model data with different specific speeds were collected as the entire sample. Among them, the input variables of the model include the number of blades, blade placement angle, blade outlet width, impeller outer diameter, specific speed and flow rate, and the output variables are the head and efficiency of the centrifugal pump. About 90% of the data were selected from the entire sample as a training set, and the rest were used as a test set. In MATLAB, the "round" function is used to divide the data set. At the same time, the "mapminmax" function is used to standardize the entire sample set to ensure that each attribute of all samples conforms to a normal distribution with a mean of 0 and a variance of 1. This helps to improve the training effect and generalization ability of the model. Table 1 is an example of some sample data.

[0065] Table 1

[0066]

[0067] After that, the hyperparameter optimization is performed. First, this embodiment determines the range of the number of hidden layer neurons according to the hidden layer neuron formula in the first embodiment. Within this range, different numbers of hidden layer neurons are obtained using MATLAB to participate in Figure 2 The genetic algorithm optimization and neural network creation part in . Secondly, set the linear equation function of the learning rate. Finally, create a structure to store the number of hidden layer neurons, learning rate, error, and prediction results.

[0068] After the optimization of the genetic algorithm and the creation of the neural network part, the prediction model was constructed. First, five independent rounds of optimization calculations were set, and the total number of iterations of the genetic algorithm was determined to be 100 times, the population size was 50 individuals, the crossover operation probability was 0.8, and the mutation operation probability was 0.05. Secondly, the fitness function was written, which included the definition of the neural network structure, the assignment of weight parameters, the setting of training parameters, the network training and the fitness calculation process. Then, the genetic algorithm was implemented, including selection, crossover, mutation, fitness calculation, and operations during the evolution process. In each generation of evolution, the best individual is updated, and if the newly generated individual is better than the current best individual, the current best individual is replaced. At the same time, the average fitness and the best fitness of each generation are recorded for subsequent analysis and visualization. When creating the neural network, the activation function of the hidden layer neurons uses the hyperbolic tangent function (tansig), and the activation function of the output layer uses the Levenberg-Marquardt backpropagation algorithm.

[0069] After the model is built, the training set is used to train the model. Through iterative optimization of genetic algorithms and BP neural networks, the network parameters are continuously adjusted until the preset convergence conditions are reached to ensure that the model can achieve a good fitting effect on the training set. After the training is completed, the model is verified using the test set to evaluate its prediction performance and generalization ability. By inputting the test set into the trained model, the prediction results of the model can be obtained and compared with the true labels of the test set. Figure 3 and Figure 4 The comparison between the predicted lift and efficiency and their actual values ​​is shown respectively. Through the verification process, it can be found whether the model is overfitting or underfitting, and whether it has good generalization ability. Figure 5 It can be seen intuitively that the fitting rates are all above 0.9.

[0070] Finally, the performance prediction and verification of the final model are carried out.

[0071] According to the Jiangsu University Fluid Machinery Wenling Research Institute, there are two impeller models with different specific speeds, numbered No. 1 and No. 2, and the performance is predicted. The five groups of prediction results with the smallest mean difference are selected and the average is taken as the predicted head and efficiency. Table 2 shows the parameters of the two centrifugal pumps, Table 3 shows the comparison between the predicted performance and the actual performance of the two centrifugal pumps, and Table 4 shows the five groups of prediction results with the smallest mean difference of No. 2.

[0072] Table 2

[0073]

[0074] Table 3

[0075]

[0076] Table 4

[0077]

[0078] Embodiment 3

[0079] This embodiment also provides a centrifugal pump performance prediction system based on hyperparameter optimization and genetic algorithm, including: an acquisition module, an optimization module, a construction module, a training module and a prediction module; the acquisition module is used to collect sample data of the centrifugal pump and preprocess it to obtain processed data; the optimization module is used to optimize the hyperparameters; the prediction module is used to construct a prediction model based on the processed data and the optimized hyperparameters; the training module is used to train the prediction model using the processed data to obtain the final model; the prediction module is used to complete the prediction of the performance of the centrifugal pump using the final model.

[0080] The workflow of the acquisition module includes: dividing the sample data into 90% as a training set and 10% as a test set; at the same time, MATLAB sample data is used for data standardization.

[0081] The optimized hyperparameters include: the number of hidden layer neurons and the learning rate of the model to be constructed. The process of optimizing the number of hidden layer neurons includes: based on the empirical formula, optimizing the number of hidden layer neurons by adding functions to obtain the best model complexity. The formula includes:

[0082]

[0083]

[0084] Among them, h min 、h max Represents the minimum and maximum number of neurons in the hidden layer; INT means rounding down; CEILING means rounding up; m means the number of neurons in the input layer; n means the number of neurons in the output layer; a is an integer from 1 to 10.

[0085] In addition, a linear function is proposed to dynamically adjust the learning rate to optimize the model performance. The adjustment of the learning rate follows the following linear relationship:

[0086]

[0087] Where lr() represents the learning rate and lr()∈[0.01,0.1].

[0088] The workflow of the building module includes: optimizing the genetic algorithm and creating the neural network part based on the training set and optimized hyperparameters. The constructed prediction model is a prediction model that combines the genetic algorithm and the back-propagation neural network.

[0089] The workflow of the training module includes: using the constructed training set to train the model, and iteratively optimizing the genetic algorithm and BP neural network until the preset convergence conditions are reached to obtain the final model. The final model after training is verified using the test set to evaluate the model's prediction performance and generalization ability. The error calculation is performed on the prediction performance value after each training. The error calculation formula is as follows:

[0090]

[0091] Among them, z is the number of test set samples, To predict performance, y i Actual performance.

[0092] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.

Claims

1. A centrifugal pump performance prediction method based on hyperparameter optimization and genetic algorithm, characterized in that the steps include: Collect sample data of the centrifugal pump and perform preprocessing to obtain processed data; Optimize hyperparameters; Building a prediction model based on the processed data and the optimized hyperparameters; Using the processed data to train the prediction model to obtain a final model; The final model is used to predict the performance of the centrifugal pump.

2. The centrifugal pump performance prediction method based on hyperparameter optimization and genetic algorithm according to claim 1 is characterized in that: The method for obtaining the processed data includes: dividing the sample data into 90% as a training set and 10% as a test set; and at the same time, performing data standardization processing on the sample data using MATLAB.

3. The centrifugal pump performance prediction method based on hyperparameter optimization and genetic algorithm according to claim 1 is characterized in that: The optimized hyperparameters include: the number of hidden layer neurons and the learning rate of the model to be constructed, wherein the method for optimizing the number of hidden layer neurons includes: based on an empirical formula, optimizing the number of hidden layer neurons by adding a function to obtain the best model complexity, the formula includes: Among them, h min 、h max Represents the minimum and maximum number of neurons in the hidden layer; INT means rounding down; CEILING means rounding up; m means the number of neurons in the input layer; n means the number of neurons in the output layer; a is an integer from 1 to 10.

4. The centrifugal pump performance prediction method based on hyperparameter optimization and genetic algorithm according to claim 3 is characterized in that: A linear function is proposed to dynamically adjust the learning rate to optimize the model performance. The adjustment of the learning rate follows the following linear relationship: Where lr() represents the learning rate and lr()∈[0.01,0.1].

5. The centrifugal pump performance prediction method based on hyperparameter optimization and genetic algorithm according to claim 2 is characterized in that: Based on the training set and the optimized hyperparameters, the genetic algorithm is optimized and the neural network part is created, and the constructed prediction model is a prediction model that combines the genetic algorithm and the back propagation neural network.

6. The centrifugal pump performance prediction method based on hyperparameter optimization and genetic algorithm according to claim 1, characterized in that: In the process of training the prediction model, the method of calculating the error includes: Among them, z is the number of test set samples, To predict performance, y i Actual performance.

7. A centrifugal pump performance prediction system based on hyperparameter optimization and genetic algorithm, the system being used to implement the method described in any one of claims 1 to 6, characterized in that: include: Acquisition module, optimization module, construction module, training module and prediction module; The acquisition module is used to collect sample data of the centrifugal pump and perform preprocessing to obtain processed data; The optimization module is used to optimize the hyperparameters; The prediction module is used to build a prediction model based on the processed data and the optimized hyperparameters; The training module is used to train the prediction model using the processed data to obtain a final model; The prediction module is used to complete the prediction of the centrifugal pump performance using the final model.

8. The centrifugal pump performance prediction system based on hyperparameter optimization and genetic algorithm according to claim 7, characterized in that: The workflow of the acquisition module includes: dividing the sample data into 90% as a training set and 10% as a test set; and at the same time, performing data standardization processing on the sample data using MATLAB.

Citation Information

Patent Citations

  • Intelligent parallel pump system and optimization adjusting method

    CN113236581A

  • Supercritical fluid heat transfer coefficient prediction method based on interpretable machine learning

    CN117150896A

  • KR20220159762A

Cited By

  • Microalgae growth prediction and optimization method and system based on machine learning

    CN119494085A

  • A method and system for predicting and optimizing microalgae growth based on machine learning

    CN119494085B