Methane concentration prediction model and method based on methane periodic change characteristics

By combining the XGBoost algorithm and Fourier transform, a methane concentration prediction model based on the characteristics of periodic changes in biogas was constructed, which solved the problem of low prediction accuracy in the existing technology, achieved high accuracy prediction effect, and promptly responded to underground space. Risk of methane accumulation.

CN118917191APending Publication Date: 2024-11-08BEIJING INST OF TECH +1
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410988953.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively predict the periodic changes in methane concentration in underground space, which makes it difficult to monitor explosion risk. The existing prediction models lack professional experience driving factors, resulting in low prediction accuracy and inability to respond to multiple alarm events in a timely manner.

Method used

The XGBoost algorithm is used to combine linear interpolation, sliding window, Fourier transform and genetic algorithm to construct a methane concentration prediction model based on the characteristics of periodic changes of biogas, fuse the periodic characteristics, optimize the weight, and improve the prediction accuracy.

Benefits of technology

The prediction accuracy is improved, with an average increase of 48%, and the prediction accuracy rate of more than 95% is achieved in actual applications, which can promptly respond to biogas accumulation alarm events and reduce the risk of explosion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118917191A_ABST
    Figure CN118917191A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of underground space combustible gas prediction, in particular to a methane concentration prediction model and method based on methane periodic change characteristics and a construction method, and the method comprises the following steps: S1, establishing a primary prediction model of methane concentration of methane based on an XGBoost algorithm; s2, collecting methane concentration monitoring data in biogas, optimizing a training data structure of the primary prediction model by adopting linear interpolation and a sliding window technology, and determining an optimal sampling interval and an optimal sliding window length; s3, performing Fourier transform on the monitoring data of the methane concentration in the biogas to obtain a change period of the methane concentration in the biogas; s4, after the periods are determined, Fourier series are used for fitting the change trend of each period, and a periodic prediction model fused with periodic characteristics is constructed; and S5, optimizing the periodic weight in combination with a genetic algorithm, and establishing an optimal biogas methane prediction model, the brand new methane concentration prediction model is established, and the prediction result is relatively accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of underground space combustible gas prediction, and in particular to a methane concentration prediction model and method based on the periodic variation characteristics of biogas. Background Art

[0002] With the rapid economic development, the scale of cities has expanded and the amount of underground spaces has continued to increase. In urban sewage pipes, gases produced by underground gas pipeline leakage, sewage discharge, sludge accumulation and other reasons are prone to accumulation and aggregation, and the risk of explosion also increases. Underground space explosion accidents have become a new hidden danger threatening urban safety.

[0003] At present, the research on underground explosion safety monitoring technology at home and abroad is still in its infancy, mainly focusing on inspection technology, such as manual inspection, ABB inspection vehicles, etc. In recent years, robot pipeline detection technology and underground combustible gas online monitoring technology have also been developed. Existing studies have shown that changes in underground methane concentration are usually affected by factors such as temperature, manhole depth and human activities. It is affected by multiple factors and exhibits extremely irregular changes, making it difficult to predict. However, there are few prediction methods and models that focus on the prediction model of the trend of biogas concentration changes, and when analyzing input data, they usually only consider the statistical significance of the data, without considering the essential reasons for the data changes. This makes most prediction models lack knowledge-driven factors based on professional experience when preparing training samples, resulting in the neglect of important field-related information in actual application scenarios.

[0004] In actual applications, a large number of records of combustible gas exceeding the standard are received on average every day. More than 90% of these alarm events come from biogas accumulation, and the methane concentration can reach more than 20%. There are even cases of concentrated alarms in multiple underground spaces within the same time period of a day. Limited human and material resources make it difficult to respond to multiple alarm events simultaneously in a short period of time, resulting in most incidents with high explosion risks not being given priority. Therefore, it is necessary to propose a methane concentration prediction model and method based on the periodic change characteristics of urban underground biogas, so as to grasp the methane concentration change trend in advance and take effective emergency disposal measures as soon as possible. Summary of the invention

[0005] In order to solve the problems existing in the prior art, the present invention provides a methane concentration prediction model and method based on the periodic variation characteristics of biogas, so as to solve the problem of constructing a methane concentration prediction model based on the periodic variation characteristics of biogas.

[0006] To solve the above problems, the technical solution of the present invention is as follows: A method for constructing a methane concentration prediction model based on the periodic variation characteristics of biogas, comprising the following steps:

[0007] S1. Establish a primary prediction model for biogas methane concentration based on XGBoost algorithm;

[0008] S2. Collect monitoring data on methane concentration in biogas, optimize the training data structure of the primary prediction model using linear interpolation and sliding window technology, and determine the optimal sampling interval and optimal sliding window length;

[0009] S3. Perform Fourier transform on the monitoring data of methane concentration in biogas to obtain the variation period of methane concentration in biogas;

[0010] S4. After determining the period, the Fourier series is used to fit the variation trend of each period to obtain the period variation vector, thereby correcting the methane concentration period and constructing a periodic prediction model that integrates periodic characteristics;

[0011] S5. Combine genetic algorithm to optimize the cycle weights, determine the optimal weights, and establish the optimal biogas methane prediction model.

[0012] Further, in step S1, the XGBoost algorithm is an additive model consisting of M decision trees, expressed as:

[0013]

[0014] Among them, f represents the decision tree, F represents the function of all decision trees, and x i Represents the input feature vector of the i-th sample. The XGBoost algorithm uses linear interpolation and sliding window processing, sets the input feature time series to the concentration value at the past n time points, outputs the feature to the concentration value at the current time point, and divides the data set into a training set and a test set. The training set participates in model training, and the test set verifies the model prediction effect.

[0015] Furthermore, during the training process, XGBoost optimizes the model by minimizing the objective function, which includes training loss and regularization terms. The training loss uses the mean square error MSE, and the regularization term is used to control the complexity of the model and prevent overfitting. XGBoost corrects the previous prediction error by gradually adding new trees. The prediction update of each step is based on the residual of the previous step. The final prediction value is obtained by accumulating the prediction values ​​of all regression trees.

[0016] Furthermore, in the regression process, the objective function of the additive model is:

[0017]

[0018] Where l is the training loss function, which is set to mean square error MSE in this application, Ω represents the regularization term,

[0019] Vector mapping can improve the regularization parameter Ω(f) of each tree, which can be expressed as:

[0020]

[0021] XGBoost uses a forward phased algorithm model to simplify the algorithm. Each time a decision tree is added to the model, a new function is learned and its coefficients are used to fit the residuals of the previous prediction. When the sth step of learning begins, x i The predicted value can be expressed as The objective function can be expressed as:

[0022]

[0023]

[0024] Further, step S2 includes: monitoring the methane concentration of underground biogas with a continuous collection time of no less than 1 year and a sampling interval of 5 minutes to 2 hours.

[0025] The monitoring data are sampled and processed by linear interpolation. After processing, the sampling intervals are 1h, 30min, 15min and 5min respectively, so as to obtain a one-dimensional time series with the same sampling interval. The linear interpolation formula is as follows:

[0026]

[0027] Among them, x is the sampling time point, y is the methane concentration at that time point, (x 0 ,y 0 ) is the unknown point that needs to be interpolated, (x 1 ,y 1 ) and (x 2 ,y 2 ) is (x 0 ,y 0 ) on both sides of the known points.

[0028] Further, in step S2, the sliding window method is introduced to process the data after linear interpolation, and the length is defined as k, x k is the methane concentration data at the kth time point. When time t=1, the 1st to kth points are used as the input data for model training, and the k+1th point is used as the output data of the model, that is, the model prediction value. During the training process, the sliding window is kept unchanged so that the data is continuously updated in the window to achieve real-time prediction of methane concentration.

[0029] Further, step S3 includes: introducing Fourier transform and Fourier series to realize the fusion of original concentration data and its periodic characteristics, using Fourier transform to decouple methane concentration data, and obtaining the period of biogas methane concentration change. Fourier transform converts the signal from time domain to frequency domain, which is used to analyze the different frequency components contained in the signal, and the reciprocal of the frequency is the period of the signal. Based on this principle, the Fourier transform method is used to extract the periodic characteristics of the monitored methane concentration. The specific formula is as follows:

[0030] F(ω)=∫f(t)e -jωt dt

[0031] In the formula, F(ω) represents the complex function in the frequency domain, f(t) represents the function in the time domain, ω represents the frequency in times / h, and e -jωt It is a complex exponential function. The Fourier transform formula decomposes the function f(t) into a series of complex amplitude and phase combinations, which are used to describe the contribution of the function at different frequencies.

[0032] Further, step S4 includes: based on the period obtained by Fourier transform, using Fourier series to fit the methane concentrations of different periods to obtain a periodic methane concentration correction vector Γ, correcting the periodic vector Γ, the correction factor is recorded as w, and introducing a Fourier series expansion to fit it. The Fourier series is a method for decomposing a periodic signal into a plurality of sinusoidal wave signals of different frequencies. The calculation method of the periodic vector Γ is shown in the following formula:

[0033]

[0034] Where T is the period, a 0 , a i , b i is the coefficient; n represents the number of expansion terms, which determines the number of sine and cosine functions used to approximate the original function, where n = 5;

[0035] When using the periodic eigenvalue to correct the original methane concentration, it is first necessary to multiply the periodic vector Γ(t) and the periodic vector correction factor w and sum them to obtain the methane concentration correction sequence P(t), as shown in the following formula:

[0036] P(t)=w 1 ×Γ 12h (t)+w 2 ×Γ 24h (t)+w 3 ×Γ 1m (t)+w 4 ×Γ 1y (t)

[0037] Then multiply each time series element in P(t) by the original methane concentration data d(t) to obtain D(t), as shown in the following formula. Through the above operation, the fusion of the original concentration data and the periodic characteristics can be achieved.

[0038] D(t)=P(t)·d(t)

[0039] Where d(t) is a time series with a length of M, and the lengths of Γ(t), P(t), and D(t) are also M; Γ(t) is a periodic vector, which is composed of the fitted values ​​of the Fourier series in each period; w 1,2,3,4 is the period vector correction factor, representing the influence of different periods on the model; P(t) is the methane concentration correction sequence, used to correct the original methane concentration; d(t) is the original methane concentration time series; D(t) is the fusion sequence of the original concentration data and the periodic characteristics.

[0040] Further, step S5 includes: substituting the fitting curve values ​​of each period into the original concentration data to obtain methane concentration data with periodic characteristics, setting a set of initial period weights [w 1 ',w 2 ',w 3 ',w 4 '], and substitute it into the XGBoost prediction model, use the genetic algorithm to optimize the cycle weight, and use the RMSE of the training set prediction results as the objective function to obtain the optimized cycle weight [w 1 ,w 2 ,w 3 ,w 4 ] and obtain the model with the best prediction results.

[0041] A methane concentration prediction model is constructed based on the method for constructing a methane concentration prediction model based on the periodic variation characteristics of biogas.

[0042] Compared with the prior art, the present invention has the following beneficial effects: when preparing training samples, the knowledge-driven factors based on professional experience, namely, the periodic characteristics of the methane concentration change of urban underground space biogas, are taken into account, and its periodic characteristics are combined with the XGBoost algorithm model to construct a methane concentration prediction model based on the periodic change characteristics of urban underground space biogas;

[0043] Compared with the model that does not incorporate periodic features, the prediction effect of the model proposed in this application is improved by an average of 48%; compared with other machine learning classification algorithms, the XGBoost algorithm prediction model has more accurate prediction results, and in the process of model construction, through the Fourier transform and Fourier series methods in the field of signal analysis, the concentration change cycle and its trend can be intuitively observed. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 Establishing a process for the model of the present invention;

[0045] Figure 2 This is a flow chart of the XGBoost algorithm prediction model of the present invention;

[0046] Figure 3 It is a schematic diagram of the sliding window method of the present invention;

[0047] Figure 4 This is a comparison chart of prediction results of different models of the present invention. DETAILED DESCRIPTION

[0048] The application model establishment process is as follows Figure 1 As shown, the method for constructing a methane concentration prediction model based on the periodic variation characteristics of biogas includes the following steps: S1, using the XGBoost algorithm to establish a methane concentration prediction model, such as Figure 2 As shown in Figure 1, XGBoost is a machine learning algorithm based on gradient boosting, which is mainly used for classification and regression tasks, but can also be used for time series prediction. First, the time series data is converted into a supervised learning problem, that is, after linear interpolation and sliding window processing, the input feature time series y t Set to the concentration value of the past n time points, and the output feature is the concentration value at the current time point. Then, the data set is divided into a training set and a test set. During the training process, XGBoost optimizes the model by minimizing the objective function (including training loss and regularization terms). The training loss usually uses the mean square error (MSE). The regularization term is used to control the complexity of the model and prevent overfitting. XGBoost corrects the previous prediction error by gradually adding new trees. The prediction update of each step is based on the residual of the previous step. The final prediction value is obtained by accumulating the prediction values ​​of all regression trees.

[0049] The XGBoost algorithm can be viewed as an additive model consisting of M decision trees, expressed as:

[0050]

[0051] Among them, f represents a decision tree, and F represents the function of all decision trees.

[0052] In the regression process, the objective function of the additive model is:

[0053]

[0054] Where l is the loss function, which is set to mean square error (MSE) in this application, and Ω represents the regularization term.

[0055] Vector mapping can improve the regularization parameter Ω(f) of each tree, so Ω(f) can be expressed as:

[0056]

[0057] XGBoost uses a forward phased algorithm model to simplify the algorithm. Each time a decision tree is added to the model, a new function is learned and its coefficients are used to fit the residuals of the previous prediction. Therefore, when the sth step of learning begins, x i The predicted value can be expressed as Therefore, the objective function can be expressed as:

[0058]

[0059] S2, a total of 1434 underground space biogas methane concentration monitoring data were collected through the H city gas online monitoring system, the continuous collection time was no less than 1 year, and the sampling intervals varied from 2h to 5min.

[0060] In order to explore the impact of sampling interval on the prediction effect, this application uses the linear interpolation method to downsample the monitoring data with a sampling interval of 2h. After processing, the sampling intervals are 1h, 30min, 15min and 5min respectively to obtain a one-dimensional time series with the same sampling interval. The linear interpolation formula is as follows:

[0061]

[0062] Where x is the sampling time point; y is the methane concentration at that time point; (x 0 ,y 0 ) is the unknown point that needs to be interpolated; (x 1 ,y 1 ) and (x 2 ,y 2 ) is (x 0 ,y 0 ) on both sides of the known points.

[0063] Since time series prediction requires the determination of the input length of the model, this application introduces a sliding window method to process the data after linear interpolation, and defines the length as k, such as Figure 3 As shown, x k is the methane concentration data at the kth time point. When time t=1, the 1st to kth points are used as the input data for model training, and the k+1th point is used as the output data of the model, that is, the model prediction value. And so on. During the training process, the sliding window is kept unchanged so that the data is continuously updated in the window to achieve real-time prediction of methane concentration.

[0064] During the model training process, the sample data needs to be divided into a training set and a test set. The former is used to build the model, and the latter is used to evaluate the model's prediction accuracy for unknown samples. This application sets the training set ratio to 75% and the test set ratio to 25%.

[0065] S3, in order to improve the prediction accuracy of the model, this application introduces Fourier transform and Fourier series to realize the fusion of the original concentration data and its periodic characteristics. The methane concentration data is decoupled by Fourier transform to obtain the period of change of biogas methane concentration. The Fourier transform can convert the signal from the time domain to the frequency domain, which is used to analyze the different frequency components contained in the signal, and the inverse of the frequency is the period of the signal. Based on this principle, this application uses the Fourier transform method to extract the periodic characteristics of the monitored methane concentration. The specific formula is as follows:

[0066] F(ω)=∫f(t)e -jωt dt

[0067] Wherein, F(ω) represents the complex function in the frequency domain; f(t) represents the function in the time domain; ω represents the frequency, and the unit of ω is set to times / h in this application; e -jωt It is a complex exponential function. The Fourier transform formula decomposes the function f(t) into a series of complex amplitude and phase combinations to describe the contribution of the function at different frequencies.

[0068] S4, based on the above cycle, the Fourier series is used to fit the methane concentration of different cycles, and then the periodic methane concentration correction vector Γ is obtained. Considering that different periodic characteristics have different degrees of influence on methane concentration, for example, within the 12h cycle range, the change in methane concentration is not only affected by the 12h cycle change law, but also by the 24h and 1 month cycle change laws. The difference is that their influence degrees are different. Therefore, it is necessary to correct the periodic vector Γ, and the correction factor is recorded as w. The above calculation steps mainly use the periodic characteristics to improve the classification effect of the machine learning classification algorithm. In order to describe the changing trend of methane concentration in each cycle, the Fourier series expansion is introduced to fit it. The Fourier series is a method of decomposing a periodic signal into multiple sinusoidal signals of different frequencies. The calculation method of the periodic vector Γ is shown in the following formula:

[0069]

[0070] Where T is the period, a 0 , a i , b i is the coefficient; n represents the number of expansion terms, which determines the number of sine and cosine functions used to approximate the original function. In this application, n=5, which can meet the accuracy requirements.

[0071] When the original methane concentration is corrected using the periodic eigenvalue, it is first necessary to multiply the periodic vector Γ(t) by the periodic vector correction factor w and sum them to obtain the methane concentration correction sequence P(t), as shown in the following formula.

[0072] P(t)=w 1 ×Γ 12h (t)+w 2 ×Γ 24h (t)+w 3 ×Γ 1m (t)+w 4 ×Γ 1y (t)

[0073] Then multiply each time series element in P(t) by the original methane concentration data d(t) to obtain D(t), as shown in the following formula. Through the above operation, the fusion of the original concentration data and the periodic characteristics can be achieved.

[0074] D(t)=P(t)·d(t)

[0075] In the formula, assuming that d(t) is a time series with a length of M, then the lengths of Γ(t), P(t), and D(t) are also M; Γ(t) is a periodic vector, which is composed of the fitted values ​​of the Fourier series in each period; w 1,2,3,4 is the period vector correction factor, representing the influence of different periods on the model; P(t) is the methane concentration correction sequence, used to correct the original methane concentration; d(t) is the original methane concentration time series; D(t) is the fusion sequence of the original concentration data and the periodic characteristics.

[0076] S5, substitute the fitting curve values ​​of each period into the original concentration data to obtain methane concentration data with periodic characteristics, and set a set of initial period weights [w 1 ',w 2 ',w 3 ',w 4 '], and substitute it into the XGBoost prediction model, use the genetic algorithm to optimize the cycle weight, and use the RMSE of the training set prediction results as the objective function to obtain the optimized cycle weight [w 1 ,w 2 ,w 3 ,w 4 ] and obtain the model with the best prediction results.

[0077] (1) In order to compare the prediction effect of the biogas methane prediction model integrating periodic features, this application uses 25 machine learning regression algorithms such as boosting tree, linear regression, SVM, neural network, etc. to construct a methane concentration prediction model, setting the optimal sampling interval to 5min and the optimal sliding window length to 13. The models before and after the fusion period are trained and predicted respectively. The RMSE of the test set of each model is as follows: Figure 4 As shown, the RMSE of the periodic fusion data is below the RMSE of the original data. The periodic fusion data is distributed around 0.15, and the original data is distributed around 0.3, indicating that the prediction effect of the model after the fusion cycle is better than that of the original model, and the accuracy is increased by 48% on average. In the fusion cycle model, the prediction effects of the rough tree, boosted tree, narrow neural network, and three-layer neural network are relatively accurate, with RMSE around 0.13. Among them, the boosted tree model has the lowest RMSE after the fusion cycle, which is 0.1253, that is, the prediction result is the most accurate. The XGBoost algorithm model selected in this application is an improved algorithm for the boosted tree, which integrates gradient boosting technology and a series of optimization measures, provides high-precision prediction performance and computational efficiency, and performs outstandingly in processing complex nonlinear relationships, coping with large-scale data sets, and supporting parallelization and distributed computing.

[0078] (2) The model proposed in this application is integrated into the gas special system of the H City Lifeline Safety Monitoring and Early Warning Platform. After one year of operation and testing, a total of 25,544 biogas methane accumulation alarm events in H City have been predicted. Some of the prediction results are shown in the table below. Among them, the prediction accuracy rate reached more than 95% for 24,545 events, accounting for 96.09% of the total number of alarm events. Relevant personnel graded the alarm events based on the model prediction results and quickly took effective disposal measures.

[0079]

[0080] The above specific implementation methods are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to examples, a person skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the scope of the technical solution of the present invention, which should be included in the scope of the claims of the present invention.

Claims

1. A method for constructing a methane concentration prediction model based on the periodic variation characteristics of biogas, characterized in that: The following steps are involved: S1. Establish a primary prediction model for biogas methane concentration based on XGBoost algorithm; S2. Collect monitoring data on methane concentration in biogas, optimize the training data structure of the primary prediction model using linear interpolation and sliding window technology, and determine the optimal sampling interval and optimal sliding window length; S3. Perform Fourier transform on the monitoring data of methane concentration in biogas to obtain the variation period of methane concentration in biogas; S4. After determining the period, the Fourier series is used to fit the variation trend of each period to obtain the period variation vector, thereby correcting the methane concentration period and constructing a periodic prediction model that integrates periodic characteristics; S5. Combine genetic algorithm to optimize the cycle weights, determine the optimal weights, and establish the optimal biogas methane prediction model.

2. The construction method according to claim 1, characterized in that: In step S1, the XGBoost algorithm is an additive model consisting of M decision trees, expressed as: Among them, f represents the decision tree, F represents the function of all decision trees, and x i Represents the input feature vector of the i-th sample. The XGBoost algorithm uses linear interpolation and sliding window processing, sets the input feature time series to the concentration values ​​at the past n time points, outputs the feature to the concentration value at the current time point, and divides the data set into a training set and a test set. The training set participates in model training, and the test set verifies the model prediction effect.

3. The construction method according to claim 2, characterized in that: During the training process, XGBoost optimizes the model by minimizing the objective function, which includes training loss and regularization terms. The training loss uses the mean square error MSE, and the regularization term is used to control the complexity of the model and prevent overfitting. XGBoost corrects the previous prediction error by gradually adding new trees. The prediction update of each step is based on the residual of the previous step. The final prediction value is obtained by accumulating the prediction values ​​of all regression trees.

4. The construction method according to claim 3, characterized in that: In the regression process, the objective function of the additive model is: Where l is the training loss function, which is set to mean square error MSE in this application, Ω represents the regularization term, Vector mapping can improve the regularization parameter Ω(f) of each tree, which can be expressed as: XGBoost uses a forward phased algorithm model to simplify the algorithm. Each time a decision tree is added to the model, a new function is learned and its coefficients are used to fit the residuals of the previous prediction. When the sth step of learning begins, x i The predicted value can be expressed as The objective function can be expressed as:

5. The construction method according to claim 1, characterized in that: Step S2 includes: monitoring the methane concentration of underground biogas with a continuous collection time of no less than 1 year and a sampling interval of 5 minutes to 2 hours. The monitoring data are sampled and processed by linear interpolation. After processing, the sampling intervals are 1h, 30min, 15min and 5min respectively, so as to obtain a one-dimensional time series with the same sampling interval. The linear interpolation formula is as follows: Among them, x is the sampling time point, y is the methane concentration at that time point, (x0, y0) is the unknown point that needs to be interpolated, (x1, y1) and (x2, y2) are the known points on both sides of (x0, y0).

6. The construction method according to claim 5, characterized in that: In step S2, the sliding window method is introduced to process the data after linear interpolation, and the length is defined as k, x k is the methane concentration data at the kth time point. When time t=1, the 1st to kth points are used as the input data for model training, and the k+1th point is used as the output data of the model, that is, the model prediction value. During the training process, the sliding window is kept unchanged so that the data is continuously updated in the window to achieve real-time prediction of methane concentration.

7. The construction method according to claim 1, characterized in that: Step S3 includes: introducing Fourier transform and Fourier series to realize the fusion of original concentration data and its periodic characteristics, using Fourier transform to decouple methane concentration data, and obtaining the period of biogas methane concentration change. Fourier transform converts the signal from time domain to frequency domain, which is used to analyze the different frequency components contained in the signal, and the reciprocal of the frequency is the period of the signal. Based on this principle, the Fourier transform method is used to extract the periodic characteristics of the monitored methane concentration. The specific formula is as follows: F(ω)=∫f(t)e -jωt dt In the formula, F(ω) represents the complex function in the frequency domain, f(t) represents the function in the time domain, ω represents the frequency in times / h, and e -jωt It is a complex exponential function. The Fourier transform formula decomposes the function f(t) into a series of complex amplitude and phase combinations, which are used to describe the contribution of the function at different frequencies.

8. The construction method according to claim 7, characterized in that: Step S4 includes: based on the period obtained by Fourier transform, using Fourier series to fit the methane concentrations of different periods to obtain a periodic methane concentration correction vector Γ, correcting the periodic vector Γ, the correction factor is recorded as w, and introducing a Fourier series expansion to fit it. The Fourier series is a method for decomposing a periodic signal into multiple sinusoidal wave signals of different frequencies. The calculation method of the periodic vector Γ is shown in the following formula: Where T is the period, a0, a i , b i is the coefficient; n represents the number of expansion terms, which determines the number of sine and cosine functions used to approximate the original function, where n = 5; When using the periodic eigenvalue to correct the original methane concentration, it is first necessary to multiply the periodic vector Γ(t) and the periodic vector correction factor w and sum them to obtain the methane concentration correction sequence P(t), as shown in the following formula: P(t)=w1×Γ 12h (t)+w2×Γ 24h (t)+w3×Γ 1m (t)+w4×Γ 1y (t) Then multiply each time series element in P(t) by the original methane concentration data d(t) to obtain D(t), as shown in the following formula. Through the above operation, the fusion of the original concentration data and the periodic characteristics can be achieved. D(t)=P(t)·d(t) Where d(t) is a time series with a length of M, and the lengths of Γ(t), P(t), and D(t) are also M; Γ(t) is a periodic vector, which is composed of the fitted values ​​of the Fourier series in each period; w 1,2,3,4 is the period vector correction factor, representing the influence of different periods on the model; P(t) is the methane concentration correction sequence, used to correct the original methane concentration; d(t) is the original methane concentration time series; D(t) is the fusion sequence of the original concentration data and the periodic characteristics.

9. The construction method according to claim 8, characterized in that: Step S5 includes: substituting the fitting curve values ​​of each period into the original concentration data to obtain methane concentration data with periodic characteristics, setting a set of initial period weights [w1', w2', w3', w4'], substituting them into the XGBoost prediction model, using a genetic algorithm to optimize the period weights, using the RMSE of the training set prediction results as the objective function, obtaining the optimized period weights [w1, w2, w3, w4], and obtaining the model with the best prediction results.

10. A methane concentration prediction model constructed by the method for constructing a methane concentration prediction model based on the periodic variation characteristics of biogas according to any one of claims 1 to 9.

Citation Information

Cited By

  • Informatization data management system and method for intelligent operation and maintenance equipment box

    CN119831577A

  • An information-based data management system and method for intelligent operation and maintenance equipment boxes

    CN119831577B

  • Combustible gas wireless monitoring system and method based on machine learning algorithm

    CN120065861A