A method and system for detecting the type of leaked material in a circulating water system
By preparing simulated leak water samples in the circulating water system of petrochemical enterprises and establishing regression equations, the problem of quickly and accurately determining the type of leaked material was solved, achieving efficient leak detection and quantitative analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA PETROLEUM & CHEMICAL CORP
- Filing Date
- 2024-11-26
- Publication Date
- 2026-05-26
AI Technical Summary
Existing technologies are insufficient for quickly and accurately detecting and identifying the types of leaking materials and leak points in petrochemical enterprise circulating water systems, leading to untimely handling of leaks and impacting system stability and economic benefits.
By preparing leaked water samples of circulating water under simulated different operating conditions, mass spectrometry response data is obtained, a least squares regression equation is established, and combined with a preset category matrix, the type of leaked material is quickly determined.
It enables rapid and accurate identification of the type of leaking material in circulating water systems, reducing the workload of leak detection, shortening the leak detection time, and improving the accuracy and reliability of the identification results.
Smart Images

Figure CN122084774A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of petrochemical engineering leakage material detection technology, and in particular relates to a method and system for detecting leakage material types in circulating water systems. Background Technology
[0002] Material leakage from circulating water coolers is a common problem in petrochemical enterprises. Leaks exacerbate cooler corrosion, shorten their lifespan, affect the quality of the circulating water system, reduce heat exchange efficiency, and increase energy consumption. If not handled promptly, leaks can lead to losses of materials, products, equipment, water, and other resources, and in severe cases, cause unplanned production shutdowns, impacting the company's stable operation and economic benefits. Current technology can only detect large, obvious leaks, making it difficult to quickly and accurately assess minor leaks in the circulating water system. Furthermore, it is challenging to quickly determine the type of leaking material and the leak location for both obvious and minor leaks. Therefore, rapidly identifying the leaking material and taking timely and effective countermeasures to minimize the impact of material leakage on the circulating water system is crucial.
[0003] Currently, petrochemical enterprises often use traditional manual leak detection methods to check for material leaks in circulating water, such as observing the color of the circulating water, looking for oil stains, and smelling the odor. Alternatively, they rely on conventional water quality indicators such as pH, residual chlorine, and changes in chemical dosage. These methods often only detect obvious leaks and suffer from low sensitivity, poor reliability, and delayed response. For example, one rapid leak detection method for heat exchangers in oil refinery circulating water systems involves analyzing the analytical results of the circulating water spectrum and comparing it with the characteristic spectra of the heat exchangers. By examining the spectral characteristics, the leaking heat exchanger can be located or some heat exchangers can be eliminated. This method requires visual judgment from analysts, demands a certain level of experience, and the results are highly uncertain and easily influenced by human factors.
[0004] In addition, existing technologies also disclose online monitoring methods and instruments for leaks in water coolers used in light petrochemical products. This method involves drawing circulating water from the water cooler online, filtering it, and then introducing it into the gasification chamber. Combustible gas components in the sample are then transported to the detection chamber after gas extraction to determine their concentration. However, this method also requires monitoring the flow rates of circulating water and compressed air, making it complex to operate, time-consuming to analyze, and unable to pinpoint the leak location.
[0005] The method for tracing the source of leaked oil in water involves chromatographic analysis of the oil phase in a water sample to obtain a chromatogram. The similarity (S) between this chromatogram and the characteristic chromatogram of at least one potentially leaked oil substance is then determined. Based on the similarity (S), the type of leaked oil in the water sample is identified, and finally, the source of the leak is determined based on the identified oil type. This method uses similarity, identifying the oil type corresponding to a pre-defined characteristic chromatogram with a similarity (S) greater than 0.99 as the leaked oil type. However, due to factors such as water sample dilution, impurities, measurement time, and production processes, the similarity (S) is difficult to reach 0.99, making accurate identification of the leaked material challenging.
[0006] A leak detection device for petrochemical water coolers relies on the principle of macroscopic color change after the absorption of hydrocarbon phases by an absorption colorimetric material to detect leaks. However, this device can only determine whether the water cooler is leaking, but cannot identify the type of leaked material. A similar device for detecting and rapidly quantifying leaks in hydrocarbon water coolers determines whether a leak is occurring by absorbing the color change of a colorimetric material package, and combines this with a mass flow controller and mass sensor to measure the mass difference and quantify the amount of water cooler leakage. However, this device can only determine whether the water cooler is leaking, but cannot identify the type of leaked material.
[0007] Petrochemical plants have a wide distribution of circulating water systems. In the event of a leak, the entire system's heat exchange equipment needs to be analyzed and tested to locate the leak, resulting in a very large workload. Therefore, employing simple and accurate methods to detect circulating water leaks and quickly identify the leaking material can effectively solve the problem and prevent economic losses in petrochemical plants. Summary of the Invention
[0008] To address the aforementioned problems, this invention provides a method for detecting leaked material types in a circulating water system. The method includes: preparing multiple leak water samples simulating leaks under different operating conditions using materials potentially leaking during the operation of the circulating water system, and circulating water in a water cooler when no leak occurs; acquiring mass spectrometry response data for each leak water sample to determine sample data matching each leak water sample; using a preset category matrix representing possible material types in the leak water samples, and combining the sample data, establishing a regression equation between the material types in the leak water samples and the sample data based on least squares regression; acquiring test sample data matching the leak water sample to be tested, and further combining the regression equation to obtain the leaked material type detection result.
[0009] Preferably, the step of preparing multiple leakage water samples simulating leakage under different operating conditions includes: collecting production materials contained in the system during different operating stages for the operation of the circulating water system under different process conditions, thereby identifying multiple materials with leakage potential; and using a material spiking method, mixing a single type of material with leakage potential in each operating stage with the circulating water in the water cooler when no leakage occurs, thereby preparing the multiple leakage water samples.
[0010] Preferably, the step of obtaining mass spectrometry response data for each leaked water sample includes: performing component analysis on each leaked water sample using a combination of multiple analytical methods to form a total ion flow map representing the ion distribution characteristics in the leaked water sample, and then obtaining the mass spectrometry response data by analyzing the total ion flow map, wherein the mass spectrometry response data is the retention time and the corresponding response intensity.
[0011] Preferably, the step of determining sample data matching each leaked water sample includes: for each leaked water sample, using the number of retention times as a dimension of the sample data, and using the ratio of the response intensity corresponding to a single retention time to the total response intensity corresponding to all retention times as a value of the dimension matching each single retention time, thereby forming the sample data.
[0012] Preferably, the leaked material type detection method further includes: configuring all element values in the preset category matrix to 0 or 1, and using the element value configured as 1 to mark the corresponding single type of material.
[0013] Preferably, before obtaining the leaked material type detection result, the leaked material type detection method further includes: standardizing each sample data, thereby standardizing the test sample data based on the standardized sample data, and then using the standardized test sample data to obtain the leaked material type detection result, wherein the test sample data is standardized using the following expression:
[0014] st_xy = (xy - ave_xy) / std_xy
[0015] Where st_xy represents the standardized value of the sample data to be tested, xy represents the unstandardized value of the sample data to be tested, ave_xy represents the mean of the standardized values of all sample data in the same dimension as xy, and std_xy represents the standard deviation of the standardized values of all sample data in the same dimension as xy.
[0016] Preferably, the step of obtaining the leaked material type detection result includes: substituting the sample data to be tested into the regression equation, calculating a category matrix representing the material type present in the leaked water sample, and then obtaining the leaked material type detection result by analyzing and comparing the category matrix with a preset category matrix. If the absolute difference of each element value in the row that matches the category matrix with the preset category matrix is less than a preset difference threshold, then the leaked material type is determined to be a mixture composed of a single type of material corresponding to each matching row.
[0017] Preferably, before establishing the regression equation between the material type in the leaked water sample and the sample data, the leaked material type detection method further includes: dividing the sample data into training sample data and test sample data, thereby using the training sample data to establish the regression equation, and further using the test sample data to evaluate the effectiveness of the established regression equation, wherein both the training sample data and the test sample data cover all single-type materials, and the total number of sample data for each single-type material in the training sample data is greater than the total number of sample data for the corresponding single-type material in the test sample data.
[0018] Preferably, the leaked material type detection method further includes: optimizing the training sample data and the test sample data to establish the regression equation using the best training sample data, and evaluating the effectiveness of the established regression equation using the best test sample data, wherein the data optimization method for the training sample data includes irrelevant sample data removal and dimensionality adjustment; the data optimization method for the test sample data only includes dimensionality adjustment.
[0019] Preferably, the irrelevant sample data removal process includes: calculating the Pearson correlation coefficient, which represents the correlation between sample data of each single type of material, and filtering sample data in the training sample data whose correlation does not meet the preset correlation level requirement as irrelevant sample data for removal.
[0020] Preferably, the dimensionality adjustment process includes: determining the sample data to be adjusted based on the average and standard deviation of the response intensity corresponding to each retention time for each sample data, and sequentially performing dimensionality adjustment on different types of sample data to be adjusted according to a preset dimensionality adjustment scheme. Specifically, sample data for which the difference between the average and standard deviation of the response intensity corresponding to at least three retention times is greater than the sum of the average and standard deviation of the response intensity corresponding to any sample data for the corresponding retention time is determined as the first type of sample data to be adjusted, and dimensionality adjustment is performed on these samples by increasing the dimensionality. The value corresponding to the increased dimensionality is the sum of the values of the ratios corresponding to the at least three retention times. The remaining sample data to be adjusted is then... Sample data whose average response intensity at any given time is greater than or equal to the difference between the average response intensity and the standard deviation of any sample data at the same retention time, and less than or equal to the sum of the average response intensity and the standard deviation of any sample data at the same retention time, are identified as the second type of sample data to be regulated, and are regulated by dimension deletion, wherein the deleted dimension is the dimension corresponding to the current same retention time; among the remaining sample data to be regulated, sample data whose average response intensity at the same retention time is less than 1% are identified as the third type of sample data to be regulated, and are regulated by dimension deletion, wherein the deleted dimension is the dimension corresponding to the current same retention time.
[0021] Preferably, the process of evaluating the effectiveness of the established regression equation using the test sample data includes: substituting the test sample data into the regression equation to obtain a regression matrix that matches each test sample data; then, for each regression matrix, calculating the absolute error between each element value and the value 1; thereby obtaining the leakage material type determination result based on the column of the element value with the smallest absolute error in the regression matrix; and determining the effectiveness of the established regression equation by comparing the determination result with the actual leakage material type.
[0022] Preferably, the materials with a potential for leakage include, but are not limited to: liquefied petroleum gas, diesel oil, crude gasoline, stabilized gasoline, and lean absorber oil, wherein the lean absorber oil is marked with an element value of 1 in the first column of the preset category matrix; the diesel oil is marked with an element value of 1 in the second column of the preset category matrix; the crude gasoline is marked with an element value of 1 in the third column of the preset category matrix; the liquefied petroleum gas is marked with an element value of 1 in the fourth column of the preset category matrix; and the stabilized gasoline is marked with an element value of 1 in the fifth column of the preset category matrix.
[0023] On the other hand, the present invention also provides a leakage material type detection system for a circulating water system. The leakage material type detection system includes the following modules: a sample data acquisition module, which is used to prepare multiple leakage water samples simulating leakage under different operating conditions using materials that may leak during the operation of the circulating water system and circulating water in the water cooler when no leakage occurs, and to acquire the mass spectrometry response data of each leakage water sample to determine the sample data that matches each leakage water sample; a regression equation establishment module, which is used to establish a regression relationship equation between the material types present in the leakage water sample and the sample data based on least squares regression using a preset category matrix representing the material types that may exist in the leakage water sample and the sample data; and a detection result generation module, which is used to acquire the test sample data that matches the leaked water sample to be tested, and further combine it with the regression relationship equation to obtain the leakage material type detection result.
[0024] Compared with the prior art, one or more embodiments of the above solutions may have the following advantages or beneficial effects:
[0025] This invention proposes a method and system for detecting leaking material types in circulating water systems. The method involves preparing multiple leak water samples simulating leaks under different operating conditions and acquiring the mass spectrometry response data for each sample. Based on the mass spectrometry response data, matching sample data for each leak water sample is determined, a training sample dataset is established, and partial least squares regression is used to establish a regression equation between the material type present in the leak water samples and the sample data. Finally, the leaking material type detection result is obtained using the regression equation. This invention overcomes the shortcomings of traditional leak detection methods, enabling rapid determination of leaking material types in circulating water systems, significantly reducing the workload and time required for leak detection, and effectively improving the accuracy and reliability of the determination results.
[0026] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the description, claims and drawings. Attached Figure Description
[0027] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with the embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0028] Figure 1 This is a step diagram of a leak material type detection method for a circulating water system according to an embodiment of this application.
[0029] Figure 2 This is a block diagram of a leak material type detection system for a circulating water system according to an embodiment of this application. Detailed Implementation
[0030] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings and examples, so that the process of how the present invention uses technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly. It should be noted that, as long as there is no conflict, the various embodiments and features in the various embodiments of the present invention can be combined with each other, and the resulting technical solutions are all within the protection scope of the present invention.
[0031] Furthermore, the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0032] Material leakage from circulating water coolers is a common problem in petrochemical enterprises. Leaks exacerbate cooler corrosion, shorten their lifespan, affect the quality of the circulating water system, reduce heat exchange efficiency, and increase energy consumption. If not handled promptly, leaks can lead to losses of materials, products, equipment, water, and other resources, and in severe cases, cause unplanned production shutdowns, impacting the company's stable operation and economic benefits. Current technology can only detect large, obvious leaks, making it difficult to quickly and accurately assess minor leaks in the circulating water system. Furthermore, it is challenging to quickly determine the type of leaking material and the leak location for both obvious and minor leaks. Therefore, rapidly identifying the leaking material and taking timely and effective countermeasures to minimize the impact of material leakage on the circulating water system is crucial.
[0033] Currently, petrochemical enterprises often use traditional manual leak detection methods to check for material leaks in circulating water, such as observing the color of the circulating water, looking for oil stains, and smelling the odor. Alternatively, they rely on conventional water quality indicators such as pH, residual chlorine, and changes in chemical dosage. These methods often only detect obvious leaks and suffer from low sensitivity, poor reliability, and delayed response. For example, one rapid leak detection method for heat exchangers in oil refinery circulating water systems involves analyzing the analytical results of the circulating water spectrum and comparing it with the characteristic spectra of the heat exchangers. By examining the spectral characteristics, the leaking heat exchanger can be located or some heat exchangers can be eliminated. This method requires visual judgment from analysts, demands a certain level of experience, and the results are highly uncertain and easily influenced by human factors.
[0034] In addition, existing technologies also disclose online monitoring methods and instruments for leaks in water coolers used in light petrochemical products. This method involves drawing circulating water from the water cooler online, filtering it, and then introducing it into the gasification chamber. Combustible gas components in the sample are then transported to the detection chamber after gas extraction to determine their concentration. However, this method also requires monitoring the flow rates of circulating water and compressed air, making it complex to operate, time-consuming to analyze, and unable to pinpoint the leak location.
[0035] The method for tracing the source of leaked oil in water involves chromatographic analysis of the oil phase in a water sample to obtain a chromatogram. The similarity (S) between this chromatogram and the characteristic chromatogram of at least one potentially leaked oil substance is then determined. Based on the similarity (S), the type of leaked oil in the water sample is identified, and finally, the source of the leak is determined based on the identified oil type. This method uses similarity, identifying the oil type corresponding to a pre-defined characteristic chromatogram with a similarity (S) greater than 0.99 as the leaked oil type. However, due to factors such as water sample dilution, impurities, measurement time, and production processes, the similarity (S) is difficult to reach 0.99, making accurate identification of the leaked material challenging.
[0036] A leak detection device for petrochemical water coolers relies on the principle of macroscopic color change after the absorption of hydrocarbon phases by an absorption colorimetric material to detect leaks. However, this device can only determine whether the water cooler is leaking, but cannot identify the type of leaked material. A similar device for detecting and rapidly quantifying leaks in hydrocarbon water coolers determines whether a leak is occurring by absorbing the color change of a colorimetric material package, and combines this with a mass flow controller and mass sensor to measure the mass difference and quantify the amount of water cooler leakage. However, this device can only determine whether the water cooler is leaking, but cannot identify the type of leaked material.
[0037] Petrochemical plants have a wide distribution of circulating water systems. In the event of a leak, the entire system's heat exchange equipment needs to be analyzed and tested to locate the leak, resulting in a very large workload. Therefore, employing simple and accurate methods to detect circulating water leaks and quickly identify the leaking material can effectively solve the problem and prevent economic losses in petrochemical plants.
[0038] Therefore, to address the aforementioned problems, this invention proposes a method and system for detecting leaking material types in circulating water systems. This method involves preparing multiple leak water samples simulating leaks under different operating conditions and acquiring the mass spectrometry response data for each sample. Then, based on the mass spectrometry response data, matching sample data for each leak water sample is determined, a training sample dataset is established, and partial least squares regression is further employed to establish a regression equation between the material type present in the leak water sample and the sample data. Finally, the leaking material type detection result is obtained using the regression equation. This invention overcomes the shortcomings of traditional leak detection methods, enabling rapid determination of leaking material types in circulating water systems, significantly reducing leak detection workload and time, and effectively improving the accuracy and reliability of the determination results.
[0039] Example 1
[0040] Figure 1 This is a step diagram of a leak material type detection method for a circulating water system according to an embodiment of this application. See below for reference. Figure 1 This will explain each step of the method.
[0041] like Figure 1 As shown, in step S110, multiple leak water samples are prepared using materials that may leak during the operation of the circulating water system and the circulating water in the water cooler when no leak occurs, to simulate the leakage of circulating water under different operating conditions. Mass spectrometry response data of each leak water sample is obtained to determine the sample data that matches each leak water sample.
[0042] Specifically, in this embodiment, the production materials contained within the circulating water system during operation are collected as materials with a potential for leakage. Then, by mixing the potentially leaking materials with the circulating water in the water cooler when no leakage occurs, multiple leakage water samples are prepared to simulate circulating water under different operating conditions—that is, circulating water under conditions where material leakage occurs and enters the circulating water system. After preparing multiple leakage water samples, the mass spectrometry response data of each leakage water sample is obtained. Finally, based on the response intensity at the retention time corresponding to the mass spectrometry response data (described below), a numerical matrix representing the correlation between retention time and response intensity is constructed for each leakage water sample. This numerical matrix is then used as sample data to determine the sample data matching each leakage water sample.
[0043] In the process of preparing multiple leak water samples to simulate leaks in circulating water under different operating conditions, the production materials contained in the system during different operating stages are first collected for the operation of the circulating water system under different process conditions, so as to identify multiple materials with the possibility of leakage. Then, by using a material spiking method, a single type of material with the possibility of leakage in each operating stage is mixed with the circulating water in the water cooler when no leakage occurs, so as to prepare multiple leak water samples.
[0044] Specifically, this embodiment thoroughly investigates the process characteristics, layout, and production materials contained within the circulating water system of a petrochemical engineering project. Production materials contained within the system are collected in batches during operation under different times and process conditions. This achieves the goal of collecting production materials contained within the system at different operating stages under varying process conditions; the collected production materials are those with a potential for leakage. Next, this embodiment identifies a single type of material among the materials with a potential for leakage in each operating stage and further obtains corresponding characteristic parameters such as concentration. Using a material spiking method, each identified single type of material is mixed with circulating water in a water cooler when no leakage occurs, according to its corresponding characteristic parameters, to prepare leakage water samples for each operating stage, thus obtaining multiple leakage water samples. For example, a single type of material with a concentration of 0.1–10 μL / L is added to 500 ml of circulating water in a water cooler when no leakage occurs to obtain the corresponding leakage water sample.
[0045] Therefore, it can be seen that the present invention constructs a regression equation based on multiple leaked water samples that meet different time and process conditions, that is, under the condition of a wider sample coverage, which lays a good data foundation for obtaining accurate and reliable detection results of leaked material types.
[0046] In the step of obtaining mass spectrometry response data for each leaked water sample, a combination of multiple analytical methods is used to perform component analysis on each leaked water sample, forming a total ion flow map that represents the ion distribution characteristics in the leaked water sample. Then, the mass spectrometry response data is obtained by analyzing the total ion flow map, where the mass spectrometry response data includes retention time and corresponding response intensity.
[0047] Specifically, this embodiment utilizes multiple analytical methods, including solid-phase extraction-gas chromatography-mass spectrometry (SPE-GCMS), headspace-gas chromatography-mass spectrometry (HS-GCMS), and purge-trap-gas chromatography-mass spectrometry (P&T-GCMS), to analyze each leaked water sample, thereby generating a total ion chromatogram based on the analytical results. Subsequently, the total ion chromatogram is analyzed to obtain all peak positions and peak areas matching each total ion chromatogram. The peak positions are then used as retention times, and the corresponding peak areas are used as the response intensity at the corresponding retention times.
[0048] In the step of determining the sample data that matches each leaked water sample, for each leaked water sample, the number of retention times is used as the dimension of the sample data, and the ratio of the response intensity corresponding to a single retention time to the total response intensity corresponding to all retention times is used as the value of the dimension corresponding to each single retention time, thereby forming the sample data.
[0049] Specifically, in this embodiment, each sample data is formed based on the response intensity corresponding to the retention time. For each sample data, the number of retention times is the dimension of the sample data, and the value of the corresponding dimension is calculated based on the response intensity matching the retention time. In the process of calculating the value of the corresponding dimension based on the response intensity matching the retention time, the set of all sample data is denoted as X. By calculating the ratio of the response intensity corresponding to the j-th retention time to the total response intensity corresponding to all W retention times of the i-th sample data for the i-th sample data, the value X of the corresponding dimension is obtained. i,j , by numerical X i,j The resulting numerical matrix represents the i-th sample data. Here, i and j represent the sequence number of the sample data and the sequence number of the retention time, respectively, i∈[1,N], j∈[1,W], N represents the total number of sample data or the total number of leaked water samples, and W represents the number of retention times.
[0050] Furthermore, in step S120, using a preset category matrix representing the types of materials that may exist in the leaked water sample, and combining the sample data, a regression equation between the types of materials in the leaked water sample and the sample data is established based on least squares regression.
[0051] Specifically, in this embodiment, a preset category matrix set, denoted as Y, is formed using the sub-category matrix of each leaked water sample. In other words, Y is the sub-category matrix Y corresponding to each sample data. i,p The combination of i, where i∈[1,N], and p represents the total quantity of a single type of material. For example, when the materials with the possibility of leakage are liquefied petroleum gas, diesel, crude gasoline, stabilized gasoline and lean absorbent oil, the value of p is 5.
[0052] In this embodiment, after establishing the aforementioned sets X and Y, the appropriate calculation software (e.g., MATLAB 2022a) is used to substitute the current sets X and Y into the function [P,Q,T,U,BETA,PCTVAR] = plsregress(X,Y), which is suitable for calculating the partial least squares regression relationship equation. The obtained BETA output value is the coefficient matrix of the regression expression of Y on X. Further, the regression relationship equation can be formed based on the current regression expression coefficient matrix. For example, if the retention time W corresponding to set X is 10, and the total number of single types corresponding to set Y is 5, after calculation, BETA is obtained as a 5-row, 10-column matrix. Each column corresponds to the 10 dimensions of X, and each row corresponds to the 5 dimensions of Y. In this case, the first row of BETA is: [0.1, 0.24, 0.2, 0.54, 0.34, 0.28, 0.9, 1.5, 2.1, 0.1]. Then Y... i,1 =0.1×X i,1 +0.24×X i,2 +0.2×X i,3 +0.54×X i,4 +0.34×X i,5 +0.28×X i,6 +0.9×X i,7 +1.5×X i,8 +2.1×X i,9 +0.1×X i,10 .
[0053] Furthermore, the present invention configures all element values in the preset category matrix to be 0 or 1, and uses the element value configured as 1 to mark the corresponding single type of material.
[0054] Specifically, this embodiment uses a preset category matrix in numerical matrix form to represent the types of materials that may exist in the leaked water samples. The rows of the preset category matrix match the sample data in set X, while the columns match the total number of single-type materials corresponding to each sample data in set Y. For example, if there are 60 sample data involving five single-type materials: liquefied petroleum gas, diesel, crude gasoline, stabilized gasoline, and lean absorbent oil, the preset category matrix is a 60-row, 5-column matrix. The preset category matrix is obtained by assigning a value of 1 to the elements matching each single-type material and a value of 0 to the other elements.
[0055] In one specific embodiment of this application, the materials that may leak include, but are not limited to: liquefied petroleum gas, diesel oil, crude gasoline, stabilized gasoline, and lean absorber oil. Specifically, lean absorber oil is marked with an element value of 1 in the first column of a preset category matrix; diesel oil is marked with an element value of 1 in the second column of the preset category matrix; crude gasoline is marked with an element value of 1 in the third column of the preset category matrix; liquefied petroleum gas is marked with an element value of 1 in the fourth column of the preset category matrix; and stabilized gasoline is marked with an element value of 1 in the fifth column of the preset category matrix. In other words, this embodiment forms rows related to lean absorption oil in a preset category matrix according to the subcategory matrix [1, 0, 0, 0, 0]; rows related to diesel oil in a preset category matrix according to the subcategory matrix [0, 1, 0, 0, 0]; rows related to crude gasoline in a preset category matrix according to the subcategory matrix [0, 0, 1, 0, 0]; rows related to liquefied petroleum gas in a preset category matrix according to the subcategory matrix [0, 0, 0, 1, 0]; and rows related to stable gasoline in a preset category matrix according to the subcategory matrix [0, 0, 0, 0, 1].
[0056] Furthermore, in step S130, test sample data matching the leaked water sample to be tested are obtained, and the leakage material type detection result is obtained by further combining the regression equation.
[0057] Specifically, in this embodiment, the leaked water to be tested is collected as the leaked water sample, and the mass spectrometry response data of the leaked water sample is obtained and the sample data is determined in a similar manner to that of the leaked water sample. Then, the sample data is substituted into the regression equation to calculate the regression value (i.e., a category matrix representing the material types present in the leaked water sample). Finally, based on the calculated regression value, the detection result of the leaked material type is obtained.
[0058] Next, before obtaining the detection results of the leaked material type, the present invention also standardizes each sample data, thereby standardizing the test sample data based on the standardized sample data, and then using the standardized test sample data to obtain the leaked material type detection results.
[0059] Specifically, in this embodiment, each sample data is first standardized to obtain standardized sample data. Then, using the standardized sample data, a constant is calculated for standardizing the sample data to be tested. Next, using the calculated constant and the unstandardized values of the sample data to be tested, the sample data to be tested is standardized. Finally, using the standardized sample data to be tested, the detection result of the leaked material type is obtained.
[0060] In this embodiment of the application, the test sample data is standardized using the following expression:
[0061] st_xy = (xy-ave_xy) / std_xy (1)
[0062] Where st_xy represents the standardized value of the sample data to be tested, xy represents the unstandardized value of the sample data to be tested, ave_xy represents the mean of the standardized values of all sample data in the same dimension as xy, and std_xy represents the standard deviation of the standardized values of all sample data in the same dimension as xy.
[0063] In the step of obtaining the leaked material type detection result, the sample data to be tested is substituted into the regression equation to calculate the category matrix representing the material type present in the leaked water sample. Then, by analyzing and comparing the category matrix with the preset category matrix, the leaked material type detection result is obtained. If the absolute difference of each element value corresponding to the row that matches the category matrix and the preset category matrix is less than the preset difference threshold, the leaked material type is determined to be a mixture composed of a single type of material corresponding to each matching row.
[0064] Specifically, in this embodiment, the sample data to be tested is substituted into the regression equation to calculate the category matrix representing the material types present in the leaked water sample as the corresponding regression value. Then, the category matrix representing the material types present in the leaked water sample is analyzed and compared with a preset category matrix. Based on the relationship between the element values of corresponding rows in the matrices, rows that completely match the preset category matrix are determined. That is, the absolute difference of each element value in the matching rows is less than a preset difference threshold. Therefore, the mixture composed of a single type of material corresponding to each matching row is determined as the leaked material type detection result. In a specific embodiment of this application, the preset difference threshold is preferably 0.1.
[0065] Furthermore, when there are no perfectly matching rows between the category matrix and the preset category matrix, the present invention directly determines that the leaked material type detection result is a mixture. Then, all element values less than 0.2 in the category matrix are assigned a value of 0 to update the current category matrix. Based on the updated category matrix, a chemical mass balance model is used to analyze the material composition, thereby obtaining the type of leaked material contained in the mixture. For example, by calculating the relative proportion of material components corresponding to element values greater than 0.2 in the category matrix, the type of leaked material contained in the mixture is determined based on the relative proportion.
[0066] In this embodiment of the application, the relative proportion is calculated using the following expression:
[0067]
[0068] Among them, y ix represents the relative proportion of the i-th material component. i Let represent the content of the i-th material component, and n represent the total amount of the material components.
[0069] Furthermore, before establishing the regression equation between the material types and sample data in the leaked water samples, this invention divides the sample data into training sample data and test sample data. The training sample data is used to establish the regression equation, and the test sample data is used to evaluate the effectiveness of the established regression equation. Both the training sample data and the test sample data cover all single-type materials, and the total number of sample data for each single-type material in the training sample data is greater than the total number of sample data for the corresponding single-type material in the test sample data.
[0070] Specifically, this embodiment divides the sample data into training sample data and test sample data. Then, a regression equation is established using the training sample data. To ensure reliable detection results for leaked material types, this embodiment evaluates the validity of the established regression equation using test sample data before applying it to obtain the detection results. This ensures that the regression equation used to obtain the leaked material type detection results is valid. If the validity evaluation result of the currently established regression equation is valid, it is directly used as the valid regression equation to obtain the leaked material type detection results; otherwise, new sample data is obtained to establish a new regression equation and its validity is evaluated until the established regression equation is valid. Furthermore, the training and test sample data used in this embodiment cover all single-type materials, and the total number of sample data for each single-type material in the training sample data is greater than the total number of sample data for the corresponding single-type material in the test sample data, effectively ensuring the accuracy and reliability of the established regression equation.
[0071] In one specific embodiment of this application, the total number of sample data corresponding to each type of leaked water sample in the training sample data is at least n, and the total number of sample data corresponding to each type of leaked water sample in the test sample data is at least m. Preferably, n is 20, and m is preferably 5. It should be noted that this invention does not specifically limit the total number of sample data corresponding to each type of leaked water sample in the training and test sample data; those skilled in the art can set this according to actual needs.
[0072] Before establishing the regression equation between the material type and sample data in the leaked water samples, this invention also optimizes the training sample data and test sample data to establish the regression equation using the best training sample data, and evaluates the effectiveness of the established regression equation using the best test sample data. The data optimization methods for the training sample data include irrelevant sample data removal and dimensionality adjustment; the data optimization methods for the test sample data only include dimensionality adjustment.
[0073] Specifically, this embodiment optimizes the training sample data by removing irrelevant sample data and adjusting dimensionality to obtain the best training sample data, effectively improving the stability of the training sample data and reducing the computational difficulty of partial least squares regression. Optimizing the test sample data by adjusting dimensionality to obtain the best test sample data significantly improves testing efficiency and the effectiveness of evaluation results.
[0074] Next, during the irrelevant sample data removal process, the Pearson correlation coefficient, which represents the correlation between sample data of each single type of material, is calculated. Sample data in the training sample data whose correlation does not meet the preset correlation level requirement is selected as irrelevant sample data for removal.
[0075] In one specific embodiment of this application, for the sample data of a single type of material present in each type of leaked water sample in the training sample data, the correlation between sample data of the same single type of material is calculated using the Pearson correlation coefficient R. Then, sample data whose absolute value of the Pearson correlation coefficient R is less than a preset correlation threshold are considered as sample data whose correlation does not meet the preset correlation requirement. Accordingly, irrelevant sample data in the training sample data are filtered out. The preset correlation threshold is preferably 0.5. However, to ensure the validity of the evaluation results, this embodiment does not remove irrelevant sample data from the test sample data.
[0076] During the dimensionality control process, the sample data to be controlled is determined based on the average value and standard deviation of the response intensity corresponding to each retention time of each sample data. Then, according to the preset dimensionality control scheme, the dimensionality control of different types of sample data to be controlled is completed in sequence. The following categories of data are identified: First, data whose average response intensity at at least three retention times exceeds the sum of the average response intensity at the same retention time and the standard deviation for any other data point is classified as the first type of data to be regulated. This type of data is regulated by adding dimensions, where the added dimension corresponds to the sum of the ratios corresponding to at least three retention times. Second, data whose average response intensity at any retention time exceeds or equals the average response intensity at the same retention time and the standard deviation for any other data point, but is less than or equal to the sum of the average response intensity at the same retention time and the standard deviation for any other data point, is classified as the second type of data to be regulated. This type of data is regulated by deleting dimensions, where the deleted dimension corresponds to the same retention time. Third, data whose average response intensity at any retention time is less than 1% is classified as the third type of data to be regulated. This type of data is regulated by deleting dimensions, where the deleted dimension corresponds to the same retention time.
[0077] Specifically, in this embodiment, the average value of the i-th sample data at the j-th retention time is defined as aX. i,j The standard deviation is pX i,j First, between any i1 sample data and i2 sample data, there exist three or more retention times j1 such that the first condition aX i1,j1 -pX i1,j1 >aX i2,j1 +pX i2,j1 If this is true, then in addition to the existing W dimensions, a new W+1th dimension is added to accumulate small differences, highlighting the differences between sample data, and the value X in this dimension... i,w+1 The sum of the ratios corresponding to all retention times j1 that meet the first condition is given, where the value corresponding to the added dimension is calculated using the following expression:
[0078] x i,W+1 =∑X i,j1 (3)
[0079] Where, x i,W+1 X represents the numerical value corresponding to the added dimension. i,j1 This represents the sum of the values corresponding to the retention times that meet the first condition.
[0080] Secondly, for any i1 sample data in the remaining sample data to be adjusted (after adding dimensions), there exists a retention time j1 such that the second condition aX i1,j1 -pX i1j1 ≤aX i,j1 ≤aX i1,j1 +pX i1,j1 If true, then based on the existing W dimensions, delete the dimension corresponding to retention time j1.
[0081] Finally, for any i1 sample in the remaining sample data to be adjusted (after removing dimensions), there exists a time interval j1 such that the third condition aX i,j1 If <1% holds true, then based on the existing W dimensions, delete the dimension corresponding to retention time j1.
[0082] In the process of evaluating the effectiveness of the established regression equation using test sample data, the test sample data is substituted into the regression equation to obtain a regression matrix that matches each test sample data. Then, for each regression matrix, the absolute error between each element value and the value 1 is calculated. Based on the column of the regression matrix where the element value with the smallest absolute error is located, the result of the leaked material type is obtained. The effectiveness of the established regression equation is determined by comparing the determination result with the actual leaked material type.
[0083] Specifically, in this embodiment, the test sample data is substituted one by one into the regression equation to calculate the regression matrix that matches each test sample data. Next, the absolute error between each element value in each regression matrix and the value 1 is calculated, and the column corresponding to the element value with the smallest absolute error in the regression matrix is labeled as a single type of material, which is the material type corresponding to the regression matrix, that is, the material type present in the leaked water sample. After obtaining the material types present in the leaked water sample corresponding to each test sample data (all judgment results), the matching degree is calculated by counting the number of judgment results that are the same as and different from the actual material types present in the leaked water sample. Thus, when the matching degree between all judgment results and the actual material types present in the leaked water sample is greater than or equal to a preset threshold, the established regression equation is deemed valid, wherein the preset threshold is preferably 95%.
[0084] Example 2
[0085] Based on the method for detecting the type of leaked material in a circulating water system described in Embodiment 1 above, this embodiment of the invention also provides a system for detecting the type of leaked material in a circulating water system (hereinafter referred to as "the leaked material type detection system"). Figure 2 This is a block diagram of a leak material type detection system for a circulating water system according to an embodiment of this application.
[0086] like Figure 2 As shown, the leaked material type detection system in this embodiment of the invention includes: a sample data acquisition module 21, a regression equation establishment module 22, and a detection result generation module 23. Specifically, the sample data acquisition module 21 is implemented according to the method described in step S110 above, configured to use materials that may leak during the operation of the circulating water system and the circulating water in the water cooler when no leak occurs to prepare multiple leak water samples simulating leaks under different operating conditions, and acquire the mass spectrometry response data of each leak water sample to determine the sample data that matches each leak water sample; the regression equation establishment module 22 is implemented according to the method described in step S120 above, configured to use a preset category matrix representing the possible material types in the leak water sample, combined with the sample data, and based on least squares regression, to establish a regression relationship equation between the material types in the leak water sample and the sample data; the detection result generation module 23 is implemented according to the method described in step S130 above, configured to acquire the test sample data that matches the leak water sample to be tested, and further combine it with the regression relationship equation to obtain the leaked material type detection result.
[0087] This invention discloses a method and system for detecting leaking material types in circulating water systems. The method involves preparing multiple leak water samples simulating leaks under different operating conditions and acquiring mass spectrometry response data for each sample. Based on the mass spectrometry response data, matching sample data for each leak water sample is determined, a training sample dataset is established, and partial least squares regression is used to establish a regression equation between the material type present in the leak water samples and the sample data. Finally, the leaking material type detection result is obtained using the regression equation. This invention overcomes the shortcomings of traditional leak detection methods, enabling rapid determination of leaking material types in circulating water systems, significantly reducing leak detection workload and time, and effectively improving the accuracy and reliability of the determination results.
[0088] The above description represents a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
[0089] Of course, the present invention may have other various embodiments. Without departing from the spirit and essence of the present invention, those skilled in the art can make various corresponding changes and modifications according to the present invention, but these corresponding changes and modifications should all fall within the protection scope of the claims of the present invention.
[0090] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device, or fabricating them separately as individual integrated circuit modules, or fabricating multiple modules or steps as a single integrated circuit module. Thus, the present invention is not limited to any particular hardware and software combination.
[0091] While the embodiments disclosed in this invention are as described above, the content is merely for the purpose of facilitating understanding of the invention and is not intended to limit the invention. Any person skilled in the art to which this invention pertains may make any modifications and variations in form and detail of the implementation without departing from the spirit and scope disclosed herein; however, the scope of patent protection for this invention shall still be determined by the scope defined in the appended claims.
Claims
1. A method for detecting the type of leaked material in a circulating water system, characterized in that, include: Using materials that may leak during the operation of the circulating water system, as well as the circulating water in the water cooler when no leak occurs, multiple leak water samples were prepared to simulate leaks under different operating conditions. Mass spectrometry response data of each leak water sample was obtained to determine the sample data that matches each leak water sample. Using a preset category matrix representing the types of materials that may exist in the leaked water sample, and in combination with the sample data, a regression equation between the types of materials in the leaked water sample and the sample data is established based on least squares regression. Obtain test sample data that matches the leaked water sample to be tested, and further combine it with the regression equation to obtain the detection result of the leaked material type.
2. The method for detecting the type of leaked material according to claim 1, characterized in that, The steps of preparing multiple leak water samples simulating leaks occurring under different operating conditions include: To identify potential leaks of various materials in the circulating water system during different operating periods, the system collects data on the production materials contained within the system under different process conditions. By using a material spiking method, a single type of material from the materials that have the potential to leak during each operating phase is mixed with the circulating water in the water cooler when no leak has occurred, thereby preparing the multiple leak water samples.
3. The method for detecting the type of leaked material according to claim 2, characterized in that, The steps for obtaining mass spectrometry response data for each leaked water sample include: A combination of analytical methods is used to perform component analysis on each leaked water sample, generating a total ion flow map that represents the ion distribution characteristics in the leaked water sample. Then, the mass spectrometry response data is obtained by analyzing the total ion flow map, wherein the mass spectrometry response data includes retention time and corresponding response intensity.
4. The method for detecting the type of leaked material according to claim 3, characterized in that, The steps of determining sample data that match each leaked water sample include: For each leaked water sample, the number of retention times is used as a dimension of the sample data, and the ratio of the response intensity corresponding to a single retention time to the total response intensity corresponding to all retention times is used as a value of the dimension matching each single retention time, thereby forming the sample data.
5. The method for detecting the type of leaked material according to any one of claims 2 to 4, characterized in that, The method for detecting the type of leaked material also includes: All element values in the preset category matrix are configured to be 0 or 1, and the corresponding single type of material is marked by the element value configured as 1.
6. The method for detecting the type of leaked material according to any one of claims 2 to 5, characterized in that, Before obtaining the leaked material type detection result, the leaked material type detection method further includes: Each sample data point is standardized, and based on this standardized sample data, the test sample data is standardized. Then, using the standardized test sample data, the leaked material type detection result is obtained. The test sample data is standardized using the following expression: st_xy = (xy - ave_xy) / std_xy Where st_xy represents the standardized value of the sample data to be tested, xy represents the unstandardized value of the sample data to be tested, ave_xy represents the mean of the standardized values of all sample data in the same dimension as xy, and std_xy represents the standard deviation of the standardized values of all sample data in the same dimension as xy.
7. The method for detecting the type of leaked material according to claim 6, characterized in that, The steps for obtaining the detection results of the leaked material type include: Substituting the sample data to be tested into the regression equation, a category matrix representing the types of materials present in the leaked water sample is calculated. Then, by analyzing and comparing the category matrix with a preset category matrix, the detection result of the leaked material type is obtained. If the absolute difference between the values of each element in the row that matches the category matrix and the preset category matrix is less than the preset difference threshold, then the leaked material type is determined to be a mixture of materials of a single type corresponding to each matching row.
8. The method for detecting the type of leaked material according to any one of claims 2 to 7, characterized in that, Before establishing the regression equation between the material type in the leaked water sample and the sample data, the leaked material type detection method further includes: The sample data is divided into training sample data and test sample data. The regression equation is then established using the training sample data, and the effectiveness of the established regression equation is further evaluated using the test sample data. Both the training sample data and the test sample data cover all single-type materials, and the total number of sample data for each single-type material in the training sample data is greater than the total number of sample data for the corresponding single-type material in the test sample data.
9. The method for detecting the type of leaked material according to claim 8, characterized in that, The method for detecting the type of leaked material also includes: The training sample data and the test sample data are optimized to establish the regression equation using the best training sample data, and the effectiveness of the established regression equation is evaluated using the best test sample data. The data optimization methods for the training sample data include irrelevant sample data removal and dimensionality adjustment; The data optimization methods for the test sample data only include dimensional adjustment.
10. The method for detecting the type of leaked material according to claim 9, characterized in that, The process of removing irrelevant sample data includes: By calculating the Pearson correlation coefficient, which represents the correlation between sample data of each single type of material, sample data in the training sample data that do not meet the preset correlation level requirement are screened out as irrelevant sample data and removed.
11. The method for detecting the type of leaked material according to claim 10, characterized in that, The process of dimensional control includes: Based on the average and standard deviation of the response intensity corresponding to each retention time for each sample data, the sample data to be controlled are determined, and the dimensional control of different types of sample data to be controlled is completed sequentially according to the preset dimensional control scheme. Sample data whose difference between the average and standard deviation of the response intensity corresponding to at least three retention times is greater than the sum of the average and standard deviation of the response intensity corresponding to any sample data for the corresponding retention time is identified as the first type of sample data to be controlled, and controlled by increasing the dimension, wherein the value corresponding to the increased dimension is the sum of the values of the ratios corresponding to the at least three retention times. The sample data in the remaining sample data to be regulated, whose average response intensity corresponding to the retention time is greater than or equal to the difference between the average response intensity and the standard deviation of any sample data corresponding to the same retention time, and is less than or equal to the sum of the average response intensity and the standard deviation of any sample data corresponding to the same retention time, are identified as the second type of sample data to be regulated, and are regulated by dimension deletion, wherein the deleted dimension is the dimension corresponding to the same retention time. Among the remaining sample data to be regulated, the sample data whose average response intensity corresponding to the same retention time is less than 1% is identified as the third sample data to be regulated, and a dimension deletion method is adopted to regulate it. The deleted dimension is the dimension corresponding to the same retention time.
12. The method for detecting the type of leaked material according to any one of claims 9 to 11, characterized in that, The process of evaluating the effectiveness of the established regression equation using the test sample data includes: Substitute the test sample data into the regression equation to obtain a regression matrix that matches each test sample data. Then, for each regression matrix, calculate the absolute error between each element value and the value 1. Based on the column of the element value with the smallest absolute error in the regression matrix, obtain the result of the leaked material type determination. The validity of the established regression equation is determined by comparing the determination result with the actual leaked material type.
13. The method for detecting the type of leaked material according to claim 5, characterized in that, The materials that may leak include, but are not limited to: liquefied petroleum gas, diesel oil, crude gasoline, stabilized gasoline, and lean absorber oil. The element value of the first column in the preset category matrix is set to 1 to mark the lean absorption oil; The diesel fuel is labeled with an element value of 1 in the second column of the preset category matrix. The crude gasoline is labeled with an element value of 1 in the third column of the preset category matrix. The liquefied petroleum gas is labeled by setting the fourth column of the preset category matrix to 1. The element value of the fifth column in the preset category matrix is set to 1 to mark the stable gasoline.
14. A leak material type detection system for a circulating water system, characterized in that, The leaked material type detection system includes the following modules: The sample data acquisition module is used to prepare multiple leak water samples simulating leaks under different operating conditions by using materials that may leak during the operation of the circulating water system and the circulating water in the water cooler when no leaks occur. It also acquires the mass spectrometry response data of each leak water sample to determine the sample data that matches each leak water sample. The regression equation establishment module is used to establish a regression relationship equation between the material types present in the leaked water sample and the sample data based on least squares regression, using a preset category matrix representing the possible material types in the leaked water sample and the sample data. The detection result generation module is used to acquire test sample data that matches the leaked water sample to be tested, and further combine it with the regression equation to obtain the detection result of the leaked material type.