A hydrogen-blended natural gas control system and method based on data analysis
Through data preprocessing, feature extraction, time series modeling and dynamic adjustment, the hydrogen-blended natural gas control system is optimized, which solves the problem that the existing system cannot respond to environmental changes in a timely manner and achieves high-precision hydrogen blending ratio prediction and system adaptability.
Patent Information
- Application Number
- CN202510002354.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-02
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-01-02
AI Technical Summary
The existing hydrogen-blended natural gas control system based on data analysis lacks automation and real-time performance, and is unable to respond to environmental and demand changes in a timely manner, resulting in untimely adjustment of the hydrogen blending ratio, affecting system performance and economic benefits.
Through data preprocessing, feature extraction, time series modeling, and dynamic adjustment, we optimize the time series data processing during the hydrogen blending process. Data preprocessing involves interpolation to replace outliers and normalization. Feature extraction utilizes convolution kernels to capture short-term fluctuations in gas flow and pressure. Time series modeling captures long-term dependencies, and dynamic adjustment corrects for deviations in real time to generate optimized hydrogen blending ratio forecasts.
The prediction accuracy of hydrogen blending ratio has been improved, the system's adaptability and responsiveness to complex environmental changes have been enhanced, and the stability and environmental friendliness of energy supply have been ensured.
Smart Images

Figure CN119846964B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of control systems, and in particular to a hydrogen-blended natural gas control system and method based on data analysis. Background Art
[0002] The field of control systems technology focuses on the design, implementation, and optimization of systems for automated control. This field involves using mathematical models and algorithms to control the behavior of devices or processes to achieve desired performance objectives. Control systems are widely used in industries such as industrial production, aerospace, transportation, and robotics, aiming to improve system efficiency, stability, and safety. With advances in computer technology and data processing capabilities, modern control systems have become increasingly intelligent, automated, and real-time, utilizing sensors, actuators, and feedback mechanisms to precisely regulate complex systems.
[0003] The data-analysis-based hydrogen-blended natural gas control system uses advanced control algorithms to regulate and optimize the hydrogen blending process through real-time monitoring and analysis of the hydrogen blending ratio in natural gas. This system's primary purpose is to optimize the energy mix, enhance the environmental and economic efficiency of natural gas use, and ensure the stability and security of the natural gas supply. Through data analysis, the system dynamically adjusts the hydrogen blending ratio based on varying operating conditions to accommodate varying needs and environmental conditions.
[0004] Existing technologies lack automation and real-time performance in data processing and system control. Traditional systems rely on manual intervention in abnormal data processing and lack automatic detection and supplementation mechanisms, resulting in missing data or the inability to correct abnormal values in a timely manner, affecting prediction accuracy. The feature extraction and modeling parts fail to fully capture long-term trends and ignore the long-term dependencies between data, resulting in the system being unable to adapt to environmental and demand fluctuations in real time. Traditional methods usually rely on fixed rules to adjust the hydrogen blending ratio and are unable to make timely optimizations when the load or environment changes, resulting in the system being unable to balance energy demand and emission targets. For example, when climate conditions or demand change, the existing system is difficult to respond quickly, resulting in untimely adjustments to the hydrogen blending ratio, affecting system performance and economic benefits. Summary of the Invention
[0005] The purpose of the present invention is to solve the shortcomings of the prior art and to propose a hydrogen-blended natural gas control system and method based on data analysis.
[0006] In order to achieve the above objectives, the present invention adopts the following technical solutions: A hydrogen-blended natural gas control system based on data analysis includes:
[0007] The data preprocessing module collects raw hydrogen-blended natural gas process data, segments the gas flow, pressure, and temperature parameters in chronological order, calculates the average value and the maximum and minimum values within each time period, identifies data anomalies and interpolates and replaces them, calculates the change amplitude of adjacent time periods and standardizes all data, performs time series interpolation to fill in missing data, and generates standardized time series data;
[0008] The feature extraction module divides the sequence into time windows based on the standardized time series data, inputs the data of multiple time windows into the convolution kernel for calculation, extracts the short-term fluctuations and change amplitudes of gas flow and pressure, completes the vector construction of local features of the time series, and normalizes the time window features to generate local feature vectors;
[0009] The time series modeling module analyzes the trend within the time window based on the local feature vector, calculates the long-term dependency between time series, gradually transfers the hidden state to calculate the changes in adjacent time periods, predicts the long-term trend, captures the dependency of time series through recursion, and generates a time series dependency model;
[0010] The prediction optimization module calculates the expected value of the hydrogen blending ratio based on the time series dependency model, constrains the energy demand, carbon emissions, stability indicators and the hydrogen blending ratio, adjusts the ratio value and applies the constraint conditions to the predicted value, performs iterative correction, and generates an optimized hydrogen blending ratio prediction;
[0011] The dynamic adjustment module monitors the deviation between the real-time feedback data and the predicted value based on the optimized hydrogen blending ratio prediction, analyzes the deviation trend and corrects the prediction model parameters, recalculates the hydrogen blending ratio, updates the adjusted parameters, applies them to the current prediction results, and generates a dynamically adjusted hydrogen blending ratio prediction.
[0012] The standardized time series data includes time series data, outlier processing results, and missing data filling results; the local feature vectors include gas flow characteristics, pressure change characteristics, and short-term fluctuation characteristics; the time series dependency model includes time period hidden state, long-term trend capture, and time series recursive relationship; the optimized hydrogen blending ratio prediction includes energy demand adjustment results, carbon emission optimization results, and stability balance results; the dynamically adjusted hydrogen blending ratio prediction includes feedback deviation correction results, adjusted parameters, and updated prediction results.
[0013] As a further solution of the present invention, the step of obtaining the normalized time series data is specifically as follows:
[0014] Collect the original hydrogen-blended natural gas process data, and divide the gas flow, pressure, and temperature parameters in the time series into multiple intervals according to time. Calculate the average, maximum, and minimum values of the gas flow, pressure, and temperature in each time interval to obtain a statistical parameter set.
[0015] Based on the statistical parameter set, setting an outlier threshold and identifying data points exceeding the threshold, replacing the outlier data points by a linear interpolation method, and generating an interpolated statistical parameter set;
[0016] The statistical parameter set after the interpolation process is used to calculate the variation range of gas flow, pressure and temperature in adjacent time intervals using the formula:
[0017]
[0018] Perform standardization processing and calculate and generate a standardized set of change amplitudes;
[0019] Among them, S i represents the standardized change in the i-th interval, X i+1 represents the gas parameter value in the i+1th time interval, X i represents the gas parameter value in the i-th time interval, is the mean of the gas parameters in all intervals, n is the total number of intervals, ω is the weighting factor, γ is the variance adjustment coefficient, and δ is the stabilization increment;
[0020] Combined with the standardized set of change amplitudes, a time series interpolation method is applied to complete the missing data, and the completed data is merged with the standardized change amplitudes to obtain a standardized time series data set.
[0021] As a further solution of the present invention, the step of obtaining the local feature vector is specifically as follows:
[0022] Dividing the normalized time series data into multiple subsequences according to fixed time windows, extracting the change values of gas flow and pressure for each subsequence, and obtaining a time window change amplitude set by calculating the difference of the parameters within each time window;
[0023] Using the time window change amplitude set, the data of multiple time windows are input into the convolution kernel, the local response value of the convolution kernel to each window is calculated, and the weight and relative change ratio are combined for processing, using the formula:
[0024]
[0025] Extract local change features and generate a set of local eigenvalues;
[0026] Among them, F iis the local eigenvalue of the i-th time window, W k is the kth convolution kernel weight, V i+k and V i are the gas parameter values of the i+kth and ith time windows respectively, α is the enhancement index, γ is the variance adjustment coefficient, is the mean of the gas parameters in all time windows, m is the total number of time windows, δ is the stabilization increment, η is the maximum value adjustment coefficient, and max(V) is the maximum value of the gas parameter in the time window;
[0027] The local eigenvalue sets are integrated into eigenvectors according to the time window sequence, and normalized to generate local eigenvectors.
[0028] As a further solution of the present invention, the step of acquiring the timing dependency model is specifically as follows:
[0029] Based on the local feature vector, the time window is divided and the local feature values of multiple windows are extracted, the trend change rate in each time window is calculated, and the trend change rate and the time window sequence are combined to obtain a trend sequence set;
[0030] Based on the trend sequence set, the trend cumulative effect between time windows is analyzed, and the hidden state value is gradually transferred using the formula:
[0031]
[0032] Calculate the long-term dependencies between adjacent time windows and generate a sequence of hidden state values;
[0033] Among them, H t is the hidden state value of the t-th time window, φ i is the weight of the i-th time window, T t-i Represents the trend change value of the ti time window, T t represents the trend change value of the t-th time window, ψ is the long-term dependence adjustment coefficient, ω k is the short-term adjustment coefficient, γ j is the variance adjustment factor, is the trend mean, δ is the stabilization parameter, and η is the offset parameter;
[0034] Combined with the hidden state value sequence, the dependency relationship between time series is recursively calculated, the long-term dependency of multiple time windows is cumulatively analyzed, and the dependency relationship of multiple windows is integrated to generate a temporal dependency model.
[0035] As a further solution of the present invention, the steps for obtaining the predicted optimized hydrogen doping ratio are specifically as follows:
[0036] Using the time series dependency model, energy demand, carbon emissions, and stability index parameters are input, and the expected value of the hydrogen blending ratio in each window is calculated based on the time window sequence. The constraints are analyzed and the results are integrated to generate a ratio constraint set.
[0037] Based on the ratio constraint set, the hydrogen blending ratio is gradually adjusted and the constraints are applied, using the formula:
[0038]
[0039] Calculate and generate a corrected set of proportional values;
[0040] Among them, P t is the corrected hydrogen ratio in the tth time window, λ i is the weight of the i-th window, E t-i is the energy demand of the ti window, S t is the stability index of the t-th window, α is the stability adjustment coefficient, C t is the carbon emission value of the tth window, γ is the carbon emission weight, β j is the variance adjustment factor, is the mean value of hydrogen doping ratio, δ is the stabilization parameter, ∈ is the energy demand adjustment coefficient, and max(E) is the maximum energy demand value;
[0041] The corrected ratio value set is used to recursively adjust the ratio value of each time window, and the correction results are integrated with the time window constraints and energy, emission, and stability requirements to generate an optimized hydrogen blending ratio prediction.
[0042] As a further solution of the present invention, the steps for obtaining the dynamically adjusted hydrogen blending ratio prediction are specifically as follows:
[0043] Based on the optimized hydrogen blending ratio prediction, real-time feedback data is collected and the deviation between the feedback data and the predicted value is calculated, the deviation is integrated according to the time window, and the deviation change trend is calculated to generate a deviation trend set;
[0044] Based on the deviation trend set, the deviation variation pattern between time windows is analyzed and the model parameters are corrected using the formula:
[0045]
[0046] Adjust parameter values to generate a revised model parameter set;
[0047] Among them, θ t is the model parameter after adjustment in the t-th time window, θ t-1 is the model parameter of the previous time window, λ i is the weight coefficient, D t-iis the deviation value of the ti-th window, Δ t is the cumulative deviation, φ is the deviation adjustment coefficient, β j is the variance adjustment factor, is the mean deviation, δ is the stabilization parameter, ∈ is the deviation amplitude adjustment coefficient, max(D) is the maximum deviation, n represents the number of previous time windows used for deviation calculation, and m represents the number of previous time windows used for variance calculation;
[0048] The hydrogen blending ratio value is recalculated and adjusted using the revised model parameter set, and the revised ratio value is applied to the prediction result of the current time window to generate a dynamically adjusted hydrogen blending ratio prediction.
[0049] A method for regulating hydrogen-blended natural gas based on data analysis is provided. The method is executed based on the aforementioned hydrogen-blended natural gas regulation system based on data analysis and comprises the following steps:
[0050] S1: Collect the original hydrogen-blended natural gas process data, divide the gas flow, pressure, and temperature parameters into time periods in chronological order, calculate the average, maximum, and minimum values of the gas flow, pressure, and temperature in each time period, identify abnormal values and perform interpolation replacement, calculate the change range of adjacent time periods and standardize the data to generate standardized time series data;
[0051] S2: Based on the standardized time series data, the data is divided into set time windows, and the data of each time window is sent to the convolution kernel for calculation, the short-term fluctuations and change amplitudes of the gas flow and pressure are extracted, and the local feature vector is constructed;
[0052] S3: Based on the local feature vector, analyze the trend in the time window, calculate the long-term dependency between time series, gradually transfer the hidden state, calculate the changes in adjacent time periods, capture the time series dependency, and generate a time series dependency model;
[0053] S4: Based on the time series dependency model, calculate the expected value of the hydrogen blending ratio, adjust the hydrogen blending ratio in combination with the constraints including energy demand, carbon emissions, and stability, apply the constraints to the predicted value for iterative correction, and generate an optimized hydrogen blending ratio prediction;
[0054] S5: Based on the optimized hydrogen blending ratio prediction, real-time monitoring of the deviation between the feedback data and the predicted value, analyzing the deviation trend, correcting the prediction model parameters, recalculating the hydrogen blending ratio, updating the adjusted parameters, and generating a dynamically adjusted hydrogen blending ratio prediction;
[0055] S6: Based on the dynamically adjusted hydrogen blending ratio prediction, combined with real-time feedback data, difference analysis and trend adjustment are performed to monitor real-time changes in the hydrogen blending ratio, and the hydrogen blending ratio is iteratively optimized according to demand and stability requirements to generate an optimized hydrogen blending ratio value.
[0056] Compared with the prior art, the advantages and positive effects of the present invention are:
[0057] In the present invention, the time series data processing and control in the process of hydrogen-blended natural gas are optimized through steps such as data preprocessing, local feature extraction, time series modeling, and dynamic adjustment. In the feature extraction stage, the convolution kernel is used to extract short-term fluctuations in gas flow and pressure to generate local feature vectors, providing accurate input for time series modeling. Time series modeling captures trend changes based on long-term dependencies, establishes a stable time series model, and improves the accuracy of hydrogen blending ratio prediction. In the prediction optimization stage, the ratio is adjusted under the constraints of energy demand, carbon emissions, and other targets to perform multi-objective optimization. In the dynamic adjustment stage, deviations are corrected in real time to ensure system adaptability and flexibility. The optimization of multiple links enhances the responsiveness of the model and improves its adaptability to complex environmental changes. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 is a system flow chart of the present invention;
[0059] Figure 2 This is a flow chart of the steps for obtaining time series data after normalization processing of the present invention;
[0060] Figure 3 Flowchart of the steps for obtaining the local feature vector of the present invention;
[0061] Figure 4 Flowchart of the steps for obtaining the timing dependency model of the present invention;
[0062] Figure 5 Flow chart of the steps for obtaining the predicted optimized hydrogen blending ratio of the present invention;
[0063] Figure 6 This is a flow chart of the steps for obtaining the prediction of the dynamically adjusted hydrogen blending ratio according to the present invention. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0065] In the description of the present invention, it should be understood that the terms "length," "width," "up," "down," "front," "back," "left," "right," "vertical," "horizontal," "top," "bottom," "inside," "outside," and the like, indicating positions or relationships, are based on the positions or relationships shown in the accompanying drawings and are intended only to facilitate the description of the present invention and simplify the description. They do not indicate or imply that the devices or elements referred to must have a specific orientation, be constructed, or operate in a specific orientation. Therefore, they should not be construed as limiting the present invention. Furthermore, in the description of the present invention, "plurality" means two or more, unless otherwise expressly and specifically defined.
[0066] Example 1
[0067] See also Figure 1 The present invention provides a technical solution: a hydrogen-blended natural gas control system based on data analysis, comprising:
[0068] The data preprocessing module collects raw hydrogen-blended natural gas process data, segments the gas flow, pressure, and temperature parameters in chronological order, calculates the average value and the maximum and minimum values within each time period, identifies data anomalies and interpolates and replaces them, calculates the change amplitude of adjacent time periods and standardizes all data, performs time series interpolation to fill in missing data, and generates standardized time series data;
[0069] The feature extraction module divides the sequence into time windows based on the standardized time series data. The data of multiple time windows are input into the convolution kernel for calculation. The short-term fluctuations and change amplitudes of gas flow and pressure are extracted, and the vector of local time series features is constructed. The time window features are normalized to generate local feature vectors.
[0070] The time series modeling module analyzes trends within the time window based on local feature vectors, calculates long-term dependencies between time series, gradually transfers hidden states to calculate changes in adjacent time periods, predicts long-term trends, and captures time series dependencies through recursion to generate a time series dependency model.
[0071] The prediction and optimization module calculates the expected value of the hydrogen blending ratio based on a time-series dependency model, constrains energy demand, carbon emissions, and stability indicators with the hydrogen blending ratio, adjusts the ratio value, applies the constraints to the predicted value, performs iterative correction, and generates an optimized hydrogen blending ratio prediction;
[0072] The dynamic adjustment module monitors the deviation between the real-time feedback data and the predicted value based on the optimized hydrogen blending ratio prediction, analyzes the deviation trend and corrects the prediction model parameters, recalculates the hydrogen blending ratio, updates the adjusted parameters, applies them to the current prediction results, and generates a dynamically adjusted hydrogen blending ratio prediction.
[0073] The time series data after standardization include time series data, outlier processing results, and missing data filling results. The local feature vectors include gas flow characteristics, pressure change characteristics, and short-term fluctuation characteristics. The time series dependency model includes time period hidden state, long-term trend capture, and time series recursive relationship. The optimized hydrogen blending ratio prediction includes energy demand adjustment results, carbon emission optimization results, and stability balance results. The dynamically adjusted hydrogen blending ratio prediction includes feedback bias correction results, adjusted parameters, and updated prediction results.
[0074] See also Figure 2 The specific steps for obtaining the standardized time series data are as follows:
[0075] Collect the original hydrogen-blended natural gas process data, and divide the gas flow, pressure, and temperature parameters in the time series into multiple intervals according to time. Calculate the average, maximum, and minimum values of the gas flow, pressure, and temperature in each time interval to obtain a statistical parameter set.
[0076] The raw data collected includes multiple parameters such as gas flow, pressure, and temperature. The changes in these data at different time points can reflect the operating status of the system and possible problems. Time segmentation of these data is to be able to observe the changes in parameters in each time interval more carefully. The statistical data of each time interval, such as the average, maximum, and minimum values, are calculated to summarize the data characteristics in each interval and provide basic information for subsequent data processing. Through this step, we can obtain a data set containing all key statistical information. These sets will be used to identify and process abnormal data, as well as for further data analysis and model building.
[0077] Based on the statistical parameter set, an outlier threshold is set and data points exceeding the threshold are identified. The outlier data points are replaced by a linear interpolation method to generate an interpolated statistical parameter set.
[0078] Using a set of statistical parameters, we further analyze the outliers in the data. This analysis is based on the setting of outlier thresholds, which are based on previous data and statistical knowledge to determine what level of data deviation should be considered anomaly. By identifying and eliminating these outliers, we can prevent subsequent analysis from being misled by these data. Linear interpolation is performed on these abnormal data points to fill the gaps left by the eliminated data points and ensure the integrity of the data, which is crucial for accurate time series analysis. The interpolated statistical parameter set will be used to calculate the change amplitude of adjacent time intervals in order to explore the dynamic changes of time series.
[0079] The statistical parameter set after interpolation is used to calculate the variation of gas flow, pressure and temperature in adjacent time intervals using the formula:
[0080]
[0081] Perform standardization processing and calculate and generate a standardized set of change amplitudes;
[0082] Among them, S i represents the standardized change in the i-th interval, X i+1 represents the gas parameter value in the i+1th time interval, X i represents the gas parameter value in the i-th time interval, is the mean of the gas parameters in all intervals, n is the total number of intervals, ω is the weighting factor, γ is the variance adjustment coefficient, and δ is the stabilization increment;
[0083] formula:
[0084]
[0085] The benefit of the formula is that, by weighting the absolute difference and adjusting the variance, the formula can effectively normalize the fluctuations in the time series data, so that the results are not overly affected by a single extreme data point.
[0086] Detailed explanation of the formula and the process of formula calculation and derivation:
[0087] Set X i+1 =105,X i =100, n=10, ω=1.5, γ=0.8, δ=1.
[0088] First calculate the absolute difference:
[0089] |X i+1 -X i |=|105-100|=5
[0090] Then calculate the adjusted variance:
[0091]
[0092] Assume X j Evenly distributed between 95 and 105, we get:
[0093]
[0094] Adding δ = 1, we get 95.4, and finally calculate the normalized change:
[0095]
[0096] This result shows that after considering the weights and tuning parameters, i to X i+1The standardized change in the value of is approximately 0.768, which reflects the standardized fluctuation from one time point to another.
[0097] Combined with the standardized change amplitude set, the time series interpolation method is applied to fill in the missing data. At the same time, the filled data is merged with the standardized change amplitude to obtain the standardized time series data set.
[0098] Through the standardized change amplitude, the application of the time series interpolation method is to deal with discontinuous points caused by missing data. Such completion is to predict unknown data points through the time series pattern of existing data. The completed data is merged with the standardized change amplitude in order to obtain a complete and unified standard data set, which provides support for further data analysis and decision-making. The obtained standardized time series data set provides a prepared data foundation for subsequent data analysis and application.
[0099] See also Figure 3 , the steps for obtaining the local feature vector are as follows:
[0100] The standardized time series data is divided into multiple subsequences according to fixed time windows. The change values of gas flow and pressure are extracted for each subsequence, and the difference of parameters within each time window is calculated to obtain the time window change amplitude set.
[0101] Time windows are divided based on the standardized time series data. The division of time windows needs to be set in combination with the frequency of data collection and the dynamic change characteristics of gas flow. Each time window should contain enough data points to ensure the effectiveness of statistical analysis. For example, a time window is selected to cover data collection points within 10 minutes to ensure that the changes in flow and pressure within this time period can be effectively captured. At the same time, the number of data points and window length in each window need to be adjusted according to the specific situation to adapt to different monitoring environments and equipment performance. Next, the maximum, minimum and average values of gas flow and pressure in each time window are calculated. These statistical data will provide the basis for the next step of change amplitude calculation and generate a time window change amplitude set.
[0102] Using the time window change amplitude set, the data of multiple time windows are input into the convolution kernel, and the local response value of the convolution kernel to each window is calculated. The weight and relative change ratio are combined for processing, and the formula is used:
[0103]
[0104] Extract local change features and generate a set of local eigenvalues;
[0105] Among them, F iis the local eigenvalue of the i-th time window, W k is the kth convolution kernel weight, V i+k and V i are the gas parameter values of the i+kth and ith time windows respectively, α is the enhancement index, γ is the variance adjustment coefficient, is the mean of the gas parameters in all time windows, m is the total number of time windows, δ is the stabilization increment, η is the maximum value adjustment coefficient, and max(V) is the maximum value of the gas parameter in the time window;
[0106] formula:
[0107]
[0108] The benefit of the formula is that by adjusting the weight W k ,The enhancement index α, the variance adjustment coefficient γ, the stabilization increment δ, and the maximum adjustment coefficient η,can flexibly adjust the sensitivity to local fluctuations and the normalization process, thereby improving the accuracy and robustness of feature extraction.
[0109] Detailed explanation of the formula and the process of formula calculation and derivation:
[0110] Assume that within a specific time window, the observed values of V are as follows: V i =100, V i+1 =105, V i+2 =110, weight W is 1, enhancement index α=2, variance adjustment coefficient γ=1, average value of all time windows The stabilization increment δ = 1, the maximum adjustment coefficient η = 0.1, the maximum value max(V) = 110, and the calculation process is as follows:
[0111]
[0112]
[0113] This result shows that the local eigenvalue F obtained by convolution kernel processing i It can effectively reflect the fluctuation of gas parameters within the time window, and this fluctuation feature will be used in subsequent analysis to evaluate the stability of gas flow and detect anomalies.
[0114] The local eigenvalue set is integrated into a feature vector in the order of the time window and normalized to generate a local feature vector.
[0115] The process of integrating the local eigenvalue set into the feature vector in the order of the time window requires attention to the alignment and scaling of the data to ensure that the features in each time window are correctly normalized to avoid deviations in the comparison between different time windows due to different scales. The normalization of the feature vector can be achieved by minimum-maximum normalization, that is, by subtracting the minimum value from the eigenvalue and dividing it by the difference between the maximum and minimum values. In this way, the processed feature vector will be between 0 and 1 and can be directly used for subsequent machine learning model training, thereby improving the model's adaptability to data and prediction accuracy, and generating local feature vectors.
[0116] See also Figure 4 ,The specific steps for obtaining the temporal dependency model are:
[0117] Based on the local eigenvectors, the time windows are divided and the local eigenvalues of multiple windows are extracted. The trend change rate within each time window is calculated. The trend change rate and the time window sequence are combined to obtain the trend sequence set.
[0118] Based on the call of local feature vectors, this step starts with detailed time window division. First, the system collects gas flow and pressure data through a series of sensors. These data are obtained by real-time monitoring by the sensors within each predetermined time window. After that, they are aggregated through the data acquisition system to form the original data set. Next, the original data is preprocessed, including removing noise and outliers to ensure the accuracy and reliability of the data. Then, the data processing algorithm is used to calculate the trend change rate within each time window. This calculation process includes mathematical modeling and trend analysis of the data in each window. Through trend analysis, the change pattern of each time window can be identified, laying the foundation for the creation of the trend sequence set in the next step. The data processing process strictly follows the standards of data integrity and time series analysis to ensure the accuracy of the results and the effectiveness of implementation. The generated trend sequence set will serve as the basis for model establishment and will be used for subsequent dependency analysis and prediction model construction.
[0119] Based on the trend sequence set, the trend cumulative effect between time windows is analyzed, and the hidden state value is gradually transferred using the formula:
[0120]
[0121] Calculate the long-term dependencies between adjacent time windows and generate a sequence of hidden state values;
[0122] Among them, H t is the hidden state value of the t-th time window, φ i is the weight of the i-th time window, T t-i Represents the trend change value of the ti time window, T trepresents the trend change value of the t-th time window, ψ is the long-term dependence adjustment coefficient, ω k is the short-term adjustment coefficient, γ j is the variance adjustment factor, is the trend mean, δ is the stabilization parameter, and η is the offset parameter;
[0123] formula:
[0124]
[0125] The benefit of the formula is that by dynamically adjusting the weight parameter φ i , ψ, and ω k To adapt to the long-term and short-term changes of trends within the time window, it can more accurately simulate and predict long-term dependencies, and enhance the model's adaptability to dynamic changes in time series data and its prediction accuracy.
[0126] Detailed explanation of the formula and the process of formula calculation and derivation:
[0127] Assume that in a specific time window t, a trend value T is observed t = 0.5 and the values T of the previous three time windows t-1 =0.45, T t-2 =0.4, T t-3 =0.35. Select weight parameters φ1=0.8, φ2=0.15, φ3=0.05, long-term dependence adjustment coefficient ψ=1.2, short-term adjustment coefficient ω1=0.9. Variance adjustment factor γ1=γ2=γ3=1, trend mean The stabilization parameter δ is 0.02, and the offset parameter η is 0.1.
[0128]
[0129] This result shows that the hidden state value H calculated by the current model t A value close to 1 indicates that within a given time window, the long-term dependence is very strong and the trend change is very stable. The prediction model's prediction of the future state will be very close to the actual observation value, which improves the reliability and accuracy of the prediction.
[0130] Combined with the hidden state value sequence, the dependency relationship between time series is recursively calculated, the long-term dependency of multiple time windows is cumulatively analyzed, and the dependency relationship of multiple windows is integrated to generate a temporal dependency model.
[0131] When recursively calculating the dependencies between time series, the process first involves integrating the hidden state value sequence. During this process, the system uses advanced algorithms to analyze the hidden state values of each time window one by one, thereby identifying and integrating long-term trend dependencies. The algorithm takes into account the time sequence and data integrity of each state value to ensure the accuracy of the analysis. Through continuous data input, the model can more accurately capture the dependencies of time series and effectively predict long-term trends. As enough time window data is analyzed, the model's predictive ability gradually increases. Through the cumulative analysis of these dependencies, a comprehensive time series dependency model can eventually be generated. This model can not only predict future states, but also provide a scientific basis for decision-making. The resulting time series dependency model provides strong support for real-time dynamic predictions, ensuring the efficiency and reliability of the model in practical applications.
[0132] See also Figure 5 The specific steps for obtaining the optimized hydrogen doping ratio prediction are as follows:
[0133] Using a time-dependent model, energy demand, carbon emissions, and stability index parameters are input, and the expected value of the hydrogen blending ratio in each window is calculated based on the time window sequence. The constraints are analyzed and the results are integrated to generate a ratio constraint set.
[0134] When calling the time-dependent model, you first need to ensure that the input parameters include energy demand, carbon emissions, and stability indicators. These data are obtained through actual energy consumption records, carbon emission reports, and stability assessment reports to ensure the authenticity and accuracy of the data. After preprocessing, the input data is input into the model in the form of a time window sequence. By processing this data, the model evaluates the expected value of the hydrogen blending ratio in each time window. These ratio values are calculated based on current and expected energy demand, environmental protection standards, and system stability requirements, ensuring that the predicted hydrogen blending ratio meets both energy demand and carbon emission standards without disrupting the stable operation of the system.
[0135] Based on the ratio constraint set, the hydrogen blending ratio is gradually adjusted and the constraints are applied, using the formula:
[0136]
[0137] Calculate and generate a corrected set of proportional values;
[0138] Among them, P t is the corrected hydrogen ratio in the tth time window, λ i is the weight of the i-th window, E t-i is the energy demand of the ti window, S t is the stability index of the t-th window, α is the stability adjustment coefficient, C tis the carbon emission value of the tth window, γ is the carbon emission weight, β j is the variance adjustment factor, is the mean value of hydrogen doping ratio, δ is the stabilization parameter, ∈ is the energy demand adjustment coefficient, and max(E) is the maximum energy demand value;
[0139] formula:
[0140]
[0141] The benefit of the formula is that by integrating energy demand, stability indicators and carbon emission data, it provides a method for adjusting the hydrogen blending ratio that comprehensively considers multiple factors, thereby increasing the accuracy and practicality of the model prediction.
[0142] Detailed explanation of the formula and the process of formula calculation and derivation:
[0143] Set energy requirement E t is 500, the stability index S t is 0.8, carbon emissions C t is 300, weight λ i is 0.5, the adjustment coefficient α is 1.2, the carbon emission weight γ is 1.1, and the variance adjustment factor β j The average hydrogen ratio is 0.03. is 0.2, the stabilization parameter δ is 0.05, the energy demand adjustment coefficient ∈ is 0.02, and the maximum energy demand max(E) is 600. The calculation results are:
[0144]
[0145] The results show that under given parameters, the adjusted hydrogen blending ratio is 46.8%, which indicates that by applying this formula, the hydrogen blending ratio can be effectively adjusted according to current environmental and operational data, ensuring energy supply while reducing environmental impact.
[0146] Using the corrected ratio value set, the ratio value of each time window is recursively adjusted. The correction results are integrated with the time window constraints and energy, emission, and stability requirements to generate an optimized hydrogen blending ratio prediction.
[0147] Based on the corrected ratio value set, the ratio value of each time window is recursively adjusted. This process involves comparing the current ratio value of each time window with the ideal ratio value calculated by the model, and then gradually adjusting the actual hydrogen blending ratio according to the actual situation to approach the ideal ratio value. This method can ensure that the hydrogen blending ratio in each time window can be optimized and adjusted while meeting energy demand, reducing carbon emissions and ensuring system stability. The optimized hydrogen blending ratio prediction obtained will be directly used to adjust the hydrogen blending ratio in actual operation.
[0148] See also Figure 6 The specific steps for obtaining the dynamically adjusted hydrogen blending ratio prediction are as follows:
[0149] Based on the optimized hydrogen blending ratio prediction, real-time feedback data is collected and the deviation between the feedback data and the predicted value is calculated. The deviation is integrated according to the time window and the deviation change trend is calculated to generate a deviation trend set;
[0150] Monitor real-time feedback data, analyze the deviation between the predicted value and the actual data, and modify the model parameters according to the deviation trend. The real-time feedback data collected includes data streams obtained from sensors and monitoring systems. These data reflect the actual performance of the hydrogen blending ratio. Through the real-time data processing system, the deviation value is calculated at fixed time intervals. This process involves comparing the collected data with the model predicted value. The deviation analysis includes calculating the mean and standard deviation of the deviation, evaluating the persistence and volatility of the deviation to determine whether the model parameters need to be adjusted, and dynamically adjusting the model according to the deviation trend. Specifically, it includes using statistical and machine learning methods to identify the pattern and cause of the deviation. The process of modifying parameters is carried out according to the nature of the deviation and the initial settings of the model, including adjusting the learning rate, retraining part or all of the model, or modifying the structure of the model to better adapt to data changes. The updated parameters will be used to optimize the prediction algorithm of the hydrogen blending ratio to ensure the accuracy and reliability of the prediction results.
[0151] Based on the deviation trend set, analyze the deviation change pattern between time windows and correct the model parameters using the formula:
[0152]
[0153] Adjust parameter values to generate a revised model parameter set;
[0154] Among them, θ t is the model parameter after adjustment in the t-th time window, θ t-1 is the model parameter of the previous time window, λ i is the weight coefficient, D t-i is the deviation value of the ti-th window, Δ t is the cumulative deviation, φ is the deviation adjustment coefficient, β j is the variance adjustment factor, is the mean deviation, δ is the stabilization parameter, ∈ is the deviation amplitude adjustment coefficient, max(D) is the maximum deviation, n represents the number of previous time windows used for deviation calculation, and m represents the number of previous time windows used for variance calculation;
[0155] formula:
[0156]
[0157] The benefit of the formula is that it can respond to deviation changes in real time by dynamically adjusting model parameters, thereby improving the accuracy and adaptability of predictions. Detailed explanation of the formula and the process of formula calculation and derivation: For illustration, simulated data are used. Assume that in five consecutive time windows, the deviation data D is 2, -1, 3, -2, 1, and the weight coefficient λ is i Take 0.1, 0.2, 0.3, 0.4, the adjustment coefficient φ is 0.5, and the variance adjustment factor β j Take 0.1, 0.2, 0.3, 0.4, the stabilization parameter δ is 1, the deviation amplitude adjustment coefficient ∈ is 0.1, and the calculation steps are:
[0158] Calculating weight adjustments -0.6
[0159] 2. Calculate the deviation adjustment term φ·Δ5 and get -1.5
[0160] 3. Calculate the variance adjustment part in the denominator 2.9
[0161] 4. Maximum deviation max(D) is 3
[0162] 5. Substitute the above values into the main formula to calculate
[0163]
[0164] This means that the value of θ5 is about 0.808 smaller than that of θ4. This result shows that the adjusted parameter θ5 can more accurately reflect the actual data changes and improve the response speed and accuracy of the prediction model.
[0165] The hydrogen blending ratio value is recalculated and adjusted using the revised model parameter set, and the revised ratio value is applied to the prediction result of the current time window to generate a dynamically adjusted hydrogen blending ratio prediction.
[0166] Using the revised model parameters, the hydrogen blending ratio is recalculated and adjusted to achieve optimal energy utilization and carbon emission efficiency. This process includes using the new model parameters to re-evaluate the hydrogen blending ratio under current operating conditions, updating the predicted value for each time window, and ensuring that each update is based on the latest model parameters and actual operating data to achieve dynamic adjustment of the hydrogen blending ratio prediction. During the adjustment process, special attention is paid to real-time data feedback, as well as changes in environmental factors and market demand, to ensure that the adjustment of the hydrogen blending ratio can maximize its adaptation to changing operating needs and external conditions while ensuring safety and efficiency. The prediction results will be used for further energy management and scheduling strategy optimization.
[0167] A method for regulating hydrogen-blended natural gas based on data analysis is provided. The method is executed based on the aforementioned hydrogen-blended natural gas regulation system based on data analysis and includes the following steps:
[0168] S1: Collect the original hydrogen-blended natural gas process data, divide the gas flow, pressure, and temperature parameters into time periods in chronological order, calculate the average, maximum, and minimum values of the gas flow, pressure, and temperature in each time period, identify abnormal values and perform interpolation replacement, calculate the change range of adjacent time periods and standardize the data to generate standardized time series data;
[0169] S2: Based on the standardized processing of time series data, the data is divided into set time windows, and the data of each time window is sent to the convolution kernel for calculation. The short-term fluctuations and change amplitudes of gas flow and pressure are extracted to construct local feature vectors.
[0170] S3: Based on the local feature vector, analyze the trend within the time window, calculate the long-term dependency between time series, gradually transfer the hidden state, calculate the changes in adjacent time periods, capture the time series dependency, and generate a time series dependency model;
[0171] S4: Based on the time-series dependency model, the expected value of the hydrogen blending ratio is calculated. The hydrogen blending ratio is adjusted based on the constraints including energy demand, carbon emissions, and stability. The constraints are applied to the predicted value for iterative correction to generate an optimized hydrogen blending ratio forecast.
[0172] S5: Based on the optimized hydrogen blending ratio prediction, the deviation between the feedback data and the predicted value is monitored in real time, the deviation trend is analyzed, the prediction model parameters are corrected, the hydrogen blending ratio is recalculated, the adjusted parameters are updated, and a dynamically adjusted hydrogen blending ratio prediction is generated;
[0173] S6: Based on the dynamically adjusted hydrogen blending ratio prediction and combined with real-time feedback data, difference analysis and trend adjustment are performed to monitor the real-time changes in the hydrogen blending ratio. The hydrogen blending ratio is iteratively optimized according to demand and stability requirements to generate the optimized hydrogen blending ratio value.
[0174] The above are merely preferred embodiments of the present invention and do not limit the present invention in any other form. Any technician familiar with the profession may use the technical content disclosed above to change or modify it into an equivalent embodiment with equivalent changes and apply it to other fields. However, any simple modification, equivalent change and modification made to the above embodiment based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall still fall within the scope of protection of the technical solution of the present invention.
Claims
1. A hydrogen-blended natural gas control system based on data analysis, characterized in that: The system comprises: The data preprocessing module collects raw hydrogen-blended natural gas process data, segments the gas flow, pressure, and temperature parameters in chronological order, calculates the average value and the maximum and minimum values within each time period, identifies data anomalies and interpolates and replaces them, calculates the change amplitude of adjacent time periods and standardizes all data, performs time series interpolation to fill in missing data, and generates standardized time series data; The feature extraction module divides the sequence into time windows based on the standardized time series data, inputs the data of multiple time windows into the convolution kernel for calculation, extracts the short-term fluctuations and change amplitudes of gas flow and pressure, completes the vector construction of local features of the time series, and normalizes the time window features to generate local feature vectors; The time series modeling module analyzes the trend within the time window based on the local feature vector, calculates the long-term dependency between time series, gradually transfers the hidden state to calculate the changes in adjacent time periods, predicts the long-term trend, captures the dependency of time series through recursion, and generates a time series dependency model; The steps for obtaining the timing dependency model are specifically as follows: Based on the local feature vector, the time window is divided and the local feature values of multiple windows are extracted, the trend change rate in each time window is calculated, and the trend change rate and the time window sequence are combined to obtain a trend sequence set; Based on the trend sequence set, the trend cumulative effect between time windows is analyzed, and the hidden state value is gradually transferred using the formula: Calculate the long-term dependencies between adjacent time windows and generate a sequence of hidden state values; Among them, H t is the hidden state value of the t-th time window, φ i is the weight of the i-th time window, T t-i Represents the trend change value of the ti time window, T t represents the trend change value of the t-th time window, ψ is the long-term dependence adjustment coefficient, ω k is the short-term adjustment coefficient, γ j is the variance adjustment factor, is the trend mean, δ is the stabilization parameter, and η is the offset parameter; Combining the hidden state value sequence, recursively calculating the dependency relationship between time series, cumulatively analyzing the long-term dependency of multiple time windows, and integrating the dependency relationship of multiple windows to generate a temporal dependency model; The prediction optimization module calculates the expected value of the hydrogen blending ratio based on the time series dependency model, constrains the energy demand, carbon emissions, stability indicators and the hydrogen blending ratio, adjusts the ratio value and applies the constraint conditions to the predicted value, performs iterative correction, and generates an optimized hydrogen blending ratio prediction; The steps for obtaining the optimized hydrogen blending ratio prediction are specifically as follows: Using the time series dependency model, energy demand, carbon emissions, and stability index parameters are input, and the expected value of the hydrogen blending ratio in each window is calculated based on the time window sequence. The constraints are analyzed and the results are integrated to generate a ratio constraint set. Based on the ratio constraint set, the hydrogen blending ratio is gradually adjusted and the constraints are applied, using the formula: Calculate and generate a corrected set of proportional values; Among them, P t is the corrected hydrogen ratio in the tth time window, λ i is the weight of the i-th window, E t-i is the energy demand of the ti window, S t is the stability index of the t-th window, α is the stability adjustment coefficient, C t is the carbon emission value of the tth window, γ is the carbon emission weight, β j is the variance adjustment factor, is the mean value of hydrogen doping ratio, δ is the stabilization parameter, ∈ is the energy demand adjustment coefficient, and max(E) is the maximum energy demand value; Using the corrected ratio value set, recursively adjust the ratio value of each time window, integrate the correction results with the time window constraints and energy, emission, and stability requirements, and generate an optimized hydrogen blending ratio prediction; The dynamic adjustment module monitors the deviation between the real-time feedback data and the predicted value based on the optimized hydrogen blending ratio prediction, analyzes the deviation trend and corrects the prediction model parameters, recalculates the hydrogen blending ratio, updates the adjusted parameters, applies them to the current prediction results, and generates a dynamically adjusted hydrogen blending ratio prediction.
2. The hydrogen-blended natural gas control system based on data analysis according to claim 1 is characterized in that: The standardized time series data includes time series data, outlier processing results, and missing data filling results; the local feature vectors include gas flow characteristics, pressure change characteristics, and short-term fluctuation characteristics; the time series dependency model includes time period hidden state, long-term trend capture, and time series recursive relationship; the optimized hydrogen blending ratio prediction includes energy demand adjustment results, carbon emission optimization results, and stability balance results; the dynamically adjusted hydrogen blending ratio prediction includes feedback deviation correction results, adjusted parameters, and updated prediction results.
3. The hydrogen-blended natural gas control system based on data analysis according to claim 2 is characterized in that: The specific steps for obtaining the normalized time series data are as follows: Collect the original hydrogen-blended natural gas process data, and divide the gas flow, pressure, and temperature parameters in the time series into multiple intervals according to time. Calculate the average, maximum, and minimum values of the gas flow, pressure, and temperature in each time interval to obtain a statistical parameter set. Based on the statistical parameter set, setting an outlier threshold and identifying data points exceeding the threshold, replacing the outlier data points by a linear interpolation method, and generating an interpolated statistical parameter set; The statistical parameter set after the interpolation process is used to calculate the variation range of gas flow, pressure and temperature in adjacent time intervals using the formula: Perform standardization processing and calculate and generate a standardized set of change amplitudes; Among them, S i represents the standardized change in the i-th interval, X i+1 represents the gas parameter value in the i+1th time interval, X i represents the gas parameter value in the i-th time interval, is the mean of the gas parameters in all intervals, n is the total number of intervals, ω is the weighting factor, γ is the variance adjustment coefficient, and δ is the stabilization increment; Combined with the standardized set of change amplitudes, a time series interpolation method is applied to complete the missing data, and the completed data is merged with the standardized change amplitudes to obtain a standardized time series data set.
4. The hydrogen-blended natural gas control system based on data analysis according to claim 3 is characterized in that: The steps for obtaining the local feature vector are specifically as follows: Dividing the normalized time series data into multiple subsequences according to fixed time windows, extracting the change values of gas flow and pressure for each subsequence, and obtaining a time window change amplitude set by calculating the difference of the parameters within each time window; Using the time window change amplitude set, the data of multiple time windows are input into the convolution kernel, the local response value of the convolution kernel to each window is calculated, and the weight and relative change ratio are combined for processing, using the formula: Extract local change features and generate a set of local eigenvalues; Among them, F i is the local eigenvalue of the i-th time window, W k is the kth convolution kernel weight, V i+k and V i are the gas parameter values of the i+kth and ith time windows respectively, α is the enhancement index, γ is the variance adjustment coefficient, is the mean of the gas parameters in all time windows, m is the total number of time windows, δ is the stabilization increment, η is the maximum value adjustment coefficient, and max(V) is the maximum value of the gas parameter in the time window; The local eigenvalue sets are integrated into eigenvectors according to the time window sequence, and normalized to generate local eigenvectors.
5. The hydrogen-blended natural gas control system based on data analysis according to claim 4 is characterized in that: The steps for obtaining the dynamically adjusted hydrogen blending ratio prediction are specifically as follows: Based on the optimized hydrogen blending ratio prediction, real-time feedback data is collected and the deviation between the feedback data and the predicted value is calculated, the deviation is integrated according to the time window, and the deviation change trend is calculated to generate a deviation trend set; Based on the deviation trend set, the deviation variation pattern between time windows is analyzed and the model parameters are corrected using the formula: Adjust parameter values to generate a revised model parameter set; Among them, θ t is the model parameter after adjustment in the t-th time window, θ t-1 is the model parameter of the previous time window, λ i is the weight coefficient, D t-i is the deviation value of the ti-th window, Δ t is the cumulative deviation, φ is the deviation adjustment coefficient, β j is the variance adjustment factor, is the mean deviation, δ is the stabilization parameter, ∈ is the deviation amplitude adjustment coefficient, max(D) is the maximum deviation, n represents the number of previous time windows used for deviation calculation, and m represents the number of previous time windows used for variance calculation; The hydrogen blending ratio value is recalculated and adjusted using the revised model parameter set, and the revised ratio value is applied to the prediction result of the current time window to generate a dynamically adjusted hydrogen blending ratio prediction.
6. A method for regulating hydrogen-blended natural gas based on data analysis, characterized in that: The hydrogen-blended natural gas control system based on data analysis according to any one of claims 1 to 5 comprises the following steps: Collect the original hydrogen-blended natural gas process data, divide the gas flow, pressure, and temperature parameters into time periods in chronological order, calculate the average, maximum, and minimum values of the gas flow, pressure, and temperature in each time period, identify outliers and perform interpolation replacement, calculate the change range of adjacent time periods and standardize the data to generate standardized time series data; Based on the standardized processing time series data, the data is divided into set time windows, the data of each time window is sent to the convolution kernel for calculation, the short-term fluctuations and change amplitudes of the gas flow and pressure are extracted, and the local feature vector is constructed; Based on the local feature vector, the trend in the time window is analyzed, the long-term dependency between time series is calculated, the hidden state is gradually transferred, the changes in adjacent time periods are calculated, the time series dependency is captured, and a time series dependency model is generated; Based on the time series dependency model, the expected value of the hydrogen blending ratio is calculated, and the hydrogen blending ratio is adjusted in combination with the constraints including energy demand, carbon emissions, and stability. The constraints are applied to the predicted value for iterative correction to generate an optimized hydrogen blending ratio prediction; Based on the optimized hydrogen blending ratio prediction, real-time monitoring of the deviation between the feedback data and the predicted value, analyzing the deviation trend, correcting the prediction model parameters, recalculating the hydrogen blending ratio, updating the adjusted parameters, and generating a dynamically adjusted hydrogen blending ratio prediction; Based on the dynamically adjusted hydrogen blending ratio prediction, combined with real-time feedback data, difference analysis and trend adjustment are performed, real-time changes in the hydrogen blending ratio are monitored, the hydrogen blending ratio is iteratively optimized according to demand and stability requirements, and an optimized hydrogen blending ratio value is generated.
Citation Information
Patent Citations
Accurate control device for hydrogen doping proportion of natural gas
CN116357892A
Safety control system suitable for hydrogen doping of natural gas
CN117930758A
Method for predicting fast sale product specification classification order quantity based on time sequence
CN118608024A