1. Introduction
Oil and gas enterprises use special energy programs to meet the requirements of critical infrastructure operations. These programs are aimed at reducing energy resource costs and consumption, as well as improving the energy efficiency and social responsibility of personnel/workers, which in turn affects energy efficiency [
1].
One of the promising measures that can be implemented to enhance the energy efficiency of production processes in the gas industry is the development and implementation of a short-term (1–3 days) load-forecasting system [
2,
3].
Forecasting of power consumption is essential for planning the operation of power systems [
4]. Many countries are introducing economic incentives to promote demand-responsive power consumption [
5]. One of the methods encouraging enterprises to plan their daily power consumption schedules is the wholesale electricity and capacity market [
2]. By connecting to such a market, gas industry enterprises can benefit from lower tariffs than those on the retail market, provided that accurate power consumption forecasting is taken into account, as electricity tariffs include charges for deviations of actual consumption from planned schedules. The consumption patterns of gas industry enterprises often have a high aperiodic component of the load, which requires consideration of numerous production factors, making the process of power consumption forecasting labor-intensive [
3].
Thus, the introduction of short-term power consumption forecasting system can enable:
Flattening of the power consumption curve;
Optimizing the operation of self-generation units and energy-storage systems;
Optimizing maintenance, repairs, and other support systems;
Minimization of power consumption costs.
Optimizing the operation of self-generation units and energy-storage systems can be achieved because their purpose is to manage the power consumption schedule, cover the enterprise’s own needs, and ensure power supply quality [
6].
Optimizing the support system processes becomes possible because increased accuracy in short-term power consumption forecasting allows the enterprise to develop an optimal maintenance schedule based on peak load hours [
7].
Cost minimization can be achieved by regulating tariffs on the wholesale electricity and power market through load planning and controllable load consumer scheduling due to the fact that the wholesale electricity and power tariffs incentivize off-peak power consumption. Additionally, since part of the electricity tariff accounts for deviations in consumed power from the forecasted amount, improving forecast accuracy can help reduce electricity costs [
2,
8].
Implementing this measure is complicated by the need to account for the influence of numerous production process factors on the power consumption schedule of gas industry enterprises [
8]. Generally, existing studies are aimed at short-term forecasts of power consumption in relation to power systems, microgrids, and residential power demand [
9,
10]. Due to the high proportion of periodic components in electricity consumption processes within power systems, the average forecast accuracy reaches 98–99% [
3,
10,
11,
12,
13].
For short-term (1–3 days) forecasting of power consumption schedules, various methods are applied, which can be divided into deterministic (statistical) methods and machine learning methods. The former include seasonal models [
14] and autoregression-based methods [
15,
16,
17].
Machine learning methods can account for many factors, including weather [
9,
18], production [
19], and their interdependencies [
20]. Studies on short-term power consumption forecasting for industrial enterprises to adjust power consumption in real-time based on demand within a microgrid are presented in [
21,
22]. The advantages of accounting for different factors, not just the seasonal factor, while using machine learning methods compared to deterministic ones have been demonstrated in studies [
20,
23,
24]. Typically, the best results of the accuracy of power consumption forecast are achieved using neural network models [
25,
26,
27], including recurrent [
28] and deep neural networks [
26,
29,
30], as well as ensemble decision trees [
31,
32]. Currently, there is a lack of studies on forecasting power consumption for gas industry enterprises.
However, despite the efficiency of machine learning methods, forecast accuracy can be up only to 60% due to the complexity of accounting for production processes. To address this issue, a multi-agent approach can be applied. Multi-agent methodology is a methodology for modeling production processes by decomposing them into agents. This methodology allows for investigating the behavior of real production processes by constructing loosely coupled autonomous agents that interact with each other to achieve set goals. An agent can be determined as an object that receives data from the environment and acts upon it [
33].
Based on the multi-agent approach, a multi-agent system (MAS) can be created, which is defined as a system consisting of several interacting agents. The terms multi-agent system and multi-agent approach are related but refer to different aspects of studying and applying agents. When discussing the term multi-agent system, the main focus is on the system as a whole, the mechanisms of interaction between agents, and between agents and the environment [
34]. The application of the multi-agent approach is associated with considering mechanisms for distributing tasks among agents, coordinating their actions, and managing their interactions to achieve individual and common goals. Thus, a multi-agent system is a type of system that consists of several interacting agents, while the multi-agent approach is a methodology for solving problems by decomposing production processes and objects into agents and their interactions. The difference lies in what the focus is on—the system itself or the methodology for designing and analyzing systems [
35].
Currently, multi-agent systems (MAS) are applied to solve various optimization problems related to the operation of enterprises and systems. Some of the applications of MAS include but are not limited to the following:
The selection of control strategies for microgrid modes considering energy-storage systems [
36,
37];
The management of power consumption in a microgrid with photovoltaic stations, introducing a generator agent whose objective function is to minimize power purchase costs based on forecasted generation [
38];
The management of a power system with renewable energy generation objects [
39];
Processing heterogeneous information in microgrid [
40].
The use of MAS for gas industry enterprises was proposed in [
41,
42]. The authors describe the use of generator agents, power supply system agents, and consumer agents. Agents are used to ensure the reliable operation of the enterprise by optimizing electrical modes, network topology, and power balance. This approach allows for analyzing the operation modes of the system. However, it should be noted that these articles primarily use an object-oriented approach, as the goals of the agents, their input and output data, and the interactions between agents are not defined or described.
It can be assumed that considering production process factors from the perspective of a multi-agent approach may improve the accuracy of power consumption forecasting for gas industry enterprises.
Furthermore, it should be noted that current research on power consumption forecasting primarily focuses on improving forecast accuracy, while the models remain “black boxes” for experts. This complicates the implementation of these models in enterprises due to experts’ lack of trust in the learning results of these models [
43]. Studies in the field of eXplainable Artificial Intelligence (XAI) were conducted to address this issue [
44,
45]. For complex models that are not interpretable, a posterior explanation can be used. Currently, posterior explanation in short-term power consumption forecasting is mainly represented by algorithms such as Local Interpretable Model-Agnostic Explanations (LIME) [
46,
47] and Shapley Additive exPlanations (SHAP) [
32,
48].
The drawback of the LIME method is the need to select, configure, and train a surrogate model, as well as the implicit violation of the accuracy principle, as the hypothesis that the surrogate model’s explanation corresponds to the decision-making process of the model under explanation is an untestable assumption.
For an expert, displaying the features that influenced the decision-making process along with their feature importance (weights) develops trust in the system and increases the probability of successful joint operation [
49]. Therefore, the SHAP-based method of additive explanation becomes relevant for the system of short-term power consumption forecast, which is installed at gas industry enterprises, where the model is used by an expert. The Shapley Additive exPlanations algorithm is based on the theoretically optimal Shapley values from Game Theory. SHAP determines the influence of each feature on the machine learning model’s results. Currently, SHAP is primarily used for the global explanation of parameter influence on model outputs in short-term power consumption forecasting [
50].
Based on the literature review, there is a gap in knowledge regarding the lack of research on power consumption forecasting for gas industry enterprises. This issue is associated with the complexity of accounting for numerous production process factors.
The objectives of the study are to develop a method for decomposing production processes at a gas industry enterprise using a multi-agent approach and to create a method for short-term power consumption forecasting at a gas industry enterprise based on explainable artificial intelligence.
The contributions of this study are the following:
The MAS-based algorithm for improving the energy efficiency of production processes at gas industry enterprises was proposed;
The necessity of the application of production process factors for increased accuracy of power consumption forecast was experimentally proven;
A comparative analysis of different decision tree ensemble algorithms for power consumption forecasting in a gas industry enterprise with varying numbers of features was conducted;
The possibility of enhancing the interpretability of power consumption forecasts for each hour of the day using the SHAP algorithm, considering changes in SHAP results depending on the applied machine learning model, was explored.
In addition, this study covers data preprocessing. This can be of interest to researchers having problems processing the data obtained from real-life power objects with a low level of digitization of data gathering, processing, and storing.
The article is organized as follows.
Section 2 presents descriptions of the studied object, the proposed data-preprocessing algorithm, the proposed method for decomposing production processes at a gas industry enterprise using a multi-agent approach, and a method for short-term power consumption forecasting at a gas industry enterprise based on explainable artificial intelligence, descriptions of machine learning methods, and an approach to results interpretation.
Section 3 shows the results and discussion of applying machine learning methods and SHAP to the preprocessed dataset in the short-term power consumption forecasting task.
Section 4 concludes the article by describing the future prospects of the study.
2. Materials and Methods
This section describes the method for increasing energy efficiency of production processes in gas industry enterprises based on the multi-agent approach, machine learning methods, and the approach to interpreting models of machine learning regarding the problem of short-term power consumption forecast.
The first step of the algorithm proposed in the article involves applying a multi-agent approach to decompose production processes into objects/agents necessary for short-term power consumption forecasting. However, the short-term power consumption forecasting system itself is not implemented as a multi-agent system.
After data preprocessing, ensemble machine learning methods are employed to obtain short-term power consumption forecast values.
Following the power consumption forecasting results, their interpretation is conducted using the SHAP algorithm.
The pipeline of proposed algorithm is shown in
Figure 1.
2.1. Gas Industry Enterprise under Consideration
The gas industry encompasses the extraction, transportation, storage, and distribution of natural gas. Since the nature of a company’s operations determines the factors influencing production processes, it is essential to identify the type of enterprise beforehand to analyze these processes. In this study, a compressor station was selected as the object within the gas industry. A compressor station of a main gas pipeline is an enterprise in the gas industry, which can be defined as a complex of equipment for increasing gas pressure and cooling during gas transportation through a main gas pipeline. The compressor station discussed in the article consists of three compressor compartments.
The compressor station includes a compressor compartment with gas–compressor units (GCU) and cooling units (CU). The drives of the GCU of main gas pipelines are gas turbine units (GTU), asynchronous engines with a capacity of 4.5 MW and synchronous from 4 to 25 MW. In addition, it should be noted that the gas turbine units (GTU) of GCU can be used as self-generation units. The most common CU are air-cooled units (ACU), which use electric fan drives from 10 kW to 100 kW. The consumption of ACU can account for 50–80% of the total compressor station load.
Figure 2 illustrates the main elements of the compressor station.
2.2. Initial Dataset
The initial dataset for this article included data from the automated commercial electricity metering system (ACEMS) of the gas industry enterprises and weather data. Data from the ACEMS included three-year values (791 days):
Hourly power consumption by the entire compressor station;
Daily power consumption by ACUs of each compartment;
Daily power consumption by GCUs of each compartment.
Hourly power consumption data for each month was provided in separate files. Daily consumption data of ACUs and GCUs for each day was presented in separate files. The data had missing values.
The statistical characteristics of power consumption for the compressor station under consideration are shown in
Table 1.
Analysis of the distribution of hourly power consumption values for the entire period shows a large standard deviation of 541.3 kWh compared to the average value of 675.8 kWh. The difference between the maximum consumption in the winter (2837 kWh) and the minimum in the summer (99 kWh) is 2738 kWh.
The analysis of the statistical characteristics showed that the following factors are to be considered for the short-term power consumption forecast:
Figure 3 presents a fragment of the hourly power consumption for the compressor station from December 2020 to January 2021, demonstrating the high stochasticity of power consumption.
Practice in working with data shows that sometimes, due to low automation of processes, it is not possible to obtain values for production process factors. Therefore, the production process index was introduced by the authors to account for the magnitude of power consumption. By the production process index, we mean a value that indirectly accounts for production processes. Its value was 1 for power consumption greater than 1 MWh; otherwise, it was 0. The value of 1 MWh was selected based on an analysis of the consumption load curve. While we do not provide a specific methodology for selecting this value, we demonstrate that its use improves the accuracy of power consumption forecasting.
Since we are forecasting the power consumption of a compressor station whose production processes are season-dependent, it is necessary to consider weather data. The data were taken for a weather station located 5 km from the compressor station from the archive of the rp5.ru website. This assumption of the use of weather data from the archive instead of the forecasted ones can be justified by the fact that meteorological parameters are additional factors, and the accuracy of weather forecasting is comparable to actual weather parameters.
The meteorological data include:
The discretization step for all meteorological parameters was initially 3 h.
Initial research data are shown in
Table 2.
2.3. Multi-Agent Approach
In this article, a multi-agent approach is proposed to enhance the energy efficiency of production processes of gas industry enterprises. The algorithm for applying the multi-agent approach can be described as follows:
Defining the objective function of the short-term power consumption forecasting system for the compressor station (in our case study, the energy costs; see
Section 2.3.1);
Description of the information model for short-term forecast of consumption of a compressor station (see
Section 2.3.2);
Application of Multi-agent Approach for analyzing production processes of compressor station (see
Section 2.3.3):
Identifying agents based on objects involved in the production processes of the compressor station (in our case study, GCU and ACU);
Defining the objective functions of the agents;
Specifying the input and output data flows of the agents;
Establishing connections between the agents.
2.3.1. Defining the Objective Function of the Short-Term Power Consumption Forecasting System for the Compressor Station
The first step in creating a short-term power consumption forecasting system for the compressor station is to define its overall objective function. The objective function of this system is determined by the energy costs according to Formula (1), considering constraint (2) that represent power balance.
where
S is the costs,
is the power supplied by the external power system,
T is the electricity tariff,
is the function of dependence between amount of used fuel and output of self-generation units,
is the power output of energy-storage system,
is the utilization factor for self-generation units,
is the utilization factor for energy-storage systems,
is the power supplied by self-generation units,
is the power consumption of load objects (GCU, ACU),
is the power consumed by energy-storage systems during charge cycle, and
is the power loss in a power supply system.
2.3.2. Description of the Information Model for Short-Term Forecast of Power Consumption of the Compressor Station
In order to create a short-term power consumption forecasting system, it is necessary to identify the system users, the real-world objects required for forecasting power consumption, and develop an information model of the system. The information model is understood as a model consisting of a set of interconnected entities (objects). Entity is an abstraction of a real-existing object, process, or phenomenon about which information needs to be stored in a database.
The short-term power consumption forecasting system is designed for use by the following subjects:
An expert in power consumption forecasting and energy accounting with expert knowledge in power consumption forecasting;
A chief engineer making decisions related to the production processes of the compressor station.
An expert in power consumption forecasting and energy accounting receives information concerning the schedule of short-term power consumption forecast for enterprises of the gas industry (henceforth—schedule of power consumption forecast), which they can correct in accordance with their knowledge.
A chief engineer receives three schedules:
Operating schedule of energy-storage systems;
Schedule of controllable load consumers;
Operating schedule of self-generation units (henceforth—operating schedule of self-generation).
The chief engineer can make expert adjustments to these schedules.
Appropriate information models based on the multi-agent approach were developed to model generation, storage, and consumption of power by the compressor station. The information data model used to generate “Schedule of power consumption forecast”, “Schedule of controllable load consumers”, and “Operating schedule of energy storage systems”, as shown in
Figure 4. The information model used to generate the “Operating schedule of self-generation” is shown in
Figure 5. Objects formed by the information system are marked green. Objects from adjacent information systems are marked orange. Users who interact with the system are marked blue. Objects entered by users are shown in white. Arrows between objects indicate the direction of connection: an object where an arrow end is formed based on an object from which it was aimed.
The object “Production plan data” is necessary for the informational data because, according to the specifics of the production processes, “Data on gas transportation plan” have a discretization ranging from one to seven days. Therefore, the object “Data on gas transportation plan” can be differently distributed among working days depending on the equipment maintenance schedule. The object “Production plan data” is generated by the system of short-term power consumption forecast for the compressor station based on the following objects:
“Production calendar data”;
“Data on gas transportation plan”;
“Generation equipment data”, which is used to arrange the “Operating schedule of self-generation”;
“Equipment data”, which is used to arrange other schedule objects.
The “Schedule of power consumption forecast” relates to the following objects:
“Schedule of controllable load consumers” is created for the equipment related to controllable load consumers after “Schedule of power consumption forecast” is formed. This schedule describes changes made in “Schedule of power consumption forecast” depending on the forecast of electricity tariff, forecast of peak load hour, and data on equipment of controllable load consumers. Hence, the object “Schedule of controllable load consumers” relates to the following objects:
“Schedule of power consumption forecast”;
“Data on forecast of electricity tariff”;
“Equipment data”;
“Operating schedule of self-generation”;
“Expert adjustments to schedule of controllable load”.
The object “Schedule of controllable load” is connected to “Operating schedule of self-generation” assuming that the distribution of controllable load value is to be determined according not only to electricity tariff but also to operating schedule of self-generation.
An energy-storage system can be a special case of controllable load since it can function as consumer, generator, and energy-storage device. “Operating schedule of energy storage systems” relates to the following objects:
“Schedule of controllable load”;
“Storage equipment data”;
“Expert adjustments to operating schedule of energy storage system”.
The object “Operating schedule of self-generation” is formed based on interaction with the following objects:
“Data on actual power consumption”;
“Data on actual self-generation”;
“Weather data”;
“Production plan data”;
“Expert adjustments to operating schedule of self-generation”.
2.3.3. Application of Multi-Agent Approach for Analyzing Production Processes of Compressor Station
After the objects required to create a schedule of power consumption forecast are defined, agents can be determined. Within the multi-agent approach, an agent is described by a tuple:
where
t is the moment of time,
It is the input data of an agent (for example, retrospective power consumption of the compressor station),
Ot is the output data (for example, power consumption),
St is the object state (for example, equipment status),
Rt is the rules of agent’s behavior (for example, emergency start-up/shutdown), and
At is the list of agent actions.
The proposed system of short-term power consumption forecast system is considered as the system with functions that are defined by all actions of agents aimed at achieving their goals. In the field of power system control, intellectual information systems are allowed to be used only for decision-making support due to their indeterminate nature. Thus, in this study, agents are described by the tuple without actions
At. Consequently, agents are described by the following tuple:
The elements are defined by the following interconnections:
The objective function of a consumer agent is the reduction in energy costs according to (1).
Compressor stations can include power consumption objects, self-generation objects, and energy-storage system objects. Power consumers can be divided into those involved in the main production process and regulator consumers. A regulator consumer is a power consumer whose operating mode allows for load limitation during peak hours to smooth out the load curve. A special case of a regulator consumer can be a storage system, which can act as a consumer, generator, or storage system for electrical energy depending on economic factors and production process factors.
Thus, all objects can be classified into storage agents, generator agents (in our case study, GTU) and consumer agents (in our case study, ACU and GCU). The agent decomposition for the compressor station is shown in
Figure 6.
Input and output parameters for a consumer-agent are described by (7) and (8), respectively.
where
Power is the retrospective power consumption,
T is the forecasted electricity tariff,
Plan is the gas transportation plan,
is the expert adjustments to schedule of power consumption forecast,
is the expert adjustments to the schedule of controllable load,
Meteo is the weather data,
Eq is the equipment data (on/off, resource),
Cal is the calendar-connected features (time, date, working day/day off), and
is the operating schedule of self-generation objects.
where
is the schedule of controllable load consumers and
Forecast is the schedule of power consumption forecast.
The objective functions of a generator agent and an agent-consumer are the reduction in energy costs according to (1) taking into account power balance constraints (2).
Input and output parameters for a generator agent are described by (9) and (10), respectively.
where
Gen is the retrospective self-generation,
is the generation equipment data (data on technical state and on/off state of generation equipment), and
is the expert adjustments to operating schedule of self-generation.
Input and output parameters flows for an agent-storage are described by (11) and (12), respectively.
where
is the storage equipment data and
is the expert adjustments to operating schedule of energy-storage systems.
where
is the operating schedule of energy-storage systems.
The interaction between agents occurs according to
Figure 7 through the information system, whose data information models are discussed above. The schedule of power consumption forecast is arranged by consumer agents that provide indicators of the main production process. Moreover, the consumer agents form the schedule of controllable load consumers to flatten the power consumption curve based on the forecasted electricity tariff value and operating schedule of self-generation. Operating schedules of self-generation and energy storage are arranged by a generator agent and agent-storage, respectively, to maintain power balance.
In this section, a method for decomposing production processes at a compressor station enterprise based on a multi-agent approach is presented. The following sections discuss the developed method for short-term power consumption forecasting.
2.4. Data Preprocessing
The data preprocessing algorithm is shown in
Figure 8.
The first step of the data preprocessing algorithm was to create a dataset from separate files of hourly power consumption of the entire compressor station and files of daily power consumption by ACUs and GCUs.
The second step was to convert the matrix of hourly power consumption to a vector.
The third step was to perform linear interpolation for the weather data to obtain hourly values.
The fourth step was to create an initial dataset by adding the hourly weather data to the power consumption data and performing a Spearman correlation analysis.
The fifth step was to create a dataset for a machine learning application. Forecast of power consumption is retrospectively based:
where
is the forecasting power consumption at
i-time,
is the forecasting model,
is the function that defines the rule of selection of actual retrospective values of power consumption,
is the forecasting horizon,
is the width of the window of retrospective data, and
is other values.
After the initial correlation analysis, it was determined that the forecast model can be sufficiently built with 12 h time step and 4-day retrospective depth [
8]. This can be justified by the cyclic nature of production processes. In addition, values of 12, 24, and 36 h before the forecast hour were not considered when formulating the schedule of power consumption forecast because these data were not available in the ACEMS at the time of power consumption forecast creation. For example, the following data were used to forecast power consumption for 9 September 19:00–20:00:
First, 7 September 19:00–20:00 and 07:00–08:00;
Second, 6 September 19:00–20:00 and 07:00–08:00;
Third, 5 September 19:00–20:00.
Therefore,
can be described as
where
X can include the following:
Weather data:
Wind speed in hour i;
Temperature in hour i;
Atmospheric pressure in i;
Humidity in hour i;
Production plan data:
Hour number i (from 0 to 23);
Day of the month (from 1 to 31);
Day of the week (from 1 to 7);
Month number (from 1 to 12);
Production process index;
Daily power consumption by ACUs and GCUs.
The final step involved removing rows with zero power consumption values from the dataset. After preprocessing, the dataset contained 16,896 rows.
The whole dataset was split into training and testing sets in a 90:10 ratio.
2.5. Machine Learning Methods
The following four ensemble regression methods of machine learning were chosen for power consumption forecast: random forest [
51], adaptive boosting (AdaBoost) [
51], extreme gradient boosting (XGBoost) [
52], and light gradient boosting (LightGBM) [
53]. They are used to build ensembles from regression decision trees:
where
T is a hierarchic system of rules, each of which compares the value of a certain feature with the threshold.
Random forest builds model as an ensemble consisting of
k decision trees:
AdaBoost, XGBoost, and LightGBM are based on the concept of gradual ensemble improvement (boosting):
where
is weight coefficient of model
j.
In order to compare the results of experiments, the following metrics were calculated: mean absolute error (
MAE), mean absolute percentage error (
MAPE), root mean squared error (
RMSE), and coefficient of determination (
R2), defined by Formulas (18)–(21), respectively.
where
is actual
i-th value of power consumption,
is forecast
i-th value of power consumption,
N is the number of values, and
is the mean actual value.
Additionally, to assess the lower bound of accuracy, results for a ridge regression model with Tikhonov regularization (henceforth—Ridge) were obtained. The linear regression model can be formulated as follows [
41]:
where
X is the independent variables (features, described in Formula (14)),
W is regression coefficients, and
d is bias coefficient.
Data preprocessing, model construction, and testing were performed using Python 3 with open-source libraries: Scikit-Learn (AdaBoost, random forest, and Ridge) [
51], XGBoost [
52], and LightGBM [
53].
2.6. Interpretation of Model Output
The SHAP algorithm was applied to interpret the results of the short-term power consumption forecast for the compressor station. This algorithm enables identifying the influence of parameters related to the operation of equipment (ACU and GCU) on the power consumption forecast. The importance of the
j-th feature (e.g., gas transportation plan or the daily power consumption of GCU) for the model
f is calculated by analyzing its impact on the output results (power consumption forecast) with input data
Zj, considering all possible feature combinations, as described in the following [
48]:
where
P is the set of all features,
S is the subset of features,
Z is the set of all possible features
S,
j is a feature, and
i is the index of the data instance.
3. Results and Discussion
3.1. Model Training Results
After the dataset was formed, Spearman’s correlation coefficients were analyzed for the gas transportation plan features (daily power consumption values by GCUs and ACUs and their sums:
GCU_1,
GCU_2,
GCU_3,
GCU,
ACU_1,
ACU_2,
ACU_3, and
ACU, respectively). Spearman’s correlation coefficients were calculated according to the following:
where
r is the Spearman’s correlation coefficient,
di is the difference between two ranks of each feature, and
n is the number of observations.
Spearman’s correlation coefficients for data on planned gas transportation are shown in
Figure 9.
Removing values with Sperman’s correlation coefficients greater than 0.70 from the data set can increase generalization properties. Therefore, only total daily values of power consumption by GCUs and ACUs, as well as daily values of second ACU_2, were considered in the experiments.
Based on the initial data, the following features were chosen for model training:
Retrospective data on actual power consumption (power consumption (hour—h), where h—48, 60, 72, 84, and 96 are the hours before the forecast hour);
Calendar features (hour, day, day of week, and month);
Data on the gas transportation plan (the production process index and total daily power consumption by GCUs, ACUs, and ACU2);
Weather factors (air temperature, atmospheric pressure, humidity, and wind speed).
Experiments were conducted considering various features. In addition to comparing the training results of the models, the errors of the expert forecast were used as reference values: MAPE of 16.81% and MAE of 105 kWh.
In the first experiment, only retrospective values of power consumption
and calendar features were considered. The experimental results are shown in
Table 3.
LightGBM demonstrated the best results on the test dataset by the MAPE criterion at 12.38%. It indicates an increase in forecast accuracy in relation to the expert forecast of 4.43%. It should be noted that the R2 for the best result is only 0.67. Consequently, it can be concluded that the LightGBM-based model provides explanations for a significant part of the power consumption of the compressor station dispersion. However, even though parameters substantially contribute to the model, the model makes errors when predicting individual hours of power consumption. In other words, the stochastic nature of power consumption cannot be accurately described when only retrospective power consumption and calendar parameters are considered. It is also important to note that underfitting is observed in the Ridge model training. The underfitting of the model is explained by the fact that the model fails to find a function that adequately describes the data. Overfitting is observed in the training of models based on other methods. Model overfitting is explained by the fact that the model fails to generalize new data: it accounts for the specifics of the training data rather than the underlying patterns. Moreover, the MAPE of the AdaBoost model exceeds the MAPE of the expert forecast.
In the second experiment, weather data were added to the features used in the first experiment. The training results are presented in
Table 4.
LightGBM demonstrated the best results using the MAPE criterion of 11.99%. The addition of weather data does not lead to a significant improvement in results in comparison with the results of the first experiment. This can be explained by the fact that hourly weather data were obtained through linear interpolation, assuming that the parameter changes were linear, whereas, in reality, the parameters may change nonlinearly between measurements. In order to prevent this unfavorable outcome, a large dataset of weather data should be used to analyze changes in weather parameters.
In the third experiment, the data on the gas transportation plan (daily values of power consumption by
GCUs,
ACUs, and
ACU_2) were added to the features used in the first experiment. The results are shown in
Table 5.
The best results in terms of MAPE on the test set were demonstrated by LightGBM and XGBoost, with values of 3.20% and 3.44%, respectively. Comparing other metrics shows that XGBoost has the best result: these results have higher R2 and lower values of MAE and RMSE. Hence, considering production process factors reduces MAPE by 13.37% compared to the expert forecast. The R2 of 0.98 on the testing set indicates a strong relationship between input parameters and model results. In other words, the model explains 98% of the variance in the compressor station’s power consumption, with only 2% of the variance remaining unexplained by the model. This means that the model can make very accurate forecasts based on previously unknown data. Comparing the MAE of 10.24 kWh and RMSE of 17.74 kWh with the MAE and RMSE values in the first experiment, which were 37.86 kWh and 75.61 kWh, respectively, shows that considering production process factors reduces the forecast error relative to all analyzed metrics. At the same time, models based on random forest and LightGBM are characterized by good learning results (the difference between the mean absolute percentage error on the test set is less than 4% compared to the mean absolute percentage error on the training set). The results of models based on AdaBoost and Ridge also show improvement.
In the fourth experiment, all features were considered, except for the production process index. The results are presented in
Table 6.
The best MAPE on the testing set was achieved by XGBoost and LightGBM, with values of 3.70% and 3.25%, respectively. The higher MAPE compared to the third experiment can be attributed to inaccurate consideration of weather data.
In the fifth experiment, the production process index was added to the features used in the first experiment. The results are presented in
Table 7.
LightGBM yielded the best results. Consideration of the production process index without considering other production process factors reduced the MAPE by 5.81% compared to the expert forecast It is important to note that overfitting is observed in the training of models based on other methods.
The summary results of the experiments are shown in
Table 8. The absolute and relative improvement in the forecast accuracy was estimated in relation to the MAPE of the expert forecast (16.81%).
Figure 10 and
Figure 11 depict the power consumption graphs for the third experiment, which yielded the lowest error values, clearly illustrating the high accuracy of the forecast.
It should be noted that LightGBM demonstrated better results than other machine learning models for a small number of training features. This can be explained by two characteristics of the algorithm [
54]:
Thus, LightGBM can be efficient in the case of a small number of training features.
3.2. The Interpretation Examples
For the third experiment, which yielded the best results, the SHAP algorithm was applied to models based on XGBoost and LightGBM. The results of applying the SHAP algorithm show the significance (weights) of the parameters that influenced the forecast of power consumption for each hour. These weights can be interpreted by an expert and used to make expert adjustments. The features are arranged from the bottom of the graph in ascending order of influence on the predicted value of power consumption f(x) relative to the average value across of power consumption of the whole dataset E[f(X)]. The pink color indicates values that increase the power consumption forecast f(x) relative to E[f(X)], and the blue color indicates values that decrease f(x). Thus, by adding and subtracting the influence values of the factors from E[f(X)], the value of f(x) is obtained. The gray color next to the factor labels shows the values of the factors that influenced the forecast.
Features that influenced the power consumption forecast of the second hour 06 February 2020 are shown in
Figure 12.
The decrease in power consumption forecast of the compressor station (f(x) = 665.51 kWh) in relation to the average value (E[f(X)] = 720.41 kWh) for the results of LightGBM is justified by
The influence of high consumption factors by all GCUs (13,050 kWh) was compensated by relatively low consumption by all ACUs (7430 kWh) and forecast hour (02:00), which is characterized by statistically low power consumption.
For the results obtained using XGBoost, the decrease in power consumption of the second hour (f(x) = 634.65 kWh) in relation to the average value (E[f(X)] = 720.40 kWh) is justified by
The forecast hour (02:00), which is characterized by statistically low power consumption;
Low power consumption 48 h before the forecast hour (818 kWh).
The influence of high consumption factors by all GCUs (13,050 kWh) was compensated by relatively low consumption by all ACUs (7430 kWh) and the value of consumption 60 h before the forecast hour (1494 kWh).
Despite the difference in model construction, the same features had the largest weight in the decision-making process for both models.
The features that had influenced the forecast for midnight on 03 April 2020 are shown in
Figure 13.
For the results obtained using LightGBM, the decrease in power consumption forecast (f(x) = 635.98 kWh) in relation to the average value is mainly explained by the forecast hour (00:00), which is characterized by statistically low power consumption. Other factors were compensated for by each other.
For the results obtained using XGBoost, the decrease in power consumption (f(x) = 608.30 кBт∙ч) in relation to the average value is explained by low power consumption 48 and 60 h before the forecast hour (818 kWh). Other factors were compensated for by each other.
Despite the differences in model construction, it can be noted that both models assigned the highest weight to the same features when making decisions.
The overall feature importance is presented in
Table 9. It can be noticed that, despite XGBoost making decisions mainly based on the daily power consumption of ACU, other factors can have an influence on certain forecast hours. The same conclusion can be made for LightGBM. Thus, the usage of the SHAP algorithm improves the interpretability of results, resulting in greater trust by experts in training results for machine learning models.
4. Conclusions
The algorithm for improving the safe operation of gas industry enterprises and the energy efficiency of their production processes using a multi-agent approach was proposed in this article. This approach considers the interdependence of various production processes. The developed method was applied to solve the short-term power consumption forecasting problem for a compressor station. The research indicates that the accuracy of short-term power consumption forecasts can be enhanced through the modeling of production processes using a multi-agent approach.
The experiments were conducted using various ensemble models with different features on real three-year data of a compressor station. It was found that consideration of production process factors can increase forecasting accuracy by 13.37%. Specifically, MAE, obtained by XGBoost, was decreased from 105 kWh of expert forecast to 15.57 kWh. In comparison with the experiment, where only retrospective power consumption and production calendar were considered, R2 increased from 0.67 to 0.98, MAE decreased from 61.94 kWh to 15.57 kWh, and RMSE decreased from 91.22 kWh to 22.39 kWh. It was also discovered that LightGBM provides better results for models built on a dataset with a small number of input features.
The SHAP algorithm was applied to enhance the interpretability of the results. The use of this algorithm can increase experts’ trust in the results provided by intelligent information systems. It should be noted that although SHAP facilitates the interpretation of machine learning results by visualizing parameters, this algorithm does not allow for complete explainability of the results. Therefore, the proposed method can only be used if an expert with competencies in enterprise consumption forecasting interacts with the explanation results.
Further research is planned to focus on the short-term forecasting of self-generation in oil and gas industry enterprises, scheduling of controllable load, scheduling of energy-storage systems, and experiments on data from other oil and gas industry enterprises. In addition, the developed method is planned to be applied to consider production processes for other optimization problems in power systems.