A method for determining the set value of the outlet pressure of a gas pressure regulator based on online monitoring data

By monitoring the operating data of the gas pressure regulator online, and using the sliding window method, improved box plot method, and kernel density estimation method to identify the pressure regulation behavior, the problem of not being able to obtain the outlet pressure setpoint of the gas pressure regulator online in the existing technology has been solved, thus realizing the online monitoring and safe operation of the gas pressure regulator.

CN122064147BActive Publication Date: 2026-07-07SOUTHWEST PETROLEUM UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SOUTHWEST PETROLEUM UNIV
Filing Date
2026-04-22
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

Existing technology cannot obtain the outlet pressure setpoint of the gas pressure regulator online, resulting in insufficient online monitoring capability of the gas pressure regulator's operation status and failing to ensure its normal and safe operation.

Method used

By monitoring the operating data of the gas pressure regulator online, the data is divided into normal and abnormal operating condition windows using the sliding window method. The outlet pressure setpoint is calculated using the improved box plot method and kernel density estimation method, and the pressure regulation behavior is identified and the operating condition type is automatically determined.

Benefits of technology

It enables online monitoring of the outlet pressure setpoint of the gas pressure regulator, ensuring pressure stabilization accuracy and safe operation, reducing manual intervention, improving decision-making efficiency, and reducing computing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122064147B_ABST
    Figure CN122064147B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on online monitoring data's gas pressure regulator outlet pressure set value determination method, including online monitoring and obtaining the operation data of gas pressure regulator, operation data is divided into several time windows;Each time window is classified as normal condition window, non-normal condition window;With the first normal condition window as starting point, the gas pressure regulator outlet pressure set value of each time window in turn is determined: for normal condition window, corresponding gas pressure regulator outlet pressure set value is calculated based on operation data;For non-normal condition window, the gas pressure regulator outlet pressure set value corresponding to previous normal condition window is used as the gas pressure regulator outlet pressure set value of current non-normal condition window.The application is used to solve the problem that outlet pressure set value of gas pressure regulator cannot be obtained online in prior art, to achieve the purpose of determining real-time outlet pressure set value of gas pressure regulator based on online monitoring data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of gas transmission and distribution technology, and specifically to a method for determining the outlet pressure setpoint of a gas pressure regulator based on online monitoring data. Background Technology

[0002] As a core component of the gas transmission and distribution system, the operational stability of gas pressure regulators directly impacts gas supply security and public welfare. In the upstream and downstream structure of gas supply, pressure regulators adjust the outlet pressure setpoint to ensure that the pressure of incoming gas from upstream reaches the predetermined pressure range of the downstream pipeline network, thus meeting users' daily gas application needs.

[0003] Currently, the gas transmission and distribution industry relies heavily on manual on-site inspections and basic manual record-keeping mechanisms to monitor the operation of pressure regulators. Under this model, the outlet pressure setpoint of the gas pressure regulator cannot be uploaded to the online database in a timely and accurate manner. Even with online monitoring data such as pressure, flow, and temperature, the real-time outlet pressure setpoint cannot be accurately determined, and therefore, real-time data cannot be promptly fed back as characteristic values ​​such as pressure stabilization accuracy, shut-off pressure accuracy, and outlet pressure deviation index. Consequently, effective online monitoring of the regulator's pressure stabilization accuracy is impossible. Therefore, even if the regulator's pressure stabilization performance deteriorates or a malfunction occurs, it cannot be detected immediately, resulting in a significant waste of human and financial resources. Thus, existing technology, limited by the inability to obtain the outlet pressure setpoint of the gas pressure regulator online, suffers from insufficient online monitoring capabilities for the gas pressure regulator's operation, failing to ensure its normal and safe operation. Summary of the Invention

[0004] This invention provides a method for determining the outlet pressure setpoint of a gas pressure regulator based on online monitoring data, in order to solve the problem that the outlet pressure setpoint of a gas pressure regulator cannot be obtained online in the prior art, and to achieve the purpose of determining the real-time outlet pressure setpoint of a gas pressure regulator based on online monitoring data.

[0005] This invention is achieved through the following technical solution:

[0006] A method for determining the outlet pressure setpoint of a gas pressure regulator based on online monitoring data includes the following steps:

[0007] S1. Monitor and acquire the operating data of the gas pressure regulator online, and divide the operating data into several time windows based on the sliding window method;

[0008] S2. Classify each time window into normal operating condition windows and abnormal operating condition windows;

[0009] S3. Taking the first normal operating window as the starting point, determine the gas regulator outlet pressure setpoint for each subsequent time window according to the time sequence using the following method:

[0010] For the normal operating window, the corresponding gas pressure regulator outlet pressure setting value is calculated based on the operating data;

[0011] For abnormal operating condition windows, the gas regulator outlet pressure setting value corresponding to the previous normal operating condition window is used as the gas regulator outlet pressure setting value for the current abnormal operating condition window.

[0012] To address the problem that existing technologies cannot obtain the outlet pressure setpoint of gas pressure regulators online, resulting in insufficient online monitoring capabilities and an inability to ensure the normal and safe operation of gas pressure regulators, this application proposes a method for determining the outlet pressure setpoint of gas pressure regulators based on online monitoring data. This method first utilizes existing technology to monitor and acquire the operating data of the gas pressure regulator online. Then, it uses a sliding window method to divide the acquired operating data into several time windows, classifying each time window into normal operating condition windows and abnormal operating condition windows. Next, starting with the first normal operating condition window, the method determines the outlet pressure setpoint of the gas pressure regulator for each subsequent time window: for normal operating condition windows, this application calculates the corresponding outlet pressure setpoint based on the operating data within that time window; for abnormal operating condition windows, since pressure regulation behavior is unlikely to occur within their corresponding time period, further analysis and calculation are unnecessary, and the outlet pressure setpoint of the gas pressure regulator for the abnormal operating condition window can be directly taken as the outlet pressure setpoint of the gas pressure regulator for the previous normal operating condition window.

[0013] The abnormal operating condition window in this application refers to a time window in which abnormal operating conditions exist within a corresponding time period, such as shutdown for maintenance, sensor failure, fluctuations in upstream gas flow, and other abnormal operating conditions.

[0014] As can be seen, this application can directly determine the outlet pressure setpoint of the gas regulator for all time windows after the first normal operating window by monitoring the received gas regulator operating data using existing technology. Compared with the existing technology that relies on manual inspection, this achieves online monitoring of the regulator's outlet pressure setpoint, which is beneficial for real-time feedback of characteristic values ​​such as pressure stabilization accuracy, shut-off pressure accuracy, and outlet pressure deviation index, ensuring the normal and safe operation of the gas regulator. At the same time, it facilitates automatic determination of operating condition type and pressure regulation behavior by the backend, reducing manual intervention and improving decision-making efficiency.

[0015] Furthermore, the operational data includes: the outlet pressure of the gas pressure regulator, instantaneous flow rate, and acquisition time. The real-time outlet pressure and instantaneous flow rate of the gas pressure regulator can be monitored online using existing technologies; this solution acquires these parameters in real time, providing effective data support for subsequent calculations.

[0016] Furthermore, step S2 specifically includes:

[0017] S21. Obtain historical operating data of the gas pressure regulator;

[0018] S22. Based on the historical operating data, extract the outlet pressure and instantaneous flow rate of the gas pressure regulator corresponding to abnormal operating conditions; the abnormal operating conditions include shutdown for maintenance, equipment failure, and fluctuations in upstream gas supply;

[0019] S23. Based on the outlet pressure and instantaneous flow rate of the gas pressure regulator corresponding to the abnormal operating condition, obtain the abnormal operating condition criterion;

[0020] S24. Based on the abnormal operating condition criteria, determine whether each time window is an abnormal operating condition window.

[0021] In this scheme, based on the operating mechanism of the gas pressure regulator and its corresponding historical data, the characteristic patterns of outlet pressure and instantaneous flow data under normal operating conditions and different abnormal operating conditions are obtained. Then, based on these characteristic patterns, the operating condition type corresponding to each time window is identified, and it is determined whether it belongs to an abnormal operating condition window. Time windows that do not belong to abnormal operating condition windows are classified as normal operating condition windows.

[0022] Furthermore, the abnormal operating condition criterion is that a time window is considered an abnormal operating condition window if it meets any of the following conditions:

[0023] The outlet pressure within this time window has a continuous 0 value or a missing value for more than 1 hour;

[0024] The instantaneous flow rate within this window has consecutive 0 values ​​or missing values ​​greater than 1 hour;

[0025] The number of times the outlet pressure is 0 within this time window is greater than 60%;

[0026] The number of points with an instantaneous flow rate of 0 within this time window is greater than 60%.

[0027] This scheme clearly defines the characteristic threshold for determining whether a time window belongs to an abnormal operating condition window, which is beneficial for quickly classifying each time window.

[0028] Furthermore, in step S3, the method for calculating the corresponding gas pressure regulator outlet pressure setpoint based on the operating data includes the following steps:

[0029] S31. Preprocess the operating data within the current normal operating condition window;

[0030] S32. Based on the preprocessed operating data, determine whether there is voltage regulation behavior in the current normal operating condition window;

[0031] S33. For a normal operating window with pressure regulation behavior: obtain the outlet pressure data within a specified time after the pressure regulation behavior occurs, calculate the outlet pressure data within the specified time based on the kernel density estimation method, and use the obtained mode as the gas regulator outlet pressure setting value for the current normal operating window.

[0032] For normal operating conditions without pressure regulation: the gas regulator outlet pressure setting value corresponding to the previous normal operating conditions window is used as the gas regulator outlet pressure setting value for the current normal operating conditions window without pressure regulation.

[0033] This solution first eliminates data noise through preprocessing, then determines whether pressure regulation occurs within the current normal operating window. For normal operating windows without pressure regulation, the gas regulator outlet pressure setpoint corresponding to the previous normal operating window is directly used as the gas regulator outlet pressure setpoint for the current window. For normal operating windows with pressure regulation, the outlet pressure data within a specified time after the pressure regulation occurs is acquired, and the outlet pressure data within that specified time is calculated using kernel density estimation. The mode of the calculated data is then used as the gas regulator outlet pressure setpoint for the current normal operating window.

[0034] In this solution, the specified time can be adaptively set by the user according to specific needs / working conditions, etc., and no specific limitation is made here.

[0035] Furthermore, in step S33, if the normal operating condition window without pressure regulation behavior is the first normal operating condition window, then based on the kernel density estimation method, all outlet pressure data in the current normal operating condition window are calculated, and the mode obtained is used as the gas pressure regulator outlet pressure setting value of the current normal operating condition window.

[0036] In this application, for the normal operating condition window without pressure regulation, the outlet pressure setting value of the gas regulator corresponding to the previous normal operating condition window is used as the outlet pressure setting value of the current window. When the normal operating condition window without pressure regulation is the first normal operating condition window, there is no preceding normal operating condition window. In this case, this solution directly calculates the outlet pressure data using kernel density estimation, and uses the mode obtained as the gas regulator outlet pressure setting value for the current normal operating condition window.

[0037] Furthermore, step S31 specifically includes:

[0038] S311. Process the operating data within the current normal operating condition window based on the improved box plot method, and mark outliers and 0 values; the improved box plot method determines the upper and lower limits using the following formula:

[0039] If MC≥0:

[0040] ;

[0041] ;

[0042] If MC < 0:

[0043] ;

[0044] ;

[0045] Where: MC is the skewness; Q1 is the first quartile; Q3 is the third quartile; IQR is the interquartile range; exp() represents the exp function; a and b are coefficients;

[0046] S312. Calculate the mean of the unmarked values ​​in the running data within the current normal operating condition window, and replace the marked outliers and 0 values ​​with the mean of the unmarked values.

[0047] This plan clearly defines the specific methods for preprocessing runtime data.

[0048] During their research, the inventors discovered that the outlet pressure in the operational data exhibited a significant right-skewed distribution. Traditional box plots, due to their symmetry assumptions, often misclassified many normal values ​​on the right side as abnormal. Therefore, this solution creatively proposes an improved box plot method for gas pressure regulator operational data. Compared to the standard box plot, it corrects the setting range of the upper and lower limits; specifically, it widens the upper limit and tightens the lower limit for right-skewed distributions, making outlier detection more consistent with actual distribution characteristics. The coefficients a and b can be determined in advance based on historical data.

[0049] This solution analyzes each normal operating condition window using an improved box plot method, marking outliers and zero values ​​that fall outside the normal range of that window. Then, using the unmarked values ​​(i.e., normal values) within the window, the mean of the normal values ​​is calculated. This mean of the normal values ​​replaces the outliers and zero values ​​marked by the improved box plot method. This completes the preprocessing of the operating data.

[0050] Furthermore, step S32 specifically includes:

[0051] S321. Based on the preprocessed operating data, calculate the coefficient of variation of the outlet pressure:

[0052] If the coefficient of variation is greater than or equal to the set threshold, proceed to step S322;

[0053] If the coefficient of variation is less than the set threshold, it is determined that there is no voltage regulation behavior in the current normal operating condition window;

[0054] S322. Extract the gas pressure regulator outlet pressure characteristics corresponding to the current normal operating condition window and compare them with the empirical threshold to determine whether there is pressure regulation behavior.

[0055] In this solution, the set threshold is the threshold corresponding to the coefficient of variation. Its specific value can be adaptively set by the user according to specific needs / operating conditions, etc., and is not specifically limited here. In addition, the method for calculating the coefficient of variation is existing technology and will not be described in detail here.

[0056] Considering that data dispersion is small due to normal gas consumption fluctuations but large due to normal pressure regulation within the time window, this scheme first identifies windows with a large coefficient of variation in the regulator's outlet pressure. These windows are defined as abrupt change windows. Pressure regulation may only occur within abrupt change windows, so subsequent analysis focuses only on them. For non-abrupt change windows, it is directly determined that no pressure regulation occurs. This scheme reduces subsequent computational load by pre-screening abrupt change windows, saving computing power and improving operational efficiency.

[0057] For normal operating condition windows with a high coefficient of variation, it is necessary to further determine whether there is voltage regulation behavior within them.

[0058] Furthermore, in step S322, the process of determining whether voltage regulation behavior exists includes:

[0059] S3221. Obtain the gas regulator outlet pressure data in the current normal operating window, as well as before and after the current normal operating window;

[0060] S3222. Compare the average outlet pressure data before and after the current normal operating condition window to obtain the first pressure regulation direction; based on the trend index of the outlet pressure data in the current normal operating condition window, obtain the second pressure regulation direction; determine whether the first pressure regulation direction and the second pressure regulation direction are consistent:

[0061] If so: proceed to step S3223;

[0062] If not, there is no voltage regulation behavior during the current normal operating condition window;

[0063] S3223. Obtain the average value of the outlet pressure data within the previous 10 hours of the current normal operating condition window, and define it as the first average value;

[0064] The average value of the outlet pressure data within 5 hours after the current normal operating condition window is obtained and defined as the second average value.

[0065] The ratio is obtained by dividing the larger of the first and second means by the smaller value.

[0066] Judgment: If the ratio is between 1.0 and 1.5, proceed to step S3224; otherwise, there is no voltage regulation behavior in the current normal operating condition window.

[0067] S3224. Obtain the trend index of the outlet pressure data within the previous 10 hours of the current normal operating condition window, and define it as the first trend index;

[0068] The trend index of the outlet pressure data within 5 hours after the current normal operating condition window is obtained is defined as the second trend index.

[0069] Judgment: If the absolute value of the difference between the first trend index and the second trend index is less than 0.008, and neither the first trend index nor the second trend index is 0, then proceed to step S3225; otherwise, there is no pressure adjustment behavior in the current normal operating condition window.

[0070] S3225. Perform linear regression on the outlet pressure data within 10 hours prior to the current normal operating condition window. If the linear regression slope is less than 0.05 and the absolute value of the Pearson correlation coefficient is greater than 0.3, proceed to step S3226; otherwise, there is no pressure regulation behavior in the current normal operating condition window.

[0071] S3226. Determine whether the average pressure data in the current normal operating condition window is between the average pressure data in the 10 hours prior to the current normal operating condition window and the average pressure data in the 5 hours following the current normal operating condition window:

[0072] If so, then there is voltage regulation behavior in the current normal operating condition window;

[0073] If not, then there is no voltage regulation behavior in the current normal operating condition window.

[0074] This scheme analyzes the mean, trend index, linear correlation coefficient, and Pearson correlation coefficient of outlet pressure data within and before the corresponding time window, and combines these with empirical thresholds for each feature to determine whether actual pressure regulation occurred during the corresponding time period. The calculation of each feature value can be performed using existing algorithms, and will not be elaborated upon here.

[0075] This solution clearly defines the detailed judgment logic and steps. Through the analysis and combination of multiple features, it can accurately identify voltage regulation behavior, filling the gap in existing technology.

[0076] Furthermore, in the process of calculating the outlet pressure data within the specified time period based on the kernel density estimation method, the probability density function of the kernel density estimation method is:

[0077] ;

[0078] In the formula, The probability density function is represented by n; the number of outlet pressure data points within a specified time period is represented by h; the bandwidth is represented by K; the Gaussian kernel function is represented by i; and x represents the i-th outlet pressure data point. i Let be the export pressure corresponding to the i-th export pressure data point; x represents the point to be estimated in the probability density function.

[0079] The Gaussian kernel function is calculated using the following formula:

[0080] ;

[0081] In the formula: u is the normalized deviation, taken as .

[0082] Kernel density estimation is an existing nonparametric probability density estimation method widely used in data distribution analysis, pattern recognition, and anomaly detection. The choice of its core parameter, bandwidth, directly affects the smoothness and accuracy of the estimation: too small a bandwidth can lead to spurious peaks in the density curve, while too large a bandwidth can mask the true distribution of the data. Those skilled in the art should understand that in the probability density function of kernel density estimation, the point to be estimated, x, is the independent variable of the probability density function, and the normalized bias u represents the standardized distance in the probability density function.

[0083] This scheme uses a Gaussian kernel function to correct the actual bandwidth, and the smoothness can be fine-tuned according to actual needs, which improves the flexibility and adaptability of this method.

[0084] Compared with the prior art, the present invention has at least the following advantages and beneficial effects:

[0085] 1. This invention provides a method for determining the outlet pressure setpoint of a gas pressure regulator based on online monitoring data. This method can directly determine the outlet pressure setpoint of the gas pressure regulator for all time windows after the first normal operating window using the gas pressure regulator's operating data. Compared to the existing technology that relies on manual inspection, this method achieves online monitoring of the regulator's outlet pressure setpoint, which is beneficial for real-time feedback of characteristic values ​​such as pressure stabilization accuracy, shut-off pressure accuracy, and outlet pressure deviation index, ensuring the normal and safe operation of the gas pressure regulator. Simultaneously, it facilitates automatic judgment of operating conditions and pressure regulation behavior in the background, reducing manual intervention and improving decision-making efficiency.

[0086] 2. The present invention provides a method for determining the outlet pressure setpoint of a gas pressure regulator based on online monitoring data. It clearly defines the characteristic threshold for judging whether a certain time window belongs to an abnormal operating condition window, which is beneficial for quickly classifying each time window.

[0087] 3. The present invention provides a method for determining the outlet pressure setpoint of a gas pressure regulator based on online monitoring data. It proposes an improved box plot method for gas pressure regulator operating data, which corrects the setting range of the upper and lower limits compared to the standard box plot, making the detection of outliers more consistent with the actual distribution characteristics.

[0088] 4. The present invention provides a method for determining the outlet pressure setpoint of a gas pressure regulator based on online monitoring data. By using the coefficient of variation to pre-screen the normal operating window, the amount of subsequent calculations can be reduced, thereby saving computing power costs and improving operating efficiency.

[0089] 5. The present invention provides a method for determining the outlet pressure setpoint of a gas pressure regulator based on online monitoring data. By analyzing the mean, trend index, linear correlation coefficient, Pearson correlation coefficient, and other characteristic values ​​of the outlet pressure data within and before and after the corresponding time window, and combining the empirical thresholds of each characteristic, it determines whether actual pressure regulation behavior occurs in the corresponding time period, thus filling the gap in the prior art.

[0090] 6. The present invention provides a method for determining the outlet pressure setpoint of a gas pressure regulator based on online monitoring data. It uses a Gaussian kernel function to correct the actual bandwidth, and the smoothness can be finely adjusted according to actual needs, thereby improving the flexibility and adaptability of the method. Attached Figure Description

[0091] The accompanying drawings, which are included to provide a further understanding of embodiments of the invention and form part of this application, do not constitute a limitation thereof. In the drawings:

[0092] Figure 1 This is a flowchart illustrating a specific embodiment of the present invention;

[0093] Figure 2 This is a flowchart illustrating the process of determining whether voltage regulation behavior exists in the current normal operating condition window in a specific embodiment of the present invention. Detailed Implementation

[0094] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention.

[0095] Example 1:

[0096] A method for determining the outlet pressure setpoint of a gas pressure regulator based on online monitoring data, such as... Figure 1 As shown, it includes the following steps:

[0097] Step S1: Monitor and acquire the operating data of the gas pressure regulator online, and divide the operating data into several time windows based on the sliding window method. The operating data includes: the outlet pressure of the gas pressure regulator, the instantaneous flow rate, and the acquisition time.

[0098] Step S2: Classify each time window into normal operating condition windows and abnormal operating condition windows.

[0099] The specific classification method is as follows:

[0100] S21. Obtain historical operating data of the gas pressure regulator;

[0101] S22. Based on the historical operating data, extract the outlet pressure and instantaneous flow rate of the gas pressure regulator corresponding to abnormal operating conditions; the abnormal operating conditions include shutdown for maintenance, equipment failure, and fluctuations in upstream gas supply; the equipment failure is preferably a sensor failure.

[0102] S23. Based on the outlet pressure and instantaneous flow rate of the gas pressure regulator corresponding to the abnormal operating condition, obtain the abnormal operating condition criterion. In this embodiment, the abnormal operating condition criterion is that if a certain time window meets any of the following conditions, it is considered an abnormal operating condition window:

[0103] The outlet pressure within this time window has a continuous 0 value or a missing value for more than 1 hour;

[0104] The instantaneous flow rate within this window has consecutive 0 values ​​or missing values ​​greater than 1 hour;

[0105] The number of times the outlet pressure is 0 within this time window is greater than 60%;

[0106] The number of points with an instantaneous flow rate of 0 within this time window is greater than 60%.

[0107] S24. Based on the abnormal operating condition criteria, determine whether each time window is an abnormal operating condition window.

[0108] Step S3: Starting from the first normal operating window, determine the gas regulator outlet pressure setting value for each subsequent time window in sequence according to the time sequence using the following method.

[0109] For the time window of normal operating conditions, the corresponding gas pressure regulator outlet pressure setpoint is calculated based on the operating data. The specific method is as follows:

[0110] S31. Preprocess the operating data within the current normal operating condition window.

[0111] The preprocessing method in this embodiment is as follows:

[0112] S311. Process the operating data within the current normal operating condition window based on the improved box plot method, and mark outliers and 0 values; the improved box plot method determines the upper and lower limits using the following formula:

[0113] If MC≥0:

[0114] ;

[0115] ;

[0116] If MC < 0:

[0117] ;

[0118] ;

[0119] Where: MC is the skewness; Q1 is the first quartile; Q3 is the third quartile; IQR is the interquartile range; exp() represents the exp function; a and b are coefficients;

[0120] S312. Calculate the mean of the unmarked values ​​in the running data within the current normal operating condition window, and replace the marked outliers and 0 values ​​with the mean of the unmarked values.

[0121] S32. Based on the preprocessed operating data, determine whether there is voltage regulation behavior in the current normal operating window.

[0122] S33. For a normal operating window with pressure regulation behavior: obtain the outlet pressure data within a specified time after the pressure regulation behavior occurs, calculate the outlet pressure data within the specified time based on the kernel density estimation method, and use the obtained mode as the gas regulator outlet pressure setting value for the current normal operating window.

[0123] For normal operating conditions without pressure regulation: the gas regulator outlet pressure setting value corresponding to the previous normal operating conditions window is used as the gas regulator outlet pressure setting value for the current normal operating conditions window without pressure regulation.

[0124] If the normal operating condition window without pressure regulation is the first normal operating condition window, then its gas regulator outlet pressure setting value is calculated in the same way as in step S33; that is, based on the kernel density estimation method, all outlet pressure data in the current normal operating condition window are calculated, and the mode obtained is used as the gas regulator outlet pressure setting value of the current normal operating condition window.

[0125] For abnormal operating condition windows, the gas regulator outlet pressure setting value corresponding to the previous normal operating condition window is used as the gas regulator outlet pressure setting value for the current abnormal operating condition window.

[0126] In this embodiment, during the calculation of the outlet pressure data within the specified time period based on the kernel density estimation method, the probability density function of the kernel density estimation method is:

[0127] ;

[0128] In the formula, The probability density function is represented by n; the number of outlet pressure data points within a specified time period is represented by h; the bandwidth is represented by K; the Gaussian kernel function is represented by i; and x represents the i-th outlet pressure data point. i Let be the export pressure corresponding to the i-th export pressure data point; x represents the point to be estimated in the probability density function.

[0129] The Gaussian kernel function is calculated using the following formula:

[0130] ;

[0131] In the formula: u is the normalized deviation, taken as .

[0132] Preferably, in this embodiment, the bandwidth h = 1.5.

[0133] Example 2:

[0134] A method for determining the outlet pressure setpoint of a gas pressure regulator based on online monitoring data, building upon Example 1, includes a specific method in step S32 for determining whether pressure regulation behavior exists within the current normal operating window based on preprocessed operating data, as follows: Figure 2 As shown, it includes the following steps:

[0135] Step S321: Based on the preprocessed operating data, calculate the coefficient of variation of the outlet pressure:

[0136] If the coefficient of variation is greater than or equal to the set threshold, proceed to step S322;

[0137] If the coefficient of variation is less than the set threshold, it is determined that there is no voltage regulation behavior in the current normal operating condition window;

[0138] Step S322: Extract the outlet pressure characteristics of the gas pressure regulator corresponding to the current normal operating condition window and compare them with an empirical threshold to determine whether pressure regulation behavior exists. The specific process is as follows:

[0139] Step S3221: Obtain the gas regulator outlet pressure data in the current normal operating condition window, as well as before and after the current normal operating condition window;

[0140] Step S3222: Compare the average outlet pressure data before and after the current normal operating condition window to obtain the first pressure regulation direction; based on the trend index of the outlet pressure data in the current normal operating condition window, obtain the second pressure regulation direction; determine whether the first pressure regulation direction and the second pressure regulation direction are consistent:

[0141] If so: proceed to step S3223;

[0142] If not, there is no voltage regulation behavior during the current normal operating condition window;

[0143] Step S3223: Obtain the average value of the outlet pressure data within the previous 10 hours of the current normal operating condition window, and define it as the first average value;

[0144] The average value of the outlet pressure data within 5 hours after the current normal operating condition window is obtained and defined as the second average value.

[0145] The ratio is obtained by dividing the larger of the first and second means by the smaller value.

[0146] Judgment: If the ratio is between 1.0 and 1.5, proceed to step S3224; otherwise, there is no voltage regulation behavior in the current normal operating condition window.

[0147] Step S3224: Obtain the trend index of the outlet pressure data within the previous 10 hours of the current normal operating condition window, and define it as the first trend index;

[0148] The trend index of the outlet pressure data within 5 hours after the current normal operating condition window is obtained is defined as the second trend index.

[0149] Judgment: If the absolute value of the difference between the first trend index and the second trend index is less than 0.008, and neither the first trend index nor the second trend index is 0, then proceed to step S3225; otherwise, there is no pressure adjustment behavior in the current normal operating condition window.

[0150] Step S3225: Perform linear regression on the outlet pressure data within 10 hours prior to the current normal operating condition window. If the linear regression slope is less than 0.05 and the absolute value of the Pearson correlation coefficient is greater than 0.3, proceed to step S3226; otherwise, there is no pressure regulation behavior in the current normal operating condition window.

[0151] Step S3226: Determine whether the average pressure data in the current normal operating condition window is between the average pressure data in the 10 hours prior to the current normal operating condition window and the average pressure data in the 5 hours following the current normal operating condition window.

[0152] If so, then there is voltage regulation behavior in the current normal operating condition window;

[0153] If not, then there is no voltage regulation behavior in the current normal operating condition window.

[0154] Example 3:

[0155] A method for determining the outlet pressure setpoint of a gas pressure regulator based on online monitoring data is described in this embodiment, which uses a total of 21 gas pressure regulators of different types and different years of operation from several stations of a gas company.

[0156] The outlet pressure and instantaneous flow data of the gas pressure regulators used were all obtained from the gas company's SCADA system (Data Acquisition and Monitoring Control System). The operating data was read every five minutes, resulting in 288 sets of data per day. Since the operating years of each gas pressure regulator are not the same, this embodiment collected data from each gas pressure regulator for 9 to 15 months. During the data collection period, 10 gas pressure regulators exhibited pressure regulation behavior, while the other 11 did not. The operating data of these 21 gas pressure regulators included normal operation, shutdown for maintenance, sensor failure, upstream gas flow fluctuations, and pressure regulation conditions. The operating data from 14 gas pressure regulators was used as a reference dataset, and the operating data from 7 gas pressure regulators was used as a test set.

[0157] In this embodiment, the sliding window size is set to 72 and the step size to 24, meaning that each time window contains a time period of 6 hours and the sliding step size is 2 hours. These sliding window parameters were obtained through multiple analyses and adjustments, and can maintain a high calculation rate without affecting the feature value analysis within the window.

[0158] This embodiment uses operational data within a normal operating condition window as a sample for preprocessing. The sample contains 8640 data points. After processing using the improved boxplot method, 28 outliers were identified, accounting for 0.32% of the total data. The quartile parameters are: Q1=0.3340, Q3=0.3520, IQR=0.0180. The data is concentrated between 0.33 and 0.35. The MedCouple skewness (MC) is 0.5556, significantly greater than 0.1, indicating a right-skewed (positively skewed) distribution. Histogram verification shows that the data frequency distribution and the skewness (MC) indicate a right-skewed (positively skewed) distribution, consistent with the results. The lower boundary of the improved boxplot is 0.3301, and the upper boundary is 0.6012.

[0159] The operating condition identification results for all time windows of the operating data of 14 gas pressure regulators (samples 1-14 in Table 1) in this embodiment are shown in Table 1. The values ​​in Table 1 represent the number of corresponding time windows. It should be noted that in Table 1, abnormal operating conditions are divided into shutdown for maintenance, sensor failure, and upstream gas flow fluctuations; "normal operating condition" in Table 1 refers to the normal operating condition window without pressure regulation behavior, and "pressure regulation" in Table 1 refers to the normal operating condition window with pressure regulation behavior.

[0160] Table 1. Operating condition identification results for all time windows.

[0161]

[0162] This embodiment uses a reference dataset to test the undetermined coefficients a and b in the improved box plot calculation formula, ensuring that the values ​​of a and b are such that the upper and lower limits of the improved box plot method can distinguish 90% of outliers. a=3.5, b=4.

[0163] This embodiment uses actual data from four on-site gas pressure regulators to verify the method of this application. The verification results are shown in Table 2:

[0164] Table 2 Validation Results

[0165]

[0166] A total of 20 pressure regulation tests were conducted on the four gas pressure regulators mentioned above. As shown in Table 2, the method of this application successfully identified 19 of these pressure regulation behaviors; the only instance where a pressure regulation behavior was not identified was because the regulator had been shut down for more than an hour before the regulation, causing the method to fail to detect the regulation at that location. Therefore, the accuracy rate of this application in identifying pressure regulation behavior is at least 95%.

[0167] Furthermore, as can be seen from Table 2, the relative error between the outlet pressure setpoint determined by the method of this application and the field recorded value is controlled within ±2.5%, which proves that the method of this application has extremely high accuracy in determining the outlet pressure setpoint.

[0168] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

[0169] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

Claims

1. A method for determining the outlet pressure setpoint of a gas pressure regulator based on online monitoring data, characterized in that, Includes the following steps: S1. Monitor and acquire the operating data of the gas pressure regulator online, and divide the operating data into several time windows based on the sliding window method; S2. Classify each time window into normal operating condition windows and abnormal operating condition windows; S3. Taking the first normal operating window as the starting point, determine the gas regulator outlet pressure setpoint for each subsequent time window according to the time sequence using the following method: For the normal operating window, the corresponding gas pressure regulator outlet pressure setting value is calculated based on the operating data; For abnormal operating condition windows, the gas regulator outlet pressure setting value corresponding to the previous normal operating condition window is used as the gas regulator outlet pressure setting value for the current abnormal operating condition window. The method for calculating the corresponding gas pressure regulator outlet pressure setpoint based on the aforementioned operating data includes the following steps: S31. Preprocess the operating data within the current normal operating condition window; S32. Based on the preprocessed operating data, determine whether there is voltage regulation behavior in the current normal operating condition window; S33. For a normal operating window with pressure regulation behavior: obtain the outlet pressure data within a specified time after the pressure regulation behavior occurs, calculate the outlet pressure data within the specified time based on the kernel density estimation method, and use the obtained mode as the gas regulator outlet pressure setting value for the current normal operating window. For normal operating conditions without pressure regulation: the gas regulator outlet pressure setting value corresponding to the previous normal operating conditions window is used as the gas regulator outlet pressure setting value for the current normal operating conditions window without pressure regulation. In step S33, if the normal operating condition window without pressure regulation behavior is the first normal operating condition window, then based on the kernel density estimation method, all outlet pressure data in the current normal operating condition window are calculated, and the mode obtained is used as the gas regulator outlet pressure setting value of the current normal operating condition window.

2. The method for determining the outlet pressure setpoint of a gas pressure regulator based on online monitoring data according to claim 1, characterized in that, The operational data includes: the outlet pressure of the gas pressure regulator, instantaneous flow rate, and acquisition time.

3. The method for determining the outlet pressure setpoint of a gas pressure regulator based on online monitoring data according to claim 1, characterized in that, Step S2 specifically includes: S21. Obtain historical operating data of the gas pressure regulator; S22. Based on the historical operating data, extract the outlet pressure and instantaneous flow rate of the gas pressure regulator corresponding to abnormal operating conditions; the abnormal operating conditions include shutdown for maintenance, equipment failure, and fluctuations in upstream gas supply; S23. Based on the outlet pressure and instantaneous flow rate of the gas pressure regulator corresponding to the abnormal operating condition, obtain the abnormal operating condition criterion; S24. Based on the abnormal operating condition criteria, determine whether each time window is an abnormal operating condition window.

4. The method for determining the outlet pressure setpoint of a gas pressure regulator based on online monitoring data according to claim 3, characterized in that, The abnormal operating condition criterion is that a time window is considered an abnormal operating condition window if it meets any of the following conditions: The outlet pressure within this time window has a continuous 0 value or a missing value for more than 1 hour; The instantaneous flow rate within this window has consecutive 0 values ​​or missing values ​​greater than 1 hour; The number of times the outlet pressure is 0 within this time window is greater than 60%; The number of points with an instantaneous flow rate of 0 within this time window is greater than 60%.

5. The method for determining the outlet pressure setpoint of a gas pressure regulator based on online monitoring data according to claim 1, characterized in that, Step S31 specifically includes: S311. Process the operating data within the current normal operating condition window based on the improved box plot method, and mark outliers and 0 values; the improved box plot method determines the upper and lower limits using the following formula: If MC≥0: ; ; If MC < 0: ; ; Where: MC is the skewness; Q1 is the first quartile; Q3 is the third quartile; IQR is the interquartile range; exp() represents the exp function; a and b are coefficients; S312. Calculate the mean of the unmarked values ​​in the running data within the current normal operating condition window, and replace the marked outliers and 0 values ​​with the mean of the unmarked values.

6. The method for determining the outlet pressure setpoint of a gas pressure regulator based on online monitoring data according to claim 1, characterized in that, Step S32 specifically includes: S321. Based on the preprocessed operating data, calculate the coefficient of variation of the outlet pressure: If the coefficient of variation is greater than or equal to the set threshold, proceed to step S322; If the coefficient of variation is less than the set threshold, it is determined that there is no voltage regulation behavior in the current normal operating condition window; S322. Extract the gas pressure regulator outlet pressure characteristics corresponding to the current normal operating condition window and compare them with the empirical threshold to determine whether there is pressure regulation behavior.

7. The method for determining the outlet pressure setpoint of a gas pressure regulator based on online monitoring data according to claim 6, characterized in that, In step S322, the process of determining whether voltage regulation behavior exists includes: S3221. Obtain the gas regulator outlet pressure data in the current normal operating window, as well as before and after the current normal operating window; S3222. Compare the average outlet pressure data before and after the current normal operating condition window to obtain the first pressure regulation direction; based on the trend index of the outlet pressure data in the current normal operating condition window, obtain the second pressure regulation direction; determine whether the first pressure regulation direction and the second pressure regulation direction are consistent: If so: proceed to step S3223; If not, there is no voltage regulation behavior during the current normal operating condition window; S3223. Obtain the average value of the outlet pressure data within the previous 10 hours of the current normal operating condition window, and define it as the first average value; The average value of the outlet pressure data within 5 hours after the current normal operating condition window is obtained and defined as the second average value. The ratio is obtained by dividing the larger of the first and second means by the smaller value. Judgment: If the ratio is between 1.0 and 1.5, proceed to step S3224; otherwise, there is no voltage regulation behavior in the current normal operating condition window. S3224. Obtain the trend index of the outlet pressure data within the previous 10 hours of the current normal operating condition window, and define it as the first trend index; The trend index of the outlet pressure data within 5 hours after the current normal operating condition window is obtained is defined as the second trend index. Judgment: If the absolute value of the difference between the first trend index and the second trend index is less than 0.008, and neither the first trend index nor the second trend index is 0, then proceed to step S3225; otherwise, there is no pressure adjustment behavior in the current normal operating condition window. S3225. Perform linear regression on the outlet pressure data within 10 hours prior to the current normal operating condition window. If the linear regression slope is less than 0.05 and the absolute value of the Pearson correlation coefficient is greater than 0.3, proceed to step S3226; otherwise, there is no pressure regulation behavior in the current normal operating condition window. S3226. Determine whether the average pressure data in the current normal operating condition window is between the average pressure data in the 10 hours prior to the current normal operating condition window and the average pressure data in the 5 hours following the current normal operating condition window: If so, then there is voltage regulation behavior in the current normal operating condition window; If not, then there is no voltage regulation behavior in the current normal operating condition window.

8. The method for determining the outlet pressure setpoint of a gas pressure regulator based on online monitoring data according to claim 1, characterized in that, In the process of calculating the outlet pressure data within the specified time period based on the kernel density estimation method, the probability density function of the kernel density estimation method is: ; In the formula, The probability density function is represented by n; the number of outlet pressure data points within a specified time period is represented by h; the bandwidth is represented by K; the Gaussian kernel function is represented by i; and x represents the i-th outlet pressure data point. i Let be the export pressure corresponding to the i-th export pressure data point; x represents the point to be estimated in the probability density function. The Gaussian kernel function is calculated using the following formula: ; In the formula: u is the normalized deviation, taken as .