Ball valve internal leakage detection method and system based on stacking algorithm
By integrating learning models with multiple single machine learning models using the Stacking algorithm, the problem of low accuracy in detecting internal leakage in ball valves was solved, achieving higher detection accuracy and better generalization ability.
Patent Information
- Application Number
- CN202311774995.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-21
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2043-12-21
AI Technical Summary
Existing methods for detecting internal leakage in ball valves have low accuracy. Traditional single machine learning models have limitations, with weak predictive performance, poor generalization performance, and a tendency to get trapped in local optima.
A two-layer model based on the Stacking algorithm is adopted, combined with random forest model, support vector machine model, K-nearest neighbor algorithm model, gradient boosting algorithm model, decision tree model, extreme random tree model and linear regression algorithm model. Pressure signals are collected by valve cavity pressure detection method to determine the pressure change rate, pipeline pressure, pressure relief gradient and pressure before pressure increase, and to detect internal leakage of ball valve.
It improves the accuracy and generalization ability of ball valve internal leakage detection, enhances the robustness of the model, and can more accurately predict the leakage amount of ball valve internal leakage.
Smart Images

Figure CN117824948B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ball valve internal leakage detection technology, specifically to a ball valve internal leakage detection method and system based on the Stacking algorithm. Background Technology
[0002] Ball valves are indispensable control devices in fluid pipelines. They can connect or disconnect the flow of media, change the flow direction, regulate the pressure and flow rate, and protect the normal operation of pipelines and equipment. In recent years, ball valves have been widely used in petroleum, chemical, power plant, metallurgy, shipbuilding, and nuclear energy industries. Good sealing performance is crucial for ball valves to ensure the safe transport of fluids. However, during long-term use, wear, corrosion, and scratches on the sealing device can lead to poor sealing of the ball valve, causing the transported fluid to leak from inside the valve. This can result in serious environmental pollution, economic losses, and even major safety accidents. Therefore, timely detection of internal leakage in ball valves and accurate estimation of the leakage rate are key to on-site personnel's maintenance decisions and are of great significance to ensuring the safe transport of fluids.
[0003] With the development of artificial intelligence, various machine learning methods have been applied to the qualitative and quantitative analysis of ball valve internal leakage. Examples include support vector machines, neural networks, and extreme learning machines. However, it is difficult to fully train machine learning models with limited feature parameters. Traditional single machine learning models have limitations: weak predictive performance, poor generalization performance, and a tendency to get trapped in local optima due to hyperparameter settings, thus reducing the accuracy of ball valve internal leakage detection. Summary of the Invention
[0004] The technical problem to be solved by the present invention is the low accuracy of existing related technologies in detecting internal leakage of ball valves.
[0005] To address the aforementioned technical problems, this invention provides a method and system for detecting internal leakage in ball valves based on the Stacking algorithm. Specifically, the technical solution is as follows:
[0006] Firstly, this invention provides a ball valve internal leakage detection method based on the Stacking algorithm. The method includes: First, acquiring the valve cavity pressure signal of the ball valve using a valve cavity pressure detection method. Then, based on the valve cavity pressure signal, determining the pressure change rate, pipeline pressure, pressure relief gradient, and pressure before pressure increase, wherein the pressure change rate characterizes the changes in the ball valve during pressure relief and pressure increase, the pipeline pressure characterizes the pipeline pressure after the ball valve is closed and the valve cavity pressure stabilizes (the pipeline is connected to the ball valve), the pressure relief gradient characterizes the pressure difference during pressure relief, and the pressure before pressure increase characterizes the valve cavity pressure before pressure increase. Finally, inputting the pressure change rate, pipeline pressure, pressure relief gradient, and pressure before pressure increase into a ball valve internal leakage detection model, and outputting the ball valve internal leakage amount; the ball valve internal leakage detection model is obtained based on ensemble learning training using the Stacking algorithm, and includes a basic model and a meta-model.
[0007] This method first acquires the valve cavity pressure signal of the ball valve using a valve cavity pressure detection method. Then, based on the valve cavity pressure signal, the pressure change rate, pipeline pressure, pressure relief gradient, and pre-pressurization pressure are determined. Finally, the pressure change rate, pipeline pressure, pressure relief gradient, and pre-pressurization pressure are input into the ball valve internal leakage detection model, and the ball valve internal leakage amount is output. The ball valve internal leakage detection model is trained based on the Stacking algorithm ensemble learning model and consists of a two-layer model. Thus, the method provided in this embodiment predicts the ball valve internal leakage amount by using the Stacking algorithm ensemble learning model, combining the advantages of multiple single machine learning models to obtain a ball valve internal leakage detection model with higher accuracy, better generalization ability, and stronger robustness, thereby improving the accuracy of ball valve internal leakage detection.
[0008] In conjunction with the first aspect, in one alternative implementation, the aforementioned base model includes one or more of the following: random forest model, support vector machine model, K-nearest neighbor algorithm model, gradient boosting algorithm model, decision tree model, and extreme random tree model. The meta-model is a linear regression algorithm model. In this implementation, the ball valve internal leakage detection model comprises two layers: a base model and a meta-model. The base model can include multiple machine learning models. This improves the accuracy of the ball valve internal leakage detection model in predicting the leakage amount of the ball valve.
[0009] In conjunction with the first aspect, in one alternative implementation, the above-mentioned method of acquiring the valve cavity pressure signal of the ball valve using the valve cavity pressure detection method includes: First, closing the ball valve and, after the valve cavity pressure stabilizes, determining the pipeline pressure value as the pipeline pressure. Then, opening the ball valve's drain valve to connect the ball valve to the atmosphere, and closing the drain valve when the valve cavity pressure reaches a preset first pressure. Next, increasing the ball valve pressure, and when the valve cavity pressure reaches a preset second pressure, determining the time it takes for the ball valve cavity pressure to rise from the first pressure to the second pressure as a first time, wherein the second pressure is greater than the first pressure and less than the pipeline pressure. Finally, when the ball valve cavity pressure reaches the pipeline pressure, determining the time it takes for the ball valve cavity pressure to rise from the second pressure to the pipeline pressure as a second time. In this way, the valve cavity pressure detection method can more accurately acquire the ball valve cavity pressure signal.
[0010] In conjunction with the first aspect, in one alternative implementation, the aforementioned valve chamber pressure signal includes: pipeline pressure, a first pressure, a second pressure, a first time, and a second time. Then, based on the valve chamber pressure signal, determining the pressure change rate, pipeline pressure, pressure relief gradient, and pressure before pressure increase includes: determining the pressure change rate based on the pipeline pressure, the first pressure, the second pressure, the first time, and the second time; determining the pressure relief gradient based on the pipeline pressure and the first pressure; and determining the pressure before pressure increase based on the first pressure.
[0011] In conjunction with the first aspect, in one alternative implementation, determining the pressure change rate, pipeline pressure, pressure relief gradient, and pre-pressure boosting pressure based on the valve cavity pressure signal further includes: first, performing noise reduction processing on the valve cavity pressure signal to obtain a noise-reduced valve cavity pressure signal; then, determining a feature set based on the noise-reduced valve cavity pressure signal, the feature set including: pressure change rate, pipeline pressure, pressure relief gradient, and pre-pressure boosting pressure; finally, normalizing the feature set to obtain a sample set.
[0012] In conjunction with the first aspect, in one alternative implementation, the pressure change rate, pipeline pressure, pressure relief gradient, and pre-pressurization pressure are input into the ball valve internal leakage detection model, and the ball valve internal leakage amount is output. This includes: First, dividing the sample set into a training set and a test set. Then, training the ball valve internal leakage detection model based on the training set to obtain a trained ball valve internal leakage detection model. Finally, inputting the test set into the trained ball valve internal leakage detection model, and outputting the ball valve internal leakage amount.
[0013] In conjunction with the first aspect, one alternative implementation involves training the ball valve internal leakage detection model using a training set to obtain a trained model. This includes training the model using K-fold cross-validation based on the training set. In this implementation, combining K-fold cross-validation with the Stacking algorithm allows the ball valve internal leakage detection model to adapt more flexibly to small sample data, resulting in stronger stability.
[0014] In conjunction with the first aspect, in one alternative implementation, the ball valve internal leakage detection model is trained using a training set to obtain a trained model. This includes optimizing the parameters of the base model and the meta-model using a Bayesian optimized grid search algorithm. In this implementation, Bayesian optimized grid search is used to optimize the parameters to find the optimal model parameter configuration, adjusting the parameters of the base model and the meta-model to their best, thereby improving the model's performance and predictive capabilities, and further enhancing the accuracy of ball valve internal leakage detection.
[0015] Secondly, this invention provides a ball valve internal leakage detection system based on the Stacking algorithm. The system includes a data acquisition module and a data analysis module. The data acquisition module is used to acquire the valve cavity pressure signal of the ball valve using a valve cavity pressure detection method. The data analysis module is used to determine the pressure change rate, pipeline pressure, pressure relief gradient, and pre-pressure increase pressure based on the valve cavity pressure signal. The pressure change rate characterizes the changes in the ball valve during pressure relief and pressure increase; the pipeline pressure characterizes the pipeline pressure after the ball valve is closed and the valve cavity pressure stabilizes (the pipeline is connected to the ball valve); the pressure relief gradient characterizes the pressure difference during pressure relief; and the pre-pressure increase pressure characterizes the valve cavity pressure before pressure increase. The data analysis module also inputs the pressure change rate, pipeline pressure, pressure relief gradient, and pre-pressure increase pressure into the ball valve internal leakage detection model and outputs the ball valve internal leakage amount. The ball valve internal leakage detection model is obtained based on ensemble learning training using the Stacking algorithm and includes a basic model and a meta-model.
[0016] In conjunction with the second aspect, in one alternative implementation, the system also includes a database. The database stores valve chamber pressure signals and ball valve internal leakage.
[0017] Understandably, the beneficial effects of the ball valve internal leakage detection system based on the Stacking algorithm in the second aspect described above can be referenced from the beneficial effects in the first aspect and any of its possible implementations, and will not be repeated here. Attached Figure Description
[0018] Figure 1A flowchart illustrating the ball valve internal leakage detection method based on the Stacking algorithm provided in this embodiment of the invention;
[0019] Figure 2 A schematic diagram of valve chamber pressure signals before and after noise reduction provided in an embodiment of the present invention;
[0020] Figure 3 A schematic diagram illustrating the principle of the ball valve internal leakage detection method based on the Stacking algorithm provided in this embodiment of the invention;
[0021] Figure 4 A percentage error result chart of the internal leakage of the ball valve provided in the embodiments of the present invention;
[0022] Figure 5 A comparison chart of the predicted internal leakage of a ball valve and the actual internal leakage of a ball valve provided for embodiments of the present invention;
[0023] Figure 6 This is a schematic diagram of the structure of a ball valve internal leakage detection system based on the Stacking algorithm provided in an embodiment of the present invention. Detailed Implementation
[0024] The embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described below do not represent all embodiments consistent with this application. They are merely examples of systems and methods consistent with some aspects of this application as detailed in the claims.
[0025] Ball valves are indispensable control devices in fluid pipelines. They can connect or disconnect the flow of media, change the flow direction, regulate the pressure and flow rate, and protect the normal operation of pipelines and equipment. In recent years, ball valves have been widely used in petroleum, chemical, power plant, metallurgy, shipbuilding, and nuclear energy industries. Good sealing performance is crucial for ball valves to ensure the safe transport of fluids. However, during long-term use, wear, corrosion, and scratches on the sealing device can lead to poor sealing of the ball valve, causing the transported fluid to leak from inside the valve. This can result in serious environmental pollution, economic losses, and even major safety accidents. Therefore, timely detection of internal leakage in ball valves and accurate estimation of the leakage rate are key to on-site personnel's maintenance decisions and are of great significance to ensuring the safe transport of fluids.
[0026] With the development of artificial intelligence, various machine learning methods have been applied to the qualitative and quantitative analysis of ball valve internal leakage. Examples include support vector machines, neural networks, and extreme learning machines. However, it is difficult to fully train machine learning models with limited feature parameters. Traditional single machine learning models have limitations: weak predictive performance, poor generalization performance, and a tendency to get trapped in local optima due to hyperparameter settings, thus reducing the accuracy of ball valve internal leakage detection.
[0027] To address the aforementioned problems, this invention provides a method and system for detecting internal leakage in ball valves based on the Stacking algorithm. The method involves: first, acquiring the valve cavity pressure signal of the ball valve using a valve cavity pressure detection method; then, determining the pressure change rate, pipeline pressure, pressure relief gradient, and pre-pressure increase pressure based on the valve cavity pressure signal; and finally, inputting the pressure change rate, pipeline pressure, pressure relief gradient, and pre-pressure increase pressure into the ball valve internal leakage detection model, and outputting the ball valve internal leakage amount. The ball valve internal leakage detection model is trained using an ensemble learning model based on the Stacking algorithm and consists of a two-layer model. Thus, the method provided by this invention predicts the ball valve internal leakage amount through an ensemble learning model using the Stacking algorithm, combining the advantages of multiple single machine learning models to obtain a ball valve internal leakage detection model with higher accuracy, better generalization ability, and stronger robustness, thereby improving the accuracy of ball valve internal leakage detection.
[0028] The solutions provided in the embodiments of this application will be described below with reference to the accompanying drawings.
[0029] For details, see Figure 1 This is a flowchart illustrating the ball valve internal leakage detection method based on the Stacking algorithm provided in an embodiment of the present invention. Figure 1 As shown, the ball valve internal leakage detection method based on the Stacking algorithm provided in this embodiment of the invention includes the following steps S101-S103:
[0030] S101. The valve cavity pressure signal of the ball valve is acquired by the valve cavity pressure detection method.
[0031] First, the valve chamber pressure signal of the ball valve is collected to determine the pressure change of the ball valve, thereby detecting whether the ball valve has internal leakage and the amount of internal leakage.
[0032] In some embodiments, the valve cavity pressure signal of the ball valve is acquired by the valve cavity pressure detection method, including the following steps S1011-S1014:
[0033] S1011. Close the ball valve. After the pressure in the ball valve cavity stabilizes, determine the pipeline pressure value as pipeline pressure P. 管 .
[0034] S1012. Open the drain valve of the ball valve to connect the ball valve to the atmosphere. When the pressure in the valve chamber of the ball valve reaches the preset first pressure P1, close the drain valve.
[0035] The first pressure P1 is the pressure before the ball valve is pressurized. The first pressure P1 can be preset according to the actual testing application requirements, and this application does not specify the specific value of the first pressure P1.
[0036] S1013. Increase the pressure of the ball valve. When the pressure in the valve cavity of the ball valve reaches the preset second pressure P2, determine the time when the pressure in the valve cavity of the ball valve rises from the first pressure P1 to the second pressure P2 as the first time T1.
[0037] The second pressure, P2, is the critical pressure. When the pressure in the ball valve cavity is less than the second pressure, P2, the gas velocity inside the ball valve increases at the speed of sound, meaning the pressure increases at the speed of sound. When the pressure in the ball valve cavity is greater than the second pressure, P2, the gas velocity inside the ball valve increases at a subsonic speed, meaning the pressure increases at a subsonic speed.
[0038] Specifically, the second pressure P2 is greater than the first pressure P1, but less than the pipeline pressure P. 管 The second pressure P2 can be preset according to the actual testing application requirements. This application does not specify the specific value of the second pressure P2.
[0039] S1014, When the pressure in the ball valve cavity reaches the pipeline pressure P 管 Under these conditions, and after stabilization, determine that the valve chamber pressure of the ball valve rises from the second pressure P2 to the pipeline pressure P. 管 The time is the second time T2.
[0040] S102. Based on the valve chamber pressure signal, determine the pressure change rate, pipeline pressure, pressure relief gradient, and pressure before pressurization.
[0041] Furthermore, by processing the valve cavity pressure signal, characteristic parameters for predicting the leakage of the ball valve can be determined: pressure change rate, pipeline pressure, pressure relief gradient, and pressure before pressurization.
[0042] Among them, the pressure change rate is used to characterize the changes in the ball valve during the depressurization and pressurization process, the pipeline pressure is used to characterize the pipeline pressure after the ball valve is closed and the valve cavity pressure of the ball valve stabilizes, the pipeline is connected to the ball valve, the depressurization gradient is used to characterize the depressurization pressure difference of the ball valve, and the pressure before pressurization is used to characterize the valve cavity pressure of the ball valve before pressurization.
[0043] S103. Input the pressure change rate, pipeline pressure, pressure relief gradient, and pressure before pressure increase into the ball valve internal leakage detection model, and output the ball valve internal leakage amount.
[0044] The ball valve internal leakage detection model is trained based on the Stacking algorithm ensemble learning and includes a basic model and a meta-model.
[0045] In some embodiments, the base model includes one or more of the following: random forest model, support vector machine model, K-nearest neighbor algorithm model, gradient boosting algorithm model, decision tree model, and extreme random tree model. The meta-model is a linear regression algorithm model.
[0046] The ball valve internal leakage detection method based on the Stacking algorithm provided in the above embodiments of this application predicts the internal leakage amount of the ball valve by integrating the Stacking algorithm learning model. It combines the advantages of multiple single machine learning models and obtains a ball valve internal leakage detection model with higher accuracy, better generalization ability and stronger robustness, thereby improving the accuracy of ball valve internal leakage detection.
[0047] In some embodiments, the valve chamber pressure signal acquired in S101 above includes: pipeline pressure P 管 The first pressure P1, the second pressure P2, the first time T1, and the second time T2 are given. Then, S102 determines the pressure change rate, pipeline pressure, pressure relief gradient, and pressure before pressurization based on the valve chamber pressure signal, including: based on the pipeline pressure P... 管 The pressure change rate is determined by the first pressure P1, the second pressure P2, the first time T1, and the second time T2. Based on the pipeline pressure P... 管 The pressure relief gradient is determined by the first pressure P1, i.e., the pressure relief gradient is equal to the pipeline pressure P. 管 The difference between the pressure and the first pressure P1. The pressure before pressurization is determined based on the first pressure P1, that is, the pressure before pressurization is equal to the first pressure P1.
[0048] In some embodiments, Figure 2 This is a schematic diagram illustrating the principle of the ball valve internal leakage detection method based on the Stacking algorithm provided in an embodiment of the present invention, as shown below. Figure 2 As shown, S102 above determines the pressure change rate, pipeline pressure, pressure relief gradient, and pressure before pressurization based on the valve chamber pressure signal, and specifically also includes:
[0049] First, the valve cavity pressure signal is denoised to obtain a denoised valve cavity pressure signal. In one implementation, a wavelet packet denoising algorithm can be used to denoise the acquired valve cavity pressure signal. Figure 3 This is a schematic diagram of the valve chamber pressure signals before and after noise reduction provided in an embodiment of the present invention, as shown below. Figure 3 As shown, the valve cavity pressure signal after wavelet packet denoising is more concentrated and has fewer noise points.
[0050] Then, feature extraction is performed based on the noise-reduced valve cavity pressure signal to determine the feature set, which includes: pressure change rate, pipeline pressure, pressure relief gradient, and pressure before pressure increase.
[0051] Finally, the feature set is normalized to obtain the sample set. In this embodiment, the feature set can be normalized by performing maximum and minimum value normalization to obtain the sample set.
[0052] In some embodiments, such as Figure 3 As shown, S103 above inputs the pressure change rate, pipeline pressure, pressure relief gradient, and pressure before pressurization into the ball valve internal leakage detection model, and outputs the ball valve internal leakage amount, specifically including:
[0053] First, the sample set obtained after processing the valve chamber pressure signal is divided into a training set and a test set. The training set is used to train the ball valve internal leakage detection model, and the test set is used to predict the leakage amount of the ball valve internal leakage using the trained ball valve internal leakage detection model.
[0054] Then, the ball valve internal leakage detection model is trained based on the training set to obtain the trained ball valve internal leakage detection model.
[0055] Finally, the test set is input into the trained ball valve internal leakage detection model to predict the leakage amount of the ball valve internal leakage and output the leakage amount of the ball valve internal leakage.
[0056] In some embodiments, training the ball valve internal leakage detection model based on the training set to obtain a trained ball valve internal leakage detection model includes: training the ball valve internal leakage detection model using K-fold cross-validation based on the training set. Thus, combining K-fold cross-validation and the Stacking algorithm allows the ball valve internal leakage detection model to adapt more flexibly to small sample data, resulting in stronger stability.
[0057] Specifically, the K-fold cross-validation method is used. First, the training set can be divided into K parts, where K can be the same as the number of base models in the ball valve internal leakage detection model. Then, K-1 parts of the training set are selected to train the base models, resulting in trained base models. Next, the remaining training set is combined with the test set and input into the trained base model to obtain the prediction results for the test set. This process is repeated K times, and the prediction results of the test set are concatenated and combined according to the training order. Since the K-fold cross-validation method results in the test set being predicted K times, the arithmetic mean of the prediction results of the test set needs to be calculated to obtain a new test set, which has the same matrix dimension as the new training set, thus preserving as much prediction information as possible.
[0058] Furthermore, the remaining training set from each basic model training process is concatenated and combined to obtain a new training set comprising K training sets. Then, this new training set is used to train the meta-model, resulting in a trained meta-model. Finally, the new test set is input into the trained meta-model, and the prediction result of the new test set, i.e., the predicted internal leakage of the ball valve, is output.
[0059] In some embodiments, training the ball valve internal leakage detection model based on the training set to obtain a trained ball valve internal leakage detection model includes: optimizing the parameters of the base model and the meta-model using a Bayesian optimized grid search algorithm. This parameter optimization using Bayesian optimized grid search finds the optimal model parameter configuration, adjusting the parameters of the base model and the meta-model to their best, thereby improving the model's performance and predictive capabilities, and further enhancing the accuracy of ball valve internal leakage detection.
[0060] In some embodiments, the predicted internal leakage of the ball valve is obtained by using the method described in S101-S103 of the above embodiments, and then the predicted internal leakage of the ball valve is compared and analyzed with the actual internal leakage of the ball valve. Figure 4 A percentage error result chart of the internal leakage of the ball valve provided in the embodiment of the present invention is shown, as follows: Figure 4 As shown, the percentage error of the internal leakage of the ball valve is mostly within 0.2%. Figure 5 A comparison chart showing the predicted internal leakage of a ball valve and the actual internal leakage of a ball valve, provided for embodiments of the present invention. Figure 5 As shown, the difference between the predicted internal leakage of the ball valve and the actual internal leakage is small, and the two values are close. Therefore, the ball valve internal leakage detection model provided in this application embodiment has strong predictive ability, and the accuracy of ball valve internal leakage detection can be improved through this model.
[0061] In some embodiments, the present invention also provides a ball valve internal leakage detection system based on the Stacking algorithm. Figure 6 This is a schematic diagram of the structure of the ball valve internal leakage detection system based on the Stacking algorithm provided in an embodiment of the present invention, as shown below. Figure 6 As shown, the ball valve internal leakage detection system 600 based on the Stacking algorithm includes: a data acquisition module 601 and a data analysis module 602.
[0062] The data acquisition module 601 is used to acquire the valve cavity pressure signal of the ball valve through the valve cavity pressure detection method.
[0063] The data analysis module 602 is used to determine the pressure change rate, pipeline pressure, pressure relief gradient, and pressure before pressure increase based on the valve cavity pressure signal. The pressure change rate is used to characterize the changes in the ball valve during the pressure relief and pressure increase process. The pipeline pressure is used to characterize the pipeline pressure after the ball valve is closed and the valve cavity pressure of the ball valve stabilizes. The pipeline is connected to the ball valve. The pressure relief gradient is used to characterize the pressure difference of the ball valve during pressure relief. The pressure before pressure increase is used to characterize the valve cavity pressure of the ball valve before pressure increase.
[0064] The data analysis module 602 is also used to input the pressure change rate, pipeline pressure, pressure relief gradient and pressure before pressure increase into the ball valve internal leakage detection model and output the ball valve internal leakage amount. The ball valve internal leakage detection model is obtained by ensemble learning training based on the Stacking algorithm and includes a basic model and a meta-model.
[0065] In some embodiments, such as Figure 6 As shown, the ball valve internal leakage detection system 600 based on the Stacking algorithm also includes a database 603. Specifically, the database 603 is used to store the valve chamber pressure signal and the amount of internal leakage in the ball valve.
[0066] In some embodiments, the data acquisition module 601 described above may specifically include a pressure sensor and a data acquisition card. The pressure sensor converts the acquired valve chamber pressure signal into a voltage signal, and the data acquisition card converts the voltage signal into a digital signal for subsequent data processing.
[0067] The aforementioned data analysis module 602 can specifically be a host computer, which can control the acquisition process of the valve cavity pressure signal and call the ball valve internal leakage detection model to process the valve cavity pressure signal, thereby determining the ball valve internal leakage amount.
[0068] The aforementioned database 603 can be embedded in the host computer to store valve chamber pressure signals and ball valve internal leakage.
[0069] The ball valve internal leakage detection system based on the Stacking algorithm provided in the above embodiments of this application predicts the internal leakage amount of the ball valve by integrating the learning model of the Stacking algorithm. It combines the advantages of multiple single machine learning models and obtains a ball valve internal leakage detection model with higher accuracy, better generalization ability and stronger robustness, thereby improving the accuracy of ball valve internal leakage detection.
[0070] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0071] In the description of this invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0072] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components, unless otherwise explicitly limited. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0073] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0074] Similar parts between the embodiments provided in this application can be referred to mutually. The specific implementation methods provided above are only a few examples under the overall concept of this application and do not constitute a limitation on the scope of protection of this application. For those skilled in the art, any other implementation methods extended from the solution of this application without creative effort shall fall within the scope of protection of this application.
Claims
1. A method for detecting internal leakage of a ball valve based on a stacking algorithm, characterized in that, The method includes: The valve cavity pressure signal of the ball valve is acquired by the valve cavity pressure detection method; Based on the valve chamber pressure signal, the pressure change rate, pipeline pressure, pressure relief gradient, and pressure before pressure increase are determined. The pressure change rate is used to characterize the changes in the ball valve during pressure relief and pressure increase. The pipeline pressure is used to characterize the pipeline pressure after the ball valve is closed and the valve chamber pressure of the ball valve stabilizes. The pipeline is connected to the ball valve. The pressure relief gradient is used to characterize the pressure difference of the ball valve during pressure relief. The pressure before pressure increase is used to characterize the valve chamber pressure of the ball valve before pressure increase. The pressure change rate, the pipeline pressure, the pressure relief gradient, and the pressure before pressurization are input into the ball valve internal leakage detection model, and the ball valve internal leakage amount is output. The ball valve internal leakage detection model is obtained based on Stacking algorithm ensemble learning training, and the ball valve internal leakage detection model includes: a basic model and a meta-model. The method of acquiring the valve cavity pressure signal of the ball valve through valve cavity pressure detection includes: After closing the ball valve and waiting for the pressure in the valve chamber of the ball valve to stabilize, the pressure value of the pipeline is determined to be the pipeline pressure. Open the drain valve of the ball valve to connect the ball valve to the atmosphere, and close the drain valve when the valve chamber pressure of the ball valve reaches a preset first pressure; The pressure of the ball valve is increased. When the pressure in the valve cavity of the ball valve reaches a preset second pressure, the time it takes for the pressure in the valve cavity of the ball valve to rise from the first pressure to the second pressure is determined as the first time. The second pressure is greater than the first pressure and less than the pipeline pressure. The second pressure P2 is the critical pressure. When the pressure in the valve cavity of the ball valve is less than the second pressure P2, the gas velocity in the ball valve is at the speed of sound, that is, the pressure increases at the speed of sound. When the pressure in the valve cavity of the ball valve is greater than the second pressure P2, the gas velocity in the ball valve is at the speed of subsonic speed, that is, the pressure increases at the speed of subsonic speed. When the valve chamber pressure of the ball valve reaches the pipeline pressure, the time it takes for the valve chamber pressure of the ball valve to rise from the second pressure to the pipeline pressure is defined as the second time. The valve chamber pressure signal includes: the pipeline pressure, the first pressure, the second pressure, the first time, and the second time; The step of determining the pressure change rate, pipeline pressure, pressure relief gradient, and pre-pressurization pressure based on the valve chamber pressure signal includes: The pressure change rate is determined based on the pipeline pressure, the first pressure, the second pressure, the first time, and the second time. The pressure relief gradient is determined based on the pipeline pressure and the first pressure. The pressure before pressurization is determined based on the first pressure.
2. The method of claim 1, wherein, The basic models include one or more of the following: random forest model, support vector machine model, K-nearest neighbor algorithm model, gradient boosting algorithm model, decision tree model, and extreme random tree model; The meta-model is a linear regression algorithm model.
3. The method of claim 1, wherein, The step of determining the pressure change rate, pipeline pressure, pressure relief gradient, and pre-pressurization pressure based on the valve chamber pressure signal further includes: The valve chamber pressure signal is subjected to noise reduction processing to obtain a noise-reduced valve chamber pressure signal; Based on the noise-reduced valve cavity pressure signal, a feature set is determined, which includes: the pressure change rate, the pipeline pressure, the pressure relief gradient, and the pressure before pressure increase. The feature set is normalized to obtain the sample set.
4. The method of claim 3, wherein, The pressure change rate, the pipeline pressure, the pressure relief gradient, and the pressure before pressurization are input into the ball valve internal leakage detection model, and the ball valve internal leakage amount is output, including: The sample set is divided into a training set and a test set; The ball valve internal leakage detection model is trained based on the training set to obtain a trained ball valve internal leakage detection model; The test set is input into the trained ball valve internal leakage detection model, and the leakage amount of the ball valve internal leakage is output.
5. The method according to claim 4, characterized in that, The step of training the ball valve internal leakage detection model based on the training set to obtain a trained ball valve internal leakage detection model includes: The ball valve internal leakage detection model is trained using the K-fold cross-validation method based on the training set.
6. The method according to claim 4 or 5, characterized in that, The step of training the ball valve internal leakage detection model based on the training set to obtain a trained ball valve internal leakage detection model includes: The parameters of the basic model and the meta-model are optimized using a Bayesian optimized grid search algorithm.
7. A ball valve internal leakage detection system based on the Stacking algorithm, characterized in that, The system, applied to the method of any one of claims 1-6, comprises: a data acquisition module and a data analysis module; wherein, The data acquisition module is used to acquire the valve cavity pressure signal of the ball valve by means of the valve cavity pressure detection method; The data analysis module is used to determine the pressure change rate, pipeline pressure, pressure relief gradient, and pressure before pressure increase based on the valve cavity pressure signal. The pressure change rate is used to characterize the changes in the ball valve during pressure relief and pressure increase. The pipeline pressure is used to characterize the pipeline pressure after the ball valve is closed and the valve cavity pressure of the ball valve stabilizes. The pipeline is connected to the ball valve. The pressure relief gradient is used to characterize the pressure difference of the ball valve during pressure relief. The pressure before pressure increase is used to characterize the valve cavity pressure of the ball valve before pressure increase. The data analysis module is also used to input the pressure change rate, the pipeline pressure, the pressure relief gradient, and the pressure before pressure increase into the ball valve internal leakage detection model, and output the ball valve internal leakage amount; the ball valve internal leakage detection model is obtained based on the Stacking algorithm ensemble learning training, and the ball valve internal leakage detection model includes: a basic model and a meta-model.
8. The system according to claim 7, characterized in that, The system also includes: a database; The database is used to store the valve chamber pressure signal and the leakage amount inside the ball valve.
Citation Information
Patent Citations
Thermodynamic system valve inner leakage monitoring method
CN106706215A
Method and system for detecting internal leakage of buried earth valve based on valve cavity pressure
CN114264435A
