Energy management system for oil and gas field kowtow machine energy storage cabinet
By constructing a sample set and screening key features, the remaining service days of oil and gas field pumping units are predicted using multi-model fusion technology. This solves the problem of insufficient accuracy in existing technologies, achieves high-precision prediction and dynamic energy management, reduces operating costs, and extends equipment life.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-19
- Publication Date
- 2026-03-24
AI Technical Summary
Existing technology cannot accurately predict the remaining service days of the energy storage cabinet of the oil and gas field pumping unit, resulting in frequent sudden failures, increased unplanned downtime, and impact on production safety and economic benefits.
By constructing a sample set, calculating the correlation and dependency of features, screening key features, training random forest, BP, and SVR models, combining the comprehensive model to output the remaining days of use, and optimizing energy management based on the state partitioning strategy.
It achieves high-precision prediction of the remaining service life of the pumping unit, improves the model's generalization ability, dynamically adjusts energy management strategies, reduces operating costs, and extends asset life.
Smart Images

Figure CN121723322A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of energy management technology, specifically to an energy management system for the energy storage cabinet of an oil and gas field pumping unit. Background Technology
[0002] The energy management system for the energy storage cabinet of the oil and gas field pumping unit uses machine learning to predict the maintenance cycle of the pumping unit and dynamically optimize the operation strategy of the energy storage cabinet, realizing a closed-loop linkage between predictive maintenance and refined energy management, significantly reducing costs and increasing efficiency, and ensuring production safety. Patent application number 202010430569.7 discloses "an energy storage management method, system, and electronic device for pumping units, the method comprising: acquiring battery status information of the energy storage device; charging or discharging the energy storage device according to the determined battery status information; real-time monitoring of the motor used in the pumping unit, returning motor operation-related information and demand information to the main controller; controlling the motor operation based on the returned motor operation and demand information, and acquiring the energy fed back during motor braking; determining the power provided by the controllable ACDC module according to the power information of the motor controller to control the power balance of the energy storage device." The energy storage management method of this invention enables the reuse of energy fed back during motor braking, achieving better energy-saving effects and improving the power factor of the equipment.
[0003] The aforementioned existing technologies have solved problems such as the inability to reuse the energy fed back during motor braking. However, during system operation, the lack of accurate prediction of the remaining days of use leads to frequent sudden failures and a significant increase in unplanned downtime, directly impacting crude oil production. The energy management of the energy storage cabinet is out of sync with the health status of the equipment due to a lack of foresight. This not only fails to achieve optimal economic scheduling and misses out on energy-saving benefits, but may also exacerbate damage to the equipment during its decline period due to improper power surges, and even trigger secondary failures. Summary of the Invention
[0004] The purpose of this invention is to provide an energy management system for the energy storage cabinet of an oil and gas field pumping unit, so as to solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the present invention provides the following technical solution: an energy management system for an energy storage cabinet of an oil and gas field pumping unit, comprising a stage determination unit and an emergency analysis unit; The historical data processing unit acquires historical operating data of oil and gas field pumping units, constructs a sample set based on the operating data, and calculates the correlation and dependency of each feature using the feature values contained in the sample set. The feature selection unit determines the guidance ratio of each feature, calculates the corresponding comprehensive score according to the correlation, dependence and guidance ratio of each feature, and filters features based on the comprehensive score. The integrated model building unit reconstructs the sample set using the selected features, trains the random forest model, BP model, and SVR model, determines the optimal weights, and then evaluates the performance coefficients of the integrated model using the samples. The day output unit acquires real-time operating data of the oil and gas field pumping unit, processes the operating data according to the feature categories contained in the candidate set, determines the feature vector corresponding to the current operating data, and transmits it to the random forest model, BP model and SVR model for analysis. The results are combined into a prediction vector and transmitted to the comprehensive model, which outputs the final predicted number of remaining days of use.
[0006] Preferably, the historical data processing unit includes a running data acquisition module, a correlation calculation module, and a dependency calculation module; The operational data acquisition module obtains historical operational data of the oil and gas field pumping unit, preprocesses it, and generates a sample set. ,in ,in , Indicates the first The feature vector of each sample Indicates the first The target value for each sample is, specifically, the remaining number of days of use. Indicates the first The first sample 1 eigenvalue, Indicates the first The first sample 1 eigenvalue, This indicates the total number of samples. Indicates the number of feature categories.
[0007] The correlation calculation module counts the first [number] of all samples. eigenvalues and target value ,according to and Calculate the first one respectively Features and target mean ,use Analysis and correlation between ,in Calculate the features sequentially and target correlation between ,in Indicates the first One characteristic, express and target The degree of correlation between them, among which , , Indicates the first The first sample 1 eigenvalue, Indicates the first The target value for each sample Indicates the serial number; The dependency calculation module determines the first Features and target Then, using eigenvalues and target value Calculate the characteristic region coefficient and target area coefficient ,use and Analyze the dependency ,in , This indicates the total number of samples. Indicates the preset quantity. The rate of change function representing the factorial logarithm is used to determine the characteristics in sequence. Dependence ,in express and target The degree of dependence between them.
[0008] Preferably, the dependency calculation module utilizes feature values. and target value Calculate the characteristic region coefficient and target area coefficient The specific process is as follows: S101, Obtain Each sample data pair Determine the preset quantity Calculate the sample data pairs Other data pairs Distance between ,in , Indicates the first The target value for each sample Indicates the first The first sample 1 eigenvalue, express Data pair The distance between them Indicates the total number of samples; S102, Filter out those that are related to The Minimum distance ,according to Generate the range of feature values and target range Statistically, each in and Number of data points in and Calculate in sequence Corresponding number of data points and ,in Indicates being in The number of data points within the range of eigenvalues. Indicates being in The number of data points within the target interval; S103, according to and Analyze the characteristic region coefficients and target area coefficient ,in , , Indicates that the sample data is in Number of data points within the interval range The function representing the rate of change of the factorial logarithm. Indicates the serial number.
[0009] Preferably, the feature selection unit includes a guidance coefficient calculation module, a guidance ratio calculation module, a comprehensive score calculation module, and a feature sorting module; After determining the trained random forest model, the guidance coefficient calculation module selects the first [number] [unit] [of the model]. The first decision tree One judgment point According to characteristics The rule will reach the sample set at that point Divided into Subsample set Then calculate exist On the guidance coefficient ,in ,in Represents the subset of samples after partitioning. The amount of data, Represents the sample set The amount of data, express The degree of chaos express The degree of chaos Indicates the number of subsamples. Indicates the first A subset of samples, The process for determining the trained random forest model, where the index represents the sequence number, is as follows: S201, The preprocessed sample set The dataset is divided into training, validation, and test sets. A random forest model is fitted using sample data from the training set. During initial training, the model's default parameters are used, and the performance coefficients of the initial random forest model are evaluated on the validation set. S202. After determining the optimal hyperparameters of the random forest using the grid search method, the model is retrained using the training set, and its performance coefficients are evaluated by making predictions on the test set. The guidance ratio calculation module statistically analyzes all decisions made according to features within each decision tree of the random forest model. After dividing the judgment points according to the rules, the corresponding guidance coefficients are accumulated to obtain the features. Total guidance coefficient in random forest model Calculate the features sequentially Total guidance coefficient ,use Analysis of the guiding ratio ,in , Indicates the first One characteristic, express Total guidance coefficient, express The guiding ratio, express Total guidance coefficient, Indicates the number of feature categories; The comprehensive score calculation module sets weighting coefficients. ,according to Calculate the features Overall score ,in , express and target The degree of correlation between them express and target The degree of correlation between them express and target Dependence between them express and target Dependency between them; The feature sorting module sorts all features according to their comprehensive scores from largest to smallest. If there exists... Then the corresponding Stored in the candidate set, otherwise no operation is performed. The characteristics of the candidate set include the number of pumping operations per unit time, wellbore inclination, crude oil content, length of one up-and-down movement of the pumping unit, total daily production, pump hanger depth, energy source type, chemical content in the produced fluid, and maximum load of the polished rod.
[0010] Preferably, the integrated model building unit includes a sample building module and a sample prediction module; The sample construction module utilizes all features of the candidate set and the sample set. Construct a new sample set ,in ,in , Represents the number of features in the candidate set. Indicates the first The first sample 1 eigenvalue, Indicates the first A new feature vector for each sample. Indicates the first The target value for each sample will Divided into mutually exclusive training sets Validation set and test set ; The sample prediction module utilizes the training set. The random forest model, backpropagation (BP) model, and SVR model were trained separately and tested using a validation set. Adjust the hyperparameters of the corresponding models, and use the adjusted random forest model, BP model, and SVR model respectively. The first Sample Make predictions and determine Prediction vector ,in , Indicates the serial number. This represents the prediction result output by the random forest model. This represents the prediction result output by the SVR model. This represents the prediction result output by the BP model. Indicates the first in the verification set The feature vector of each sample Indicates the first in the verification set The target value for each sample will and Combine to generate new samples ,right After all samples are predicted, the resulting new samples are stored in the fusion training set.
[0011] Preferably, the integrated model construction unit further includes a weight analysis module and a performance coefficient evaluation module; The weight analysis module uses linear regression as the comprehensive model and sets weight combinations. ,in A joint matrix is constructed using the prediction vectors corresponding to each sample in the fusion training set. After determining the loss function, the optimal weights are generated using the joint matrix and the target value vectors in the fusion training set. ,in The loss function is specifically as follows: in, The integrated model represents the first... The final predicted value for each sample. Indicates the first in the fusion training set The target value for each sample express The predicted vector, Represents the target value vector. Represents the design matrix. Indicates the weight combination, Indicates the number of samples in the validation set. All represent the coefficients in the weighted combination. All represent coefficients in the optimal weights. Represents the loss function. Indicates the serial number; The performance evaluation module will use the test set The sample data is input into the random forest model, BP model, and SVR model. The resulting prediction vectors and target values form new samples, which are then transmitted to the integrated model for analysis, thereby outputting the final prediction results. The performance coefficients corresponding to the integrated model are calculated based on the prediction results and target values. The integrated model is specifically as follows: in, Represents the model function, This represents the prediction results in the random forest model, SVR model, and BP model.
[0012] Preferably, the stage determination unit includes a stage division module, a cost calculation module, and an instruction sequence generation module; The phase division module divides the oil and gas field pumping unit into three status phases based on the remaining usage days: the health phase, the early warning phase, and the emergency phase. Specifically, the health phase is when the remaining usage days of the current oil and gas field pumping unit are greater than 30 days, the early warning phase is when the remaining usage days are greater than 7 days and less than or equal to 30 days, and the emergency phase is when the remaining usage days are less than or equal to 7 days. The cost calculation module determines the status stage of the oil and gas field pumping unit based on the predicted remaining usage days. If the current status stage is healthy, it reads the current battery state of charge, battery power, battery stress coefficient, cost coefficient, grid power, previous grid power, load forecast for the next 24 hours, and electricity price forecast from the energy storage unit, and then calculates the cost based on the battery power. Battery stress coefficient Cost coefficient and state of charge Calculate the cost of battery degradation ,in ,in Represents the natural constant, according to Construct the corresponding objective function and constraints; The instruction sequence generation module analyzes the objective function and constraints to obtain the optimal battery power instruction sequence for the future time period.
[0013] Preferably, the emergency analysis unit includes a charge setting module, a condition adjustment module, and an emergency processing module; If the current state is a warning stage, the allowable charge setting module calculates the minimum allowable state of charge of the battery based on the predicted remaining usage days. and dynamic power limit ,in , Indicates the upper limit value under charged state. This indicates the initial state of charge during the warning phase. This represents the predicted number of remaining days of use within time t. , Indicates rated power; The condition adjustment module adjusts the objective function and constraints according to the minimum allowable state of charge and dynamic power upper limit of the battery, and then obtains the optimal battery power command sequence for the future time period based on the adjusted function and conditions. If the current state is an emergency stage, the emergency handling module sets a minimum value for battery charge state, prioritizes ensuring the power support for the energy storage cabinet during sudden power outages, limits its charging and discharging power, sets its maximum power to 30% of the rated value, and performs a reduction in charging frequency.
[0014] Compared with the prior art, the beneficial effects of the present invention are: This invention achieves precise screening of key features most relevant to the remaining service life from massive operating parameters by comprehensively analyzing the correlation, dependence, and orientation ratio of features. This not only improves the training efficiency of subsequent prediction models but also enhances the generalization ability of models by eliminating irrelevant noise. At the same time, it effectively integrates the advantages of different algorithms by using multi-model fusion technology, overcoming the limitations of a single model. Ultimately, it achieves high-precision and robust prediction of the remaining service life of the pumping unit, providing reliable data insights for predictive maintenance. This invention deeply couples the prediction results with the energy management of the energy storage cabinet, and innovatively introduces a state-based model predictive control strategy, which transforms energy management from passive response to proactive planning. By defining three states—health, decline warning, and emergency shutdown—and customizing corresponding adjustment strategies for each, the invention achieves dynamic and precise switching of management objectives, thereby reducing operating costs and extending asset life while ensuring production continuity. Attached Figure Description
[0015] Figure 1 A schematic diagram of the overall system flow is provided for embodiments of the present invention. Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] Please see Figure 1 The present invention provides a technical solution: an energy management system for an energy storage cabinet of an oil and gas field pumping unit, comprising a stage determination unit and an emergency analysis unit; The historical data processing unit acquires historical operating data of oil and gas field pumping units, constructs a sample set based on the operating data, and calculates the correlation and dependency of each feature using the feature values contained in the sample set. The feature selection unit determines the guidance ratio of each feature, calculates the corresponding comprehensive score according to the correlation, dependence and guidance ratio of each feature, and selects features based on the comprehensive score. The integrated model building unit reconstructs the sample set using the selected features, trains the random forest model, BP model, and SVR model, determines the optimal weights, and then evaluates the performance coefficients of the integrated model using the samples. The day output unit is used to obtain real-time operating data of the oil and gas field pumping unit. The operating data is processed according to the feature categories contained in the candidate set. After determining the feature vector corresponding to the current operating data, it is transmitted to the random forest model, BP model and SVR model for analysis. The results are combined into a prediction vector and transmitted to the comprehensive model. The comprehensive model outputs the final predicted number of remaining days of use.
[0018] The historical data processing unit includes a runtime data acquisition module, a correlation calculation module, and a dependency calculation module; The data acquisition module obtains historical operating data of oil and gas field pumping units, preprocesses it, and generates a sample set. ,in ,in , Indicates the first The feature vector of each sample Indicates the first The target value for each sample is, specifically, the remaining number of days of use. Indicates the first The first sample 1 eigenvalue, Indicates the first The first sample 1 eigenvalue, This indicates the total number of samples. Indicates the number of feature categories.
[0019] The correlation calculation module counts the number of all samples. eigenvalues and target value ,according to and Calculate the first one respectively Features and target mean ,use Analysis and correlation between ,in Calculate the features sequentially and target correlation between ,in Indicates the first One characteristic, express and target The degree of correlation between them, among which , , Indicates the first The first sample 1 eigenvalue, Indicates the first The target value for each sample, Indicates the serial number; The dependency calculation module determines the first Features and target Then, using eigenvalues and target value Calculate the characteristic region coefficient and target area coefficient ,use and Analyze the dependency ,in , This indicates the total number of samples. Indicates the preset quantity. The rate of change function representing the factorial logarithm is used to determine the characteristics in sequence. Dependence ,in express and target Dependency between them; The dependency calculation module utilizes feature values. and target value Calculate the characteristic region coefficient and target area coefficient The specific process is as follows: S101, Obtain Each sample data pair Determine the preset quantity Calculate the sample data pairs Other data pairs Distance between ,in , Indicates the first The target value for each sample Indicates the first The first sample 1 eigenvalue, express Data pair The distance between them Indicates the total number of samples; S102, Filter out those that are related to The Minimum distance ,according to Generate the range of feature values and target range Statistically, each in and Number of data points in and Calculate in sequence Corresponding number of data points and ,in Indicates being in The number of data points within the range of eigenvalues. Indicates being in The number of data points within the target interval; S103, according to and Analyze the characteristic region coefficients and target area coefficient ,in , , Indicates that the sample data is in Number of data points within the interval range The function representing the rate of change of the factorial logarithm. Indicates the serial number; The feature selection unit includes a guidance coefficient calculation module, a guidance ratio calculation module, a comprehensive score calculation module, and a feature ranking module; After determining the trained random forest model, the guidance coefficient calculation module selects the first [number] [unit] [level] ... The first decision tree One judgment point According to characteristics The rule will reach the sample set at that point Divided into Subsample set Then calculate exist On the guidance coefficient ,in ,in Represents the subset of samples after partitioning. The amount of data, Represents the sample set The amount of data, express The degree of chaos express The degree of chaos Indicates the number of subsamples. Indicates the first A subset of samples, The sequence number is used to determine the trained random forest model. S201, The preprocessed sample set The dataset is divided into training, validation, and test sets. A random forest model is fitted using sample data from the training set. During initial training, the model's default parameters are used, and the performance coefficients of the initial random forest model are evaluated on the validation set. S202. After determining the optimal hyperparameters of the random forest using the grid search method, the model is retrained using the training set, and its performance coefficients are evaluated by making predictions on the test set. The guided proportion calculation module statistically analyzes all decisions made according to features within each decision tree of the random forest model. After dividing the judgment points according to the rules, the corresponding guidance coefficients are accumulated to obtain the features. Total guidance coefficient in random forest model Calculate the features sequentially Total guidance coefficient ,use Analysis of the guiding ratio ,in , Indicates the first One characteristic, express Total guidance coefficient, express The guiding ratio, express Total guidance coefficient, Indicates the number of feature categories; Weighting coefficients are set in the overall score calculation module. ,according to Calculate the features Overall score ,in , express and target The degree of correlation between them express and target The degree of correlation between them express and target Dependence between them express and target Dependency between them; The feature ranking module sorts all features according to their comprehensive scores from largest to smallest. If any... Then the corresponding Stored in the candidate set, otherwise no operation is performed. The characteristics in the candidate set include the number of pumping operations per unit time, wellbore inclination, crude oil content, length of one up-and-down movement of the pumping unit, total daily production, pump hanger depth, energy source type, chemical content in the produced fluid, and maximum load of the polished rod. The integrated model building unit includes a sample building module and a sample prediction module; The sample construction module utilizes all features of the candidate set and the sample set. Construct a new sample set ,in ,in , Represents the number of features in the candidate set. Indicates the first The first sample 1 eigenvalue, Indicates the first A new feature vector for each sample. Indicates the first The target value for each sample will Divided into mutually exclusive training sets Validation set and test set ; The sample prediction module utilizes the training set The random forest model, backpropagation (BP) model, and SVR model were trained separately and tested using a validation set. Adjust the hyperparameters of the corresponding models, and use the adjusted random forest model, BP model, and SVR model respectively. The first Sample Make predictions and determine Prediction vector ,in , Indicates the serial number. This represents the prediction result output by the random forest model. This represents the prediction result output by the SVR model. This represents the prediction result output by the BP model. Indicates the first in the verification set The feature vector of each sample Indicates the first in the verification set The target value for each sample will and Combine to generate new samples ,right After all samples are predicted, the newly generated samples are stored in the fusion training set. The integrated model building unit also includes a weight analysis module and a performance coefficient evaluation module; The weighting analysis module uses linear regression as the comprehensive model and sets weight combinations. ,in A joint matrix is constructed using the prediction vectors corresponding to each sample in the fusion training set. After determining the loss function, the optimal weights are generated using the joint matrix and the target value vectors in the fusion training set. ,in The loss function is as follows: in, The integrated model represents the first... The final predicted value for each sample. Indicates the first in the fusion training set The target value for each sample express The predicted vector, Represents the target value vector. Represents the design matrix. Indicates the weight combination, Indicates the number of samples in the validation set. All represent the coefficients in the weighted combination. All represent coefficients in the optimal weights. Represents the loss function. Indicates the serial number; The performance coefficient evaluation module will test set The sample data is input into the Random Forest model, Backpropagation (BP) model, and SVR model. The resulting prediction vectors and target values form new samples, which are then fed into the integrated model for analysis. The final prediction results are then output. Based on the prediction results and target values, the performance coefficients of the integrated model are calculated. The integrated model is as follows: in, Represents the model function, This represents the prediction results in the random forest model, SVR model, and BP model. The stage determination unit includes a stage division module, a cost calculation module, and an instruction sequence generation module; The phase division module divides the oil and gas field pumping unit into three status phases based on the remaining usage days: the healthy phase, the early warning phase, and the emergency phase. Specifically, the healthy phase is when the remaining usage days of the current oil and gas field pumping unit are greater than 30 days, the early warning phase is when the remaining usage days are greater than 7 days and less than or equal to 30 days, and the emergency phase is when the remaining usage days are less than or equal to 7 days. The cost calculation module determines the status stage of the oil and gas field pumping unit based on the predicted remaining usage days. If the current status stage is healthy, it reads the current battery state of charge, battery power, battery stress coefficient, cost coefficient, grid power, previous grid power, load forecast for the next 24 hours, and electricity price forecast from the energy storage unit, and then calculates the cost based on the battery power. Battery stress coefficient Cost coefficient and state of charge Calculate the cost of battery degradation ,in ,in Represents the natural constant, according to Construct the corresponding objective function and constraints. The objective function is as follows: in, Indicates the current moment. Indicates the prediction time domain, Indicates the time step. This indicates a predicted electricity price. Indicates the penalty coefficient. This represents the rate of change of grid power per unit time. Indicates the cost of battery degradation. Indicates time, Describe the objective function. Indicates time The power of the grid, This represents the objective function.
[0020] The specific constraints are as follows: in, Indicates time The power of the grid, Indicates time The load forecast value, Indicates battery power. Indicates the upper limit value under charged state. Indicates the upper limit of the state of charge. In time The state of charge of the battery. Indicates the maximum allowable charging power of the battery. Indicates the battery's maximum allowable discharge power; The instruction sequence generation module analyzes the objective function and constraints to obtain the optimal battery power instruction sequence for the future time period. The emergency analysis unit includes a charge setting module, a condition adjustment module, and an emergency handling module; If the current state is a warning stage, the allowable charge setting module calculates the minimum allowable state of charge of the battery based on the predicted remaining usage days. and dynamic power limit ,in , Indicates the upper limit value under charged state. This indicates the initial state of charge during the warning phase. This represents the predicted number of remaining days of use within time t. , Indicates rated power; The condition adjustment module adjusts the objective function and constraints according to the minimum allowable state of charge of the battery and the dynamic power upper limit, and then obtains the optimal battery power command sequence for the future time period based on the adjusted function and conditions. If the current state is an emergency phase, the emergency handling module sets a minimum value for the battery charge state, prioritizes ensuring the power support during sudden power outages, limits the charging and discharging power of the energy storage cabinet, sets its maximum power to 30% of the rated value, and performs a reduction in the number of charges.
[0021] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0022] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. An energy management system for an energy storage cabinet of an oil and gas field pumping unit, characterized in that, Includes a phase determination unit and an emergency analysis unit; The historical data processing unit acquires historical operating data of oil and gas field pumping units, constructs a sample set based on the operating data, and calculates the correlation and dependency of each feature using the feature values contained in the sample set. The feature selection unit determines the guidance ratio of each feature, calculates the corresponding comprehensive score according to the correlation, dependence and guidance ratio of each feature, and filters features based on the comprehensive score. The integrated model building unit reconstructs the sample set using the selected features, trains the random forest model, BP model, and SVR model, determines the optimal weights, and then evaluates the performance coefficients of the integrated model using the samples. The day output unit acquires real-time operating data of the oil and gas field pumping unit, processes the operating data according to the feature categories contained in the candidate set, determines the feature vector corresponding to the current operating data, and transmits it to the random forest model, BP model and SVR model for analysis. The results are combined into a prediction vector and transmitted to the comprehensive model, which outputs the final predicted number of remaining days of use.
2. The energy management system for an energy storage cabinet of an oil and gas field pumping unit according to claim 1, characterized in that: The historical data processing unit includes a running data acquisition module, a correlation calculation module, and a dependency calculation module; The operational data acquisition module obtains historical operational data of the oil and gas field pumping unit, preprocesses it, and generates a sample set. ,in ,in , Indicates the first The feature vector of each sample Indicates the first The target value for each sample is, specifically, the remaining number of days of use. Indicates the first The first sample 1 eigenvalue, Indicates the first The first sample 1 eigenvalue, This indicates the total number of samples. Indicates the number of feature categories.
3. The correlation calculation module statistically analyzes the first-order correlation of all samples. eigenvalues and target value ,according to and Calculate the first one respectively Features and target mean ,use Analysis and correlation between ,in Calculate the features sequentially and target correlation between ,in Indicates the first One characteristic, express and target The degree of correlation between them, among which , , Indicates the first The first sample 1 eigenvalue, Indicates the first The target value for each sample Indicates the serial number; The dependency calculation module determines the first Features and target Then, using eigenvalues and target value Calculate the characteristic region coefficient and target area coefficient ,use and Analyze the dependency ,in , This indicates the total number of samples. Indicates the preset quantity. The rate of change function representing the factorial logarithm is used to determine the characteristics in sequence. Dependence ,in express and target The degree of dependence between them.
4. The energy management system for an energy storage cabinet of an oil and gas field pumping unit according to claim 2, characterized in that: The dependency calculation module utilizes feature values... and target value Calculate the characteristic region coefficient and target area coefficient The specific process is as follows: S101, Obtain Each sample data pair Determine the preset quantity Calculate the sample data pairs Other data pairs Distance between ,in , Indicates the first The target value for each sample Indicates the first The first sample 1 eigenvalue, express Data pair The distance between them Indicates the total number of samples; S102, Filter out those that are related to The Minimum distance ,according to Generate the range of feature values and target range Statistically, each in and Number of data points in and Calculate in sequence Corresponding number of data points and ,in Indicates being in The number of data points within the range of eigenvalues. Indicates being in The number of data points within the target interval; S103, according to and Analyze the characteristic region coefficients and target area coefficient ,in , , Indicates that the sample data is in Number of data points within the interval range The function representing the rate of change of the factorial logarithm. Indicates the serial number.
5. The energy management system for an energy storage cabinet of an oil and gas field pumping unit according to claim 1, characterized in that: The feature selection unit includes a guidance coefficient calculation module, a guidance ratio calculation module, a comprehensive score calculation module, and a feature sorting module; After determining the trained random forest model, the guidance coefficient calculation module selects the first [number] [unit] [of the model]. The first decision tree One judgment point According to characteristics The rule will reach the sample set at that point Divided into Subsample set Then calculate exist On the guidance coefficient ,in ,in Represents the subset of samples after partitioning. The amount of data, Represents the sample set The amount of data, express The degree of chaos express The degree of chaos Indicates the number of subsamples. Indicates the first A subset of samples, Indicates the serial number; The guidance ratio calculation module statistically analyzes all decisions made according to features within each decision tree of the random forest model. After dividing the judgment points according to the rules, the corresponding guidance coefficients are accumulated to obtain the features. Total guidance coefficient in random forest model Calculate the features sequentially Total guidance coefficient ,use Analysis of the guiding ratio ,in , Indicates the first One characteristic, express Total guidance coefficient, express The guiding ratio, express Total guidance coefficient, Indicates the number of feature categories; The comprehensive score calculation module sets weighting coefficients. ,according to Calculate the features Overall score ,in , express and target The degree of correlation between them express and target The degree of correlation between them express and target Dependence between them express and target Dependency between them; The feature sorting module sorts all features according to their comprehensive scores from largest to smallest. If there exists... Then the corresponding Store in the candidate set, otherwise no operation is performed.
6. The energy management system for an energy storage cabinet of an oil and gas field pumping unit according to claim 1, characterized in that: The integrated model construction unit includes a sample construction module and a sample prediction module; The sample construction module utilizes all features of the candidate set and the sample set. Construct a new sample set ,in ,in , Represents the number of features in the candidate set. Indicates the first The first sample 1 eigenvalue, Indicates the first A new feature vector for each sample. Indicates the first The target value for each sample will Divided into mutually exclusive training sets Validation set and test set ; The sample prediction module utilizes the training set. The random forest model, backpropagation model, and SVR model were trained separately and tested using a validation set. Adjust the hyperparameters of the corresponding models, and use the adjusted random forest model, BP model, and SVR model respectively. The first Sample Make predictions and determine Prediction vector ,in , Indicates the serial number. This represents the prediction result output by the random forest model. This represents the prediction result output by the SVR model. This represents the prediction result output by the BP model. Indicates the first in the verification set The feature vector of each sample Indicates the first in the verification set The target value for each sample will and Combine to generate new samples ,right After all samples are predicted, the resulting new samples are stored in the fusion training set.
7. The energy management system for an energy storage cabinet of an oil and gas field pumping unit according to claim 5, characterized in that: The integrated model construction unit also includes a weight analysis module and a performance coefficient evaluation module; The weight analysis module uses linear regression as the comprehensive model and sets weight combinations. ,in A joint matrix is constructed using the prediction vectors corresponding to each sample in the fused training set. After determining the loss function, the optimal weights are generated using the joint matrix and the target value vectors in the fused training set. ,in The loss function is specifically as follows: in, The integrated model represents the first... The final predicted value for each sample. Indicates the first in the fusion training set The target value for each sample express The predicted vector, Represents the target value vector. Represents the design matrix. Indicates the weight combination, Indicates the number of samples in the validation set. All represent the coefficients in the weighted combination. All represent coefficients in the optimal weights. Represents the loss function. Indicates the serial number; The performance evaluation module will use the test set The sample data is input into the random forest model, BP model, and SVR model. The resulting prediction vectors and target values form new samples, which are then transmitted to the integrated model for analysis, thereby outputting the final prediction results. The performance coefficients corresponding to the integrated model are calculated based on the prediction results and target values. The integrated model is specifically as follows: in, Represents the model function, This represents the prediction results in the random forest model, SVR model, and BP model.
8. The energy management system for an energy storage cabinet of an oil and gas field pumping unit according to claim 1, characterized in that: The stage determination unit includes a stage division module, a cost calculation module, and an instruction sequence generation module; The phase division module divides the oil and gas field pumping unit into three status phases based on the remaining usage days: the health phase, the early warning phase, and the emergency phase. Specifically, the health phase is when the remaining usage days of the current oil and gas field pumping unit are greater than 30 days, the early warning phase is when the remaining usage days are greater than 7 days and less than or equal to 30 days, and the emergency phase is when the remaining usage days are less than or equal to 7 days. The cost calculation module determines the status stage of the oil and gas field pumping unit based on the predicted remaining usage days. If the current status stage is healthy, it reads the current battery state of charge, battery power, battery stress coefficient, cost coefficient, grid power, previous grid power, load forecast for the next 24 hours, and electricity price forecast from the energy storage unit, and then calculates the cost based on the battery power. Battery stress coefficient Cost coefficient and state of charge Calculate the cost of battery degradation ,in ,in Represents the natural constant, according to Construct the corresponding objective function and constraints; The instruction sequence generation module analyzes the objective function and constraints to obtain the optimal battery power instruction sequence for the future time period.
9. The energy management system for the energy storage cabinet of an oil and gas field pumping unit according to claim 1, characterized in that: The emergency analysis unit includes a charge setting module, a condition adjustment module, and an emergency processing module; If the current state is a warning stage, the allowable charge setting module calculates the minimum allowable state of charge of the battery based on the predicted remaining usage days. and dynamic power limit ,in , Indicates the upper limit value under charged state. This indicates the initial state of charge during the warning phase. This represents the predicted number of remaining days of use within time t. , Indicates rated power; The condition adjustment module adjusts the objective function and constraints according to the minimum allowable state of charge and dynamic power upper limit of the battery, and then obtains the optimal battery power command sequence for the future time period based on the adjusted function and conditions. If the current state is an emergency stage, the emergency handling module sets a minimum value for battery charge state, prioritizes ensuring the power support for the energy storage cabinet during sudden power outages, limits its charging and discharging power, sets its maximum power to 30% of the rated value, and performs a reduction in charging frequency.
Citation Information
Patent Citations
A method, system, and electronic device for energy storage management of oil pumping units.
CN111600322B