Method for Determining the Optimal Capacity of Energy Storage Systems with a Long-Term Forecast of Power Consumption

: The unevenness of the electricity consumption schedule at enterprises leads to a peak power increase, which leads to an increase in the cost of electricity supply. Energy storage devices can optimize the energy schedule by compensating the planned schedule deviations, as well as reducing consumption from the external network when participating in a demand response. However, during the day, there may be several peaks in consumption, which lead to a complete discharge of the battery to one of the peaks; as a result, total peak power consumption does not decrease. To optimize the operation of storage devices, a day-ahead forecast is often used, which allows to determine the total number of peaks. However, the power of the storage system may not be sufﬁcient for optimal peak compensation. In this study, a long-term forecast of power consumption based on the use of exogenous parameters in the decision tree model is used. Based on the forecast, a novel algorithm for determining the optimal storage capacity for a speciﬁc consumer is developed, which optimizes the costs of leveling the load schedule.


Introduction
Currently, the capacity of energy storage systems takes an increasing share in the total installed capacity of the energy system. The areas of the application of energy storage systems are extensive today; they can be used in power supply systems of enterprises, systems of filling stations for electric vehicles, as well as system-wide energy storage systems for optimizing renewable energy sources, and an increase in the total capacity of energy storage systems increases their overall efficiency [1]. This is primarily due to the rapid development and integration of renewable energy sources based on solar and wind, which are characterized by an inconsistent power generation. A lack of generation during the period of increased consumption and peak generation during hours of reduced consumption lead to the formation of a system-wide load graph of the "Duck curve" type. Californian scientists introduced the "Duck curve" term in 2013 after studying the impact of an overabundance of solar generation on the power system [2]. Later, the impact of an overabundance of renewable energy on the energy system was studied in other developed and developing countries, for example, in the Chinese energy system [3], which today is one of the leaders in the production of electricity using renewable energy sources. Articles [4,5] discuss the impact of legislative acts within the country on the development of renewable energy sources. The installation of energy storage systems is also possible at the level of residential consumers [6]. Such solutions allow an increase in the share of distributed RES at the level of residential consumers; however, the capacity of individual consumers is not enough for a significant contribution to the unified energy system, and the storage units can be used only for their own needs.
One of the solutions to this challenge is to shift the generation peaks using energy storage systems [7]. Combining energy storage systems with renewable sources has been one of the most promising research areas in recent years. Complex systems, consisting of wind generators, solar panels and energy storage systems, as well as the optimal interaction algorithm, are discussed in the article [8]. The authors of article [9] have developed a methodology for choosing the type of energy storage devices to reduce peaks in power consumption and, based on the results of the considered scenarios, conclude that compressed air systems as energy storage devices demonstrate a greater efficiency in most cases. The use of accumulation systems using compressed air, as well as compensation for fluctuations in the electricity market using such accumulators, is considered in [10]. According to study [11], by 2025, energy storage systems based on compressed air, flywheels and also based on lithium-ion batteries could have the lowest capital cost. However, in terms of performance, according to [11], when used in a 4 h charge-discharge cycle, lithium-ion batteries demonstrate the highest efficiency.
Consequently, for the development of distributed renewable energy sources, it is necessary to introduce energy storage systems, the installation cost of which today can be high even for large electricity consumers. However, the requirements for the reliability of power supply and the quality of electricity often force consumers to install energy storage systems. The purpose of this article is to improve the efficiency of using an energy storage system (ESS) in the energy system of a large industrial consumer.
The author of article [12] uses the robust optimization method to determine the optimal capacity and location of an ESS in the medium-voltage level, taking into account the introduction of renewable energy sources (RES) and examine the introduction of an ESS in medium and high-voltage networks. Shifting demand peaks at the scale of a medium and high-voltage system requires a significant capacity, resulting in huge capital costs. In addition, one of the possibilities for the use of large energy storage systems is a system-wide energy reserve to compensate for short-term power shortages that can occur due to the shutdown of large generating units and lead to a decrease in the frequency in the power system [13]. It is advisable to consider the installation of an ESS at the low-voltage level selectively for individual consumers that make the greatest contribution to the unevenness of the system-wide load schedule. This solution could increase the efficiency of the ESS, as well as reduce the losses in the networks for the transmission of electricity. The capital costs for the installation of matching transformers are reduced when an ESS is installed at a low-voltage level, and the reliability of consumers can be increased because of the proximity to electricity consumers.
Article [14] presents a two-layer optimization model using the non-dominated sorting bat algorithm (NSIBA), as well as the Pareto algorithm, which makes it possible to determine the optimal capacity and location of an ESS under the condition of the parallel operation of wind turbines and solar panels with the implementation of "High storage, low generation". The article analyzes the impact of an ESS on the quality of electricity: during modeling, a decrease in electricity losses was achieved, as well as an increase in voltage stability. Improving the efficiency of the interaction of energy storage systems with renewable energy sources is also considered in [15]. However, in the existing realities of a centralized system, it is also important to take into account the impact of the enterprise load schedule also on the external power system.
An ESS can be used in an enterprise to reduce costly peaks in electricity consumption through load transfer. However, it is important to predict the power consumption for the day ahead in order to determine the optimal operation of the drives because of the possible occurrence of several peaks in consumption during the day. The authors of article [16] propose to use forecasting of electricity consumption for an enterprise, taking into account the introduction of renewable energy sources. This article presents the results taking into account day-ahead forecasting. An algorithm for managing an energy storage system based on neural networks in order to reduce peaks in electricity consumption during the day to participate in a demand-side management program using the example of the power system of South Korea is presented in [17]. However, when forecasting for the day ahead, a decrease in consumption peaks may not be optimal with an uneven load schedule, in which the consumption values on different days differ several times. In our study, the effect achieved by leveling the load schedule using ESS during the day is more efficient due to the optimal choice of the capacity of ESS using a long-term forecast of consumption.
In view of the need to plan electricity consumption at large enterprises for a month in advance, this study considers an algorithm for the long-term forecasting of electricity to determine the optimal power of an ESS, used to reduce deviations of actual consumption from the planned load schedule, taking into account the uneven load schedule.

Electricity Cost Formation Mechanism
To increase the competitiveness of enterprises in the existing market environment, a necessary requirement is to reduce production costs. Electricity costs at large industrial enterprises constitute a significant part of the costs and are reflected in the cost of the final product. Article [18] examines the principles of development of industrial enterprises on the territory of the Russian Federation in the context of the concept of sustainable development, where an important role is given to the economical and efficient use of external resources. The problems that arose in the Russian power industry at the turn of the 20th and 21st centuries, as well as the reforms that gave rise to global changes, are described in [19]. The issues of the need to reduce the cost of electricity and improve the efficiency of using existing resources are considered in [20]. These sources examine the impact of changes in legislation and government incentive policies on the economic and production activities of enterprises.
Electricity production and consumption in countries such as the United Kingdom (National Grid Electricity System Operator-an independent system operator, 12 regional electricity companies responsible for the distribution and sale of electricity, EPEX and Nord Pool energy exchanges), Germany (Amprion, TransnetBW, 50Hertz, TenneT system operators, RWE, E.ON, EnBW, Vattenfall-large generating companies), China (State Grid Corporation of China, China Southern Power Grid are responsible for transmission, sales and distribution of electricity, competition in the wholesale market is organized between 7 large generating companies) and others are carried out in the conditions of the wholesale market. Electricity price is calculated as the sum of the following components:

•
Purchase price on the wholesale market (changes monthly); • Tariff for electricity transmission services (set by the regulatory body of the subject of the federation, once a year); • Sales markup of the supplier of last resort (set by the regulatory body of the constituent entity of the federation, as a rule, changes once a year); • Payment for the services of infrastructure organizations (system and commercial operator of the unified electric power system).
The daily schedule of electricity generation in one price zone consists of electricity generated by various types of sources. The use of a certain type of source during the day to cover the load schedule depends on the ability to regulate the generated power at the lowest cost, as well as the speed of power regulation. Figure 1 shows a graph of the coverage of the daily schedule of electricity consumption by various sources of electricity. Nuclear power plants (NPPs) cover a high proportion of the base part of the daily load schedule due to low maneuverability due to technological features and safety considerations. Additionally, the base part includes large hydroelectric power plants (HPPs) with a sufficiently large reservoir volume, which have low maneuverability for technological reasons (stations for which water discharge is not desirable in order to regulate capacity), as well as hydroelectric power plants associated with navigable routes. Combined heat and power plants (CHP) operating according to the heating schedule also cannot change their capacity at the request of the system operator.
The half-peak part includes condensing power plants (CPP), which have low maneuverability due to the long start-up and shutdown of power units; however, due to the large number of CPP in the total generating capacity, it makes the use of CPP in covering the half-peak part of the schedule a necessary measure.

Demand Response
In the conditions of the market environment for the production and consumption of electricity, when planning electricity consumption, the consumer is forced to take into account the modes of operation of the power system in order to reduce the cost of purchased electricity. The main task of planning the operating mode of the electric power system is to maintain the balance of frequency and active power in the system, as well as to align the uneven load curve of the power system to reduce fuel consumption for its generation. The main mechanism for optimizing the use of generating capacities, used in many countries, is demand response.
The mechanism of demand response (DR) in order to reduce the cost of electricity production due to a decrease in the cost of electricity production on types of generation that cover peak loads and have a high production cost is shown in Figure 2.   Nuclear power plants (NPPs) cover a high proportion of the base part of the daily load schedule due to low maneuverability due to technological features and safety considerations. Additionally, the base part includes large hydroelectric power plants (HPPs) with a sufficiently large reservoir volume, which have low maneuverability for technological reasons (stations for which water discharge is not desirable in order to regulate capacity), as well as hydroelectric power plants associated with navigable routes. Combined heat and power plants (CHP) operating according to the heating schedule also cannot change their capacity at the request of the system operator.
The half-peak part includes condensing power plants (CPP), which have low maneuverability due to the long start-up and shutdown of power units; however, due to the large number of CPP in the total generating capacity, it makes the use of CPP in covering the half-peak part of the schedule a necessary measure.

Demand Response
In the conditions of the market environment for the production and consumption of electricity, when planning electricity consumption, the consumer is forced to take into account the modes of operation of the power system in order to reduce the cost of purchased electricity. The main task of planning the operating mode of the electric power system is to maintain the balance of frequency and active power in the system, as well as to align the uneven load curve of the power system to reduce fuel consumption for its generation. The main mechanism for optimizing the use of generating capacities, used in many countries, is demand response.
The mechanism of demand response (DR) in order to reduce the cost of electricity production due to a decrease in the cost of electricity production on types of generation that cover peak loads and have a high production cost is shown in Figure 2. The main economic effect when using a demand response system is achieved by reducing the use of electricity sources with a high production cost, as well as high costs for regulating the generated power. An analysis of the cost of generating electricity by various sources is presented in [21].
In many developed and developing countries of the world, there are demand management programs that take into account the technical characteristics of the power system and the economic structure of the country's electricity industry. The most effective examples of the application of demand management technology, as well as incentive measures for different countries, are given in [22].
Article [23] examines the general principles of the implementation of demand response methods in Russia, as well as methods for calculating the base capacity in demand response.
In [24], the demand response is fully defined and the classification of demand response programs is presented. The benefits and costs are described, and ways to measure the demand response are discussed. Tutorial [25] presents some characteristics of electricity markets from a demand perspective to highlight the importance of demand elasticities. This suggests that increasing the short-term price elasticity of demand in electricity markets could improve their performance. In [26], a model of electricity auctions was developed, which took into account tenders on the side of consumers. Customers have the opportunity to apply for load reduction during specific periods of the presented 24 h simulations. The results point to the important influence of demand-side trading in flattening the system's marginal price and reducing price volatility.
Article [27] provides an analysis of the US and German electricity and capacity markets. The author points out the need to forecast the load of electricity consumers for the needs of demand response in order to improve energy security and increase the efficiency of electricity use. According to this study, the forecast of power consumption for shifting the load peaks of consumers can reduce the power reserve for frequency regulation in the system by more than 2 times (from 8% to 3.4%).
An analysis of the Chinese power system and the introduction of distributed generation for demand response is discussed in article [28]. China's electricity policy aims at reducing the use of fossil resources in electricity production and increasing the share of alternative renewable energy sources (electricity production using wind and solar energy) The main economic effect when using a demand response system is achieved by reducing the use of electricity sources with a high production cost, as well as high costs for regulating the generated power. An analysis of the cost of generating electricity by various sources is presented in [21].
In many developed and developing countries of the world, there are demand management programs that take into account the technical characteristics of the power system and the economic structure of the country's electricity industry. The most effective examples of the application of demand management technology, as well as incentive measures for different countries, are given in [22].
Article [23] examines the general principles of the implementation of demand response methods in Russia, as well as methods for calculating the base capacity in demand response.
In [24], the demand response is fully defined and the classification of demand response programs is presented. The benefits and costs are described, and ways to measure the demand response are discussed. Tutorial [25] presents some characteristics of electricity markets from a demand perspective to highlight the importance of demand elasticities. This suggests that increasing the short-term price elasticity of demand in electricity markets could improve their performance. In [26], a model of electricity auctions was developed, which took into account tenders on the side of consumers. Customers have the opportunity to apply for load reduction during specific periods of the presented 24 h simulations. The results point to the important influence of demand-side trading in flattening the system's marginal price and reducing price volatility.
Article [27] provides an analysis of the US and German electricity and capacity markets. The author points out the need to forecast the load of electricity consumers for the needs of demand response in order to improve energy security and increase the efficiency of electricity use. According to this study, the forecast of power consumption for shifting the load peaks of consumers can reduce the power reserve for frequency regulation in the system by more than 2 times (from 8% to 3.4%).
An analysis of the Chinese power system and the introduction of distributed generation for demand response is discussed in article [28]. China's electricity policy aims at reducing the use of fossil resources in electricity production and increasing the share of alternative renewable energy sources (electricity production using wind and solar energy) (RES). However, due to the geographical remoteness of electricity sources from the consumer and the mismatch between the peaks of production and consumption of energy, a significant challenge for China is the use of effective methods of shifting the peaks of consumption through the application of a demand response system.
Article [29] discusses the need to shift the peaks of electricity consumption in Italy due to the increase in the share of alternative renewable energy sources. The author examines the need to use local energy storage systems for electricity consumers in order to redistribute consumption peaks and increase the efficiency of electricity use.
The author of article [30] provides a calculation of the payback periods for energy storage systems, taking into account the reduction in the need to build new centralized generation capacities, which would reduce redundant redundancy, as well as increase the efficiency of RES use.
To maintain the balance of frequency and capacity in the electric power system, the system operator of the electric power system uses electricity demand response through price changes, as well as other methods of financial incentives, such as incentive payments for executing the commands of the system operator, as well as penalties for exceeding the declared capacity.

Peak Shift Methods for Enterprises
Demand response implies a reduction in energy consumption by the end user, given certain economic signals from the electricity market, with the receipt of revenue for the implementation of such a reduction in consumption.
Article [27] examines the economic and social effects of various methods of reducing electricity consumption at the enterprise. The author points out that, with a decrease in production volumes, the costs may exceed the possible benefits from participation in demand response. Regulation of heating, air conditioning and lighting systems can be uncomfortable for the workers of the enterprise and violate the requirements for working conditions in the workplace. The use of local energy supply sources and energy storage systems does not have the indicated disadvantages.
The authors of article [31] consider an algorithm for the rational planning of power consumption of a large electrical complex in order to equalize the load schedules, but they do not take into account the influence of the external power supply system on the formation of the system load schedule. The proposed method can be improved by applying consumption forecasting methods for optimal load redistribution.
Consumers are able to participate in demand response technologies with obtaining an individual economic effect (receiving payments for the provision of services) not only for themselves, but also for all market participants by reducing the production of expensive electricity by low-efficiency generating capacities.
In order to create conditions for improving the energy efficiency of the Russian energy system by attracting consumers of the wholesale market to actively participate in regulating the demand for electricity and capacity, called price-dependent consumption, a [32] resolution was adopted.
Currently, a pilot project is underway in Russia to involve retail electricity market consumers in the demand response program by creating demand aggregators for a complex effect from consumers whose installed capacity is lower than the requirements for wholesale market participants. The concept of demand aggregators is given in [33].
The combined effect of the introduction of a demand response system for enterprises for the production and distribution of natural gas is described in [34]; the authors describe a model of integrated price-dependent response of industrial enterprises' demand for electricity and gas. Thermal power plants (TPPs) operating on natural gas account for a significant share of the installed capacity in the centralized energy system of Russia. The properties of production and consumption of natural gas have similarities with the processes of production and consumption of electrical energy. Natural gas producers and consumers are united by a centralized gas transportation and distribution system operating in a single technological mode. Several thousand gas consumers operate simultaneously within the framework of the unified gas supply system, whose gas demand characteristics are significantly differentiated.
According to the report of the Russian Ministry of Energy [35], for 2018 and 2019, TPPs account for about 68% of the generated electricity. Accordingly, with a decrease in electricity consumption, the consumption of natural gas at TPPs decreases, which leads to a decrease in the load on gas pumping units (GPU). Planning the factor to reduce the load on the GPU can improve the accuracy of forecasting the load of the natural gas distribution company.
Another important factor when participating in a demand response system using electric drive equipment that can dynamically change its consumption during the day is the reliability of this equipment. The issues of reliability and evaluation of the efficiency of using electric drives should be considered. The influence of higher harmonic components on the power supply of electric drives of an enterprise of a mineral resource complex is considered in [36]. Increasing the efficiency of using electric drives at enterprises using FACTS is described in [37]. Maintaining the quality of electricity is an important issue in the implementation of ESS. The issues of improving the quality of energy using active DC converters are presented in [38]. The influence of the processes of production and distribution of gas for enterprises of the mineral resource complex, as well as for other large industrial consumers, on the process of power supply is considered in [39].
The technique for assessing the reliability of consumers-regulators used in the demand response system based on neural network models is considered in [40].
Study [41] indicates the need to forecast the power consumption of an enterprise to improve the efficiency of demand response. The author uses regression analysis to forecast electricity consumption for the day ahead based on historical information. The degree of illumination, the length of daylight hours and the production calendar of administrative personnel were used as additional factors affecting power consumption; however, the analytical approach of this method does not allow taking into account a significant number of factors affecting power consumption. The use of machine learning methods allows you to increase the learning depth of the forecasting model, as well as increase the forecast horizon to several months. Machine learning also makes it possible to identify the patterns of the influence of external signs on electricity consumption, which is difficult to do using analytical and statistical methods due to the large amount of processed information.

Machine Learning for Electrical Loads Forecasting
The consumed electrical power is predicted in power systems around the world by various methods, depending on the forecast horizon.
Prediction of consumer loads to optimize electricity costs, taking into account the financial mechanisms of a centralized system, is considered in [42].
The following forecasting periods were distinguished: 1.
Operational forecasting. Produced for participants in the wholesale electricity market with a lead time of 15 to 60 min.

2.
Short-term forecasting. Lead from an hour to a week ahead.

3.
Medium-term forecasting. From a week to a year in advance.

4.
Long-term forecasting. From a year to 20 years in advance. Long-term forecasting is often used for setting tariffs for population and economic development planning.
Various methods are used to predict electrical loads: statistical for long-term forecasting, autoregressive for short-and medium-term forecasting. Methods for analyzing the collected data on factors affecting power consumption in modern electric power industry are conventionally divided as follows ( Figure 3):  In recent years, models based on LSTM neural networks have received the greatest development for short-term forecasting: [43]. The issue of forecasting electrical loads in Spain and other EU countries to reduce the cost of electricity on the wholesale market is discussed in source [44]. This article discusses forecasting using LSTM neural network models based on fuzzy logic. The main disadvantage of using neural networks to predict the load is the systematic forecast method, which contributes to the accumulation of errors in long-term forecasting. In addition, for a clear advantage of neural networks over the methods of autoregressive forecasting, it is necessary to accumulate a huge amount of retrospective data on the functioning of an enterprise, which is not always feasible.
Almost all modern methods of long-term prediction of electrical load are based on autoregressive models: the method of probabilistic extrapolation and correlation [45]. Additionally, on the use of historical data on power consumption [46].
Methods of medium-term forecasting based on historical data have proven themselves well for predicting the loads of large clusters of consumers, for example, the power system of a region [47,48], since the irregularities associated with the influence of microfactors of each individual consumer are smoothed out, and the overall load schedule receives a clearly pronounced seasonality and a trend associated with a system-wide increase in electricity consumption. However, when considering a single enterprise, internal factors and business processes have a significant impact on energy consumption.
The method for forecasting power consumption at gas industry enterprises is described in article [49]. However, in this forecasting method, the forecast of electricity consumption for enterprises with a high coefficient of unevenness of the load schedule is not considered.
The disadvantage of the above methods for predicting the loads of an industrial enterprise is that autoregressive models are based on the use of trend and seasonality for forecasting. Such methods work well in predicting the loads of consumer clusters, when the characteristics of an individual consumer do not significantly affect the overall schedule of power consumption. However, when considering a single industrial consumer, external and internal factors, as well as business processes that are unique to a single consumer, have a significant impact on energy consumption.
It is also important to mention that ensemble models have become widespread in recent years, because of combining the advantages of multiple predictive models. The au- In recent years, models based on LSTM neural networks have received the greatest development for short-term forecasting: [43]. The issue of forecasting electrical loads in Spain and other EU countries to reduce the cost of electricity on the wholesale market is discussed in source [44]. This article discusses forecasting using LSTM neural network models based on fuzzy logic. The main disadvantage of using neural networks to predict the load is the systematic forecast method, which contributes to the accumulation of errors in long-term forecasting. In addition, for a clear advantage of neural networks over the methods of autoregressive forecasting, it is necessary to accumulate a huge amount of retrospective data on the functioning of an enterprise, which is not always feasible.
Almost all modern methods of long-term prediction of electrical load are based on autoregressive models: the method of probabilistic extrapolation and correlation [45]. Additionally, on the use of historical data on power consumption [46].
Methods of medium-term forecasting based on historical data have proven themselves well for predicting the loads of large clusters of consumers, for example, the power system of a region [47,48], since the irregularities associated with the influence of micro-factors of each individual consumer are smoothed out, and the overall load schedule receives a clearly pronounced seasonality and a trend associated with a system-wide increase in electricity consumption. However, when considering a single enterprise, internal factors and business processes have a significant impact on energy consumption.
The method for forecasting power consumption at gas industry enterprises is described in article [49]. However, in this forecasting method, the forecast of electricity consumption for enterprises with a high coefficient of unevenness of the load schedule is not considered.
The disadvantage of the above methods for predicting the loads of an industrial enterprise is that autoregressive models are based on the use of trend and seasonality for forecasting. Such methods work well in predicting the loads of consumer clusters, when the characteristics of an individual consumer do not significantly affect the overall schedule of power consumption. However, when considering a single industrial consumer, external and internal factors, as well as business processes that are unique to a single consumer, have a significant impact on energy consumption.
It is also important to mention that ensemble models have become widespread in recent years, because of combining the advantages of multiple predictive models. The authors of [50] discussed an algorithm for selecting predictive models and combining them using Penalized constrained optimization and shrinkage techniques to predict house prices in Boston. The model consists of 14 predictive algorithms, and the full dataset includes only 507 observations. However, the authors of article [50] also argue that there is a risk of including models in the ensemble, which would worsen the forecast results.
The main disadvantages of combining several predictive models are: -Ensemble training takes a lot of time and is not suitable for operational forecasting. - The selection of models for ensemble forecasting is very time consuming and an error in choosing a model can lead to a deterioration in the forecast. -When combining predictive algorithms, the ability to interpret the forecast results decreases, since for each algorithm the training features have a different weight.
The most significant drawback for our study was the latter, since, in addition to forecasting, we considered the problem of determining exogenous parameters and the degree of their influence on the forecast.

Forecasting the Electrical Loads of the Compressor Gas Compressor Station in Order to Improve the Efficiency of Demand Response, Taking into Account the Use of Energy Storage Systems
In order to predict the loads of an enterprise of a mineral resource complex, this article considered the power consumption of a compressor gas pumping station.
The characteristics of the load graph are presented in Table 1: Chart fill factor 0.44 The coefficient of unevenness of the daily load schedule 0.86 The coefficient of unevenness of the weekly load schedule 0.36 From the results obtained, it could be concluded that the electricity consumption was uneven and the load graph was subject to significant fluctuations (the fill factors of the schedule and the unevenness of the weekly load schedule were <0.5).
To predict the loads, an additive autoregressive model was applied, taking into account the nonlinearity of the trend. The value of the predicted value at a certain point in time was determined by the following equation [51]: where: y(t)-the value of the predicted value at time t; g(t)-trend function that simulates non-periodic changes in a time series value; s(t)-reflects periodic changes in the time series (for example, weekly and annual seasonality); h(t)-the effects of holidays that occur with potentially irregular schedules over one or more days; Characteristics of the dataset for training the model: The use of the ARIMA autoregressive model for forecasting power consumption, as well as methods for determining the quality of the forecast, were described in [52]. The Prediction Interval Coverage Probability (PICP) was used to determine how much the predicted values diverged from the actual over the entire forecast horizon, which was determined by the following formula [43]: where: l(x i ), u(x i )-lower and upper bounds of the prediction interval; y i -fact value of consumption; N-number of observations.
With an uneven graph of power consumption, individual spot values had a strong deviation from the average level of the series, which was used as a trend in the forecast.
To level this type of error, the forecast confidence interval was used, which took into account the possibility of predicting a value in a certain interval with a given probability. The higher the probability, the wider the confidence interval. The confidence interval was determined using the following expression [53]: where: y n+1 -forecast of the value of the time series at time n + 1; t α -the value of the Student's t-statistic for the time series; S p -MAE value.
To determine the width of the confidence interval with a given PICP, it was necessary to determine the value of t α using tables [54]. Figure 4 shows a graph with the results of predicting power consumption with PICP = 0.95. The use of the ARIMA autoregressive model for forecasting power consumption, as well as methods for determining the quality of the forecast, were described in [52]. The Prediction Interval Coverage Probability (PICP) was used to determine how much the predicted values diverged from the actual over the entire forecast horizon, which was determined by the following formula [43]: where: , -lower and upper bounds of the prediction interval; -fact value of consumption; N-number of observations.
With an uneven graph of power consumption, individual spot values had a strong deviation from the average level of the series, which was used as a trend in the forecast.
To level this type of error, the forecast confidence interval was used, which took into account the possibility of predicting a value in a certain interval with a given probability. The higher the probability, the wider the confidence interval. The confidence interval was determined using the following expression [53]: where: -forecast of the value of the time series at time n + 1; -the value of the Student's t-statistic for the time series; -MAE value.
To determine the width of the confidence interval with a given PICP, it was necessary to determine the value of using tables [54]. Figure 4 shows a graph with the results of predicting power consumption with PICP = 0.95. The mean absolute error for this model was 2104 kWh. The forecast profile had a clearly pronounced monthly seasonality, but the irregularity of the load schedule was not taken into account.
The deviation of the confidence interval was 64.4% of the average power consumption. The mean absolute error for this model was 2104 kWh. The forecast profile had a clearly pronounced monthly seasonality, but the irregularity of the load schedule was not taken into account.
The deviation of the confidence interval was 64.4% of the average power consumption.
A study was conducted of the linear correlation according to Spearman's criterion of exogenous parameters with the load of the enterprise ( Table 2): Based on the results obtained, we could conclude that the planned production volume affected the volume of electricity consumption to the greatest extent.
The introduction of an additional regression series into the additive autoregressive model was described in article [55].
The next step was to introduce exogenous parameters into the model. The business plan for the volume of gas compression at the compressor station, which was the main production process, was used as an external factor.
The forecast result of this model is shown in Figure 5.

FOR PEER REVIEW 11 of 25
A study was conducted of the linear correlation according to Spearman's criterion of exogenous parameters with the load of the enterprise (Table 2): Based on the results obtained, we could conclude that the planned production volume affected the volume of electricity consumption to the greatest extent.
The introduction of an additional regression series into the additive autoregressive model was described in article [55].
The next step was to introduce exogenous parameters into the model. The business plan for the volume of gas compression at the compressor station, which was the main production process, was used as an external factor.
The forecast result of this model is shown in Figure 5. The mean absolute forecast error was 1324 kWh. The deviation of the confidence interval was 41.2% of the average electricity consumption.
From the graph, we could conclude that exogenous parameters made it possible to take into account, with a certain degree of efficiency, the unevenness of the schedule, based on the micro-factors of the enterprise, but seasonality was still taken into account and worsened the model.
Since the coefficient of unevenness of the weekly load schedule was below 0.4, it could be concluded that for an effective forecast, it was not necessary to take into account historical data, as well as previous observations. This is the main reason why LSTM neural networks are not effective for predicting workloads of this kind: a neural network with long-term and short-term memory uses the previous values of the time series among other external factors.
To determine the value of the load from the influencing factors, a linear regression model was used.
The results are shown in Figure 6. From the graph, we could conclude that exogenous parameters made it possible to take into account, with a certain degree of efficiency, the unevenness of the schedule, based on the micro-factors of the enterprise, but seasonality was still taken into account and worsened the model.
Since the coefficient of unevenness of the weekly load schedule was below 0.4, it could be concluded that for an effective forecast, it was not necessary to take into account historical data, as well as previous observations. This is the main reason why LSTM neural networks are not effective for predicting workloads of this kind: a neural network with long-term and short-term memory uses the previous values of the time series among other external factors.
To determine the value of the load from the influencing factors, a linear regression model was used.
The results are shown in Figure 6. The mean absolute error was 962 kWh, which was almost 30% lower than when using the autoregressive model.
The deviation of the confidence interval was 20.8% of the average power consump tion.
According to Table 2, the linear correlation was higher than 0.5 only for the "Produc tion volume" parameter. It was necessary to test the hypothesis that the dependence o the consumption schedule on other characteristics was a non-linear function.
To take into account the nonlinearity of the graph, we used gradient boosting fo regression. A gradient-boosting model is a machine learning technique that uses a feature based decision tree for training and prediction.
The purpose of the forecasting algorithm is to reduce the error between the predicted and real value. The error was defined by the following expression [53]: where: -real target value; -predicted target value. The learning task is to determine the minimum of the loss function: The loss function was the vector and its result was the scalar value of the prediction error.
By using a gradient, the direction of maximum error reduction was determined to optimize the time to find a solution: The mean absolute error was 962 kWh, which was almost 30% lower than when using the autoregressive model.
The deviation of the confidence interval was 20.8% of the average power consumption. According to Table 2, the linear correlation was higher than 0.5 only for the "Production volume" parameter. It was necessary to test the hypothesis that the dependence of the consumption schedule on other characteristics was a non-linear function.
To take into account the nonlinearity of the graph, we used gradient boosting for regression. A gradient-boosting model is a machine learning technique that uses a featurebased decision tree for training and prediction.
The purpose of the forecasting algorithm is to reduce the error between the predicted and real value. The error was defined by the following expression [53]: where: y i -real target value; y p i -predicted target value. The learning task is to determine the minimum of the loss function: The mean absolute error was 962 kWh, which was almost 30% lower than when using the autoregressive model.
The deviation of the confidence interval was 20.8% of the average power consumption.
According to Table 2, the linear correlation was higher than 0.5 only for the "Production volume" parameter. It was necessary to test the hypothesis that the dependence of the consumption schedule on other characteristics was a non-linear function.
To take into account the nonlinearity of the graph, we used gradient boosting for regression. A gradient-boosting model is a machine learning technique that uses a featurebased decision tree for training and prediction.
The purpose of the forecasting algorithm is to reduce the error between the predicted and real value. The error was defined by the following expression [53]: where: -real target value; -predicted target value. The learning task is to determine the minimum of the loss function: The loss function was the vector and its result was the scalar value of the prediction error.
By using a gradient, the direction of maximum error reduction was determined to optimize the time to find a solution: where: -derivative of the function f with respect to external factor x.
The values of external signs at which the error function reached its minimum value were calculated as follows: where: t-iteration number. A finite number of iterations was used to search for the minimum of the error function.
The correlation between the target value (electricity consumption) and the exogenous The loss function was the vector and its result was the scalar value of the prediction error.
By using a gradient, the direction of maximum error reduction was determined to optimize the time to find a solution: where: ∂ ∂x n -derivative of the function f with respect to external factor x. The values of external signs at which the error function reached its minimum value were calculated as follows: where: t-iteration number. A finite number of iterations was used to search for the minimum of the error function. The correlation between the target value (electricity consumption) and the exogenous parameters used in the model for gradient-boosting models took into account the nonlinearity of the relationship, as well as categorical variables such as the day of the week and the hour of the day. The algorithm for determining the degree of influence of exogenous parameters on the target feature in the used gradient-boosting model was described in [56]. Since the degree of linear correlation between electricity consumption and the business plan for gas compression was known (Table 2), a comparative analysis of the correlation of exogenous parameters relative to the business plan was performed (the correlation between the business plan and electricity consumption was taken as 0.77 in accordance with Table 2). The results of calculating the degree of correlation of a feature with respect to the target value are shown in Figure 7. parameters on the target feature in the used gradient-boosting model was described in [56]. Since the degree of linear correlation between electricity consumption and the business plan for gas compression was known (Table 2), a comparative analysis of the correlation of exogenous parameters relative to the business plan was performed (the correlation between the business plan and electricity consumption was taken as 0.77 in accordance with Table 2). The results of calculating the degree of correlation of a feature with respect to the target value are shown in Figure 7. From the results obtained, it could be concluded that the nonlinear correlation between features and power consumption was much higher.
The forecasting model was trained by determining the combination of external features at which the error value was minimal. With known external signs on the basis of the trained model, it became possible to predict future values of power consumption.
The results are shown in Figure 8.  From the results obtained, it could be concluded that the nonlinear correlation between features and power consumption was much higher.
The forecasting model was trained by determining the combination of external features at which the error value was minimal. With known external signs on the basis of the trained model, it became possible to predict future values of power consumption.
The results are shown in Figure 8.

2021, 14, x FOR PEER REVIEW 13 of 25
parameters on the target feature in the used gradient-boosting model was described in [56]. Since the degree of linear correlation between electricity consumption and the business plan for gas compression was known (Table 2), a comparative analysis of the correlation of exogenous parameters relative to the business plan was performed (the correlation between the business plan and electricity consumption was taken as 0.77 in accordance with Table 2). The results of calculating the degree of correlation of a feature with respect to the target value are shown in Figure 7. From the results obtained, it could be concluded that the nonlinear correlation between features and power consumption was much higher.
The forecasting model was trained by determining the combination of external features at which the error value was minimal. With known external signs on the basis of the trained model, it became possible to predict future values of power consumption.
The results are shown in Figure 8.  The mean absolute forecast error was 521 kWh. The deviation of the confidence interval was 18.4% of the average power consumption. This result demonstrated a greater confidence in the forecast accuracy than the algorithms discussed earlier.
We could conclude from the graph that the use of gradient boosting allowed for the most accurate prediction of the power consumption of an enterprise based on exogenous and endogenous parameters. Accordingly, with an increase in the number of exogenous parameters, the forecast error would decrease.
The results of using various models to predict power consumption are shown in Table 3:

Regulation of the Electricity Load Schedule
The metric for evaluating any forecast is the deviation of the real values from the predicted ones. The main task of forecasting is to reduce the forecast error; however, the real values depend on an infinite number of factors, and even taking into account a huge number of external factors, the deviation of the real load schedule from the planned one is inevitable.
If the declared electricity consumption is exceeded, significant penalties are inevitable for the enterprise; therefore, the next task was to compensate for deviations from the planned load schedule. The magnitude of the error in the predicted interval is shown in Figure 9. We could conclude from the graph that the use of gradient boosting allowed for the most accurate prediction of the power consumption of an enterprise based on exogenous and endogenous parameters. Accordingly, with an increase in the number of exogenous parameters, the forecast error would decrease.
The results of using various models to predict power consumption are shown in Table 3:

Regulation of the Electricity Load Schedule
The metric for evaluating any forecast is the deviation of the real values from the predicted ones. The main task of forecasting is to reduce the forecast error; however, the real values depend on an infinite number of factors, and even taking into account a huge number of external factors, the deviation of the real load schedule from the planned one is inevitable.
If the declared electricity consumption is exceeded, significant penalties are inevitable for the enterprise; therefore, the next task was to compensate for deviations from the planned load schedule. The magnitude of the error in the predicted interval is shown in Figure 9. Based on the results obtained, we could conclude that the predicted values of power consumption were higher and lower than the actual values on the graph with, approxi- Based on the graph in Figure 9, it could be concluded that the forecast deviations from the actual values were characteristic both upward and downward.
The number of excess of the fact over the forecast-1181. Average value-724 kWh.
The amount of underestimation of the fact over the forecast-979. Average value-276 kWh.
Based on the results obtained, we could conclude that the predicted values of power consumption were higher and lower than the actual values on the graph with, approximately, the same frequency due to the approximation of the predicted value to the average; however, in cases where the actual consumption was higher than predicted, the error values were much larger than when the consumption was lower than predicted. This phenomenon was due to the fact that, with an uneven electricity consumption schedule, there were significant peaks that were difficult to predict and which led to an increase in the peak consumption of the enterprise and, as a result, a significant increase in electricity costs. The purpose of this study was to compensate for peaks in power consumption using an ESS.
The algorithm for the formation of the cost of electricity and power when consumption exceeded the declared maximum had general principles in different countries. Article [57] discusses a way to reduce consumption peaks in the Chile power system using wind generators and analyzes the existing methods of generating the cost of electricity in the country to maintain the balance of frequency and active power in the system.
The issues of regulating the parameters of the power system and the formation of the cost of electricity on the example of the power system of the Netherlands are considered in [58].
Electric power systems built on the basis of a competitive market, due to the peculiarities of electricity as a commodity, are based on a single algorithm for the formation of the cost of electricity. The cost of electricity, determined a day before the current one, was adjusted due to the discrepancy between the planned consumption and the actual one. The main added value was formed due to the need to include new generating capacities and load less efficient and more expensive generators. Further, using the example of the enterprise under consideration, an algorithm for the formation of the cost of electricity in the balancing market was described.
In accordance with the forecast of the power system load, the system operator formed the planned peak load hours for the coming period, which were published in the public domain annually [59]. Figure 10 shows an example of a graph of electricity consumption for all consumers in the region where the enterprise was located (power system of Siberia) for 6 August 2021, in which the maximum electricity consumption was highlighted in red (from 7:00 to 8:00).
Energies 2021, 14, x FOR PEER REVIEW mately, the same frequency due to the approximation of the predicted value to the average; however, in cases where the actual consumption was higher than predicted, the error values were much larger than when the consumption was lower than predicted. This phenomenon was due to the fact that, with an uneven electricity consumption schedule, there were significant peaks that were difficult to predict and which led to an increase in the peak consumption of the enterprise and, as a result, a significant increase in electricity costs. The purpose of this study was to compensate for peaks in power consumption using an ESS.
The algorithm for the formation of the cost of electricity and power when consumption exceeded the declared maximum had general principles in different countries. Article [57] discusses a way to reduce consumption peaks in the Chile power system using wind generators and analyzes the existing methods of generating the cost of electricity in the country to maintain the balance of frequency and active power in the system.
The issues of regulating the parameters of the power system and the formation of the cost of electricity on the example of the power system of the Netherlands are considered in [58].
Electric power systems built on the basis of a competitive market, due to the peculiarities of electricity as a commodity, are based on a single algorithm for the formation of the cost of electricity. The cost of electricity, determined a day before the current one, was adjusted due to the discrepancy between the planned consumption and the actual one. The main added value was formed due to the need to include new generating capacities and load less efficient and more expensive generators. Further, using the example of the enterprise under consideration, an algorithm for the formation of the cost of electricity in the balancing market was described.
In accordance with the forecast of the power system load, the system operator formed the planned peak load hours for the coming period, which were published in the public domain annually [59]. Figure 10 shows an example of a graph of electricity consumption for all consumers in the region where the enterprise was located (power system of Siberia) for 6 August 2021, in which the maximum electricity consumption was highlighted in red (from 7:00 to 8:00).
The 8th hour (from 7:00 to 8:00) was the peak hour on this day, 6 August 2021. The maximum predicted hourly consumption was calculated as the maximum consumption of electricity by the consumer per hour of the day from certain hours of the The 8th hour (from 7:00 to 8:00) was the peak hour on this day, 6 August 2021. The maximum predicted hourly consumption was calculated as the maximum consumption of electricity by the consumer per hour of the day from certain hours of the maximum load of the power system. Based on these data, the system operator determined the price that would develop in the balancing market and at which the participants would sell or buy deviations of the actual consumption from the planned one. Due to the calculation method of these parameters, the so-called imbalance of the balancing market arose-the preliminary requirements of the sellers (generation) were higher than the preliminary obligations of the buyers. Thus, to satisfy generation bids, the difference between requirements and obligations was attributed to each kW purchased or sold on the balancing market in terms of the volume of buyers (i.e., it decreased the selling price for buyers and increased the purchase price). Additionally, the cost of each kW increased by an amount determined as the weighted average cost of starting up the generating equipment to maintain the balance of active power in the system when the schedule deviated from the specified one.
The final cost of electricity in the balancing market was calculated using the following formula [60]: where: P cons -price of 1 kW of electricity for a consumer in the balancing market; P DAM -price determined for settlements in the day ahead market; P BM -increase in the price of electricity in the balancing market; P UB -unbalance price.
The resulting price was usually significantly higher than the day-ahead market price of electricity. Therefore, in order to reduce the cost of purchasing electricity, it was necessary to reduce the amount of deviations from the planned consumption schedule.
For this purpose, various methods were used: 1.
Changing the mode of production equipment.

2.
Changing the operating mode of air conditioning, heating and water supply systems. 3.
Using our own sources of small generation. 4.
Using rechargeable batteries to redistribute consumption peaks.
Methods 1 and 2 could be detrimental to production, and the lost revenue could be higher than the savings in the cost of electricity.
Methods 3 and 4 could be used both to optimize the consumption schedule and to participate in the demand response system.
In this paper, an algorithm for the use of energy storage systems was considered as a way to reduce deviations of the actual schedule of electricity consumption from the planned one.

Using Energy Storage Systems to Improve the Efficiency of Power Supply
The use of energy storage systems in order to flatten the load curve is relevant for the power systems of many developed and developing countries due to the increasing share of the use of renewable energy sources, which are dependent on external factors and are characterized by low maneuverability, such as wind turbines and solar panels. The use of energy storage systems in the Chinese power system is discussed in [61]. The use of energy storage systems in the Chilean Power System is discussed in [62].
The use of storage batteries for leveling the electricity consumption schedule of enterprises is described in [63]. The article presents the results of modeling an electrical complex using a hybrid ESS; however, the choice of the optimal power of an ESS is not considered.
The use of an ESS to reduce the peaks in consumption of various types of consumers in Belgium is described in [64]. The use of an ESS to optimize the power supply system of enterprises is considered in [65].
The structural diagram of the use of an ESS in the enterprise is shown in Figure 11.  Figure 11. Block diagram of power supply using ESS.
Next, an algorithm was proposed for selecting the capacity of energy storage systems (batteries) to reduce the difference between the actual and predicted load values. Figure 12 shows a graph of the distribution of the forecast error over time using the example of one day. An evolutionary genetic algorithm was used to find the optimal value of the SNE capacity at known values of the forecast error.
The task of optimizing the maximum working capacity of the energy storage system was reduced to determining the optimal value of the capacity, at which the following value of the maximum power consumption was achieved on the calculated day: where: i-hour of the day in which the maximum power consumption was controlled due to coincidence with the peak load of the power system; -the actual value of the power consumption of the enterprise; -the predicted value of the power consumption of the enterprise; n-the size of the sample under consideration (forecast horizon), based on the results of which a decision was made on the choice of the optimal capacity.
Limitations for the operation of the algorithm: Figure 11. Block diagram of power supply using ESS.
Next, an algorithm was proposed for selecting the capacity of energy storage systems (batteries) to reduce the difference between the actual and predicted load values. Figure 12 shows a graph of the distribution of the forecast error over time using the example of one day.  Figure 11. Block diagram of power supply using ESS.
Next, an algorithm was proposed for selecting the capacity of energy storage systems (batteries) to reduce the difference between the actual and predicted load values. Figure 12 shows a graph of the distribution of the forecast error over time using the example of one day. An evolutionary genetic algorithm was used to find the optimal value of the SNE capacity at known values of the forecast error.
The task of optimizing the maximum working capacity of the energy storage system was reduced to determining the optimal value of the capacity, at which the following value of the maximum power consumption was achieved on the calculated day: where: i-hour of the day in which the maximum power consumption was controlled due to coincidence with the peak load of the power system; -the actual value of the power consumption of the enterprise; -the predicted value of the power consumption of the enterprise; n-the size of the sample under consideration (forecast horizon), based on the results of which a decision was made on the choice of the optimal capacity.
Limitations for the operation of the algorithm: An evolutionary genetic algorithm was used to find the optimal value of the SNE capacity at known values of the forecast error.
The task of optimizing the maximum working capacity of the energy storage system was reduced to determining the optimal value of the capacity, at which the following value of the maximum power consumption was achieved on the calculated day: where: i-hour of the day in which the maximum power consumption was controlled due to coincidence with the peak load of the power system; y i -the actual value of the power consumption of the enterprise; y i -the predicted value of the power consumption of the enterprise; n-the size of the sample under consideration (forecast horizon), based on the results of which a decision was made on the choice of the optimal capacity.
Limitations for the operation of the algorithm: where: W i -capacity value of the ESS per hour of day, kWh; P i -power supplied by the ESS to the network at time, kW; W min -minimum working capacity, kWh; T i -actual temperature of the ESS; P max -permissible maximum energy supplied by the ESS to the network.
A limitation of the minimum charge-discharge cycles per day was also imposed. The program code that implemented the genetic algorithm was implemented in the Python 3.8 programming language in the PyCharm software environment. The functioning of the algorithm together with the forecast of power consumption to determine the optimal capacity is shown in Figure 13. A limitation of the minimum charge-discharge cycles per day was also imposed. The program code that implemented the genetic algorithm was implemented in the Python 3.8 programming language in the PyCharm software environment. The functioning of the algorithm together with the forecast of power consumption to determine the optimal capacity is shown in Figure 13. Obviously, the maximum error reduction would be achieved with the maximum battery capacity, but, often, the cost of installing the ESS exceeded the possible penalties for exceeding the specified power consumption schedule. Therefore, to determine the efficiency of the battery for a specific load schedule, the following formula was used: where: Obviously, the maximum error reduction would be achieved with the maximum battery capacity, but, often, the cost of installing the ESS exceeded the possible penalties for exceeding the specified power consumption schedule. Therefore, to determine the efficiency of the battery for a specific load schedule, the following formula was used: where: η-ESS performance. ∆P-reduction in power consumption. C-battery capacity.
The result of choosing the optimal capacity of the ESS is shown in Figure 14: The results shown in Figure 14 allowed us to conclude that the efficiency of using a ESS could be increased by up to 75% (from 0.22 to 0.385).
Algorithm results: • The optimal effective capacity of ESS-200 kW.

•
Average reduction in power consumption-77 kW.

Discussion
The effect of using the energy storage system at the enterprise was achieved by using 1. Direct reduction in deviations of actual electricity consumption from the declare plan; 2. Participation in the demand response system; 3. The use of energy storage devices to ensure the required voltage quality; 4. Ensuring the reliability of power supply to especially critical categories of consumers The economic effect according to points 3-4 could only be calculated indirectly, sinc the deviation of the electricity parameters from the normative ones could affect the equip The results shown in Figure 14 allowed us to conclude that the efficiency of using an ESS could be increased by up to 75% (from 0.22 to 0.385).

Discussion
The effect of using the energy storage system at the enterprise was achieved by using: 1.
Direct reduction in deviations of actual electricity consumption from the declared plan; 2.
Participation in the demand response system; 3.
The use of energy storage devices to ensure the required voltage quality;

4.
Ensuring the reliability of power supply to especially critical categories of consumers.
The economic effect according to points 3-4 could only be calculated indirectly, since the deviation of the electricity parameters from the normative ones could affect the equipment failure, or reduce the technical characteristics. Additionally, the damage from emergency power outages at the enterprise could be determined only statistically based on historical data.
In this work, a calculation was performed of the positive economic effect from the use of energy storage systems with participation in the demand response system and reducing the deviations of the load schedule from the planned one.
In accordance with expression six, the cost of deviations of the actual electricity consumption from the declared plan by months was calculated with the following ESS characteristics (Table 4): The results of calculating the economic effect are shown in Table 5: At this stage of the study, obtained results made it possible to predict the efficiency of using the installed capacity of the ESS to compensate deviations from the planned power consumption. A proposed forecasting algorithm in this study was applicable to enterprises with different types of production, since the forecast model was well suited for an uneven load curve. Due to the limited scope of the article, the impact of the ESS on the consumer's electricity quality, as well as the necessary requirements for relay protection and automation in bidirectional power flows, was not considered. In further research work, these issues will be considered, as well as the optimization of the electricity consumption schedule using energy storage systems in the conditions of using distributed generation sources: traditional and based on renewable energy sources.
A mechanism for managing the demand for electricity consumption by predicting electricity when using exogenous parameters in the model that most strongly affects the schedule of electricity consumption was considered. The most significant factor for a compressor station was the planned volume of gas compression. With the addition of exogenous parameters, the forecasting model, the average absolute forecast error with a forecast horizon of 3 months for an uneven power consumption schedule decreased from 40% to 10%.
The algorithm for determining the optimal power allowed reducing the payment for electricity by 0.25% when using an ESS in the conditions of a gas compression enterprise, and also achieved the efficiency of using the installed capacity of the ESS of 38.5%.
The authors of article [66] positively assess the prospects for the growth in the use of storage batteries as energy storage systems and the further use of such systems in the Smart Grid concept.
In a further study, it is planned to consider the impact of multiple charge-discharge cycles of an ESS on the service life of batteries and the impact on the quality of the enterprise's electricity.
Another important issue is the assessment of the increase in the reliability of power supply to especially critical groups of consumers, for which an ESS could serve as a backup source of power supply [65]. The influence of exogenous parameters on the power consumption graph was determined, which allowed us to conclude that, with a small number of exogenous parameters, the forecasting model could adapt even to an uneven load schedule with a strong scatter of values.

Conclusions
Improving the efficiency of energy storage systems plays an important role in the global development of the electric power industry. The results obtained in this article made it possible to use the resource of an ESS with maximum efficiency, which could lead to an increase in the share of an ESS in the installed capacity of the power system. One of the most significant effects of the development of solar energy sources was an increase in the efficiency of the use of renewable energy sources, as well as an increase in the efficiency of generating equipment in general, since the transfer of consumption peaks using energy storage allows the use of more efficient generation.
At this stage of the study, obtained results made it possible to predict the efficiency of using the installed capacity of an ESS to compensate deviations from the planned power consumption. The proposed forecasting algorithm in this study was applicable to enterprises with different types of production, since the forecast model was well suited for an uneven load curve. Due to the limited scope of the article, the impact of the ESS on the consumer's electricity quality, as well as the necessary requirements for relay protection and automation in bidirectional power flows, was not considered. In further research work, these issues will be considered, as well as the optimization of the electricity consumption schedule using energy storage systems in the conditions of using distributed generation sources: traditional and based on renewable energy sources.
The results obtained in this article made it possible to use the resource of an ESS with maximum efficiency, which could lead to an increase in the share of the ESS in the installed capacity of the power system. One of the most significant effects of the development of solar energy sources was an increase in the efficiency of the use of renewable energy sources, as well as an increase in the efficiency of generating equipment in general, since the transfer of consumption peaks using energy storage allows the use of more efficient generation.
This article explored the possibility of introducing an ESS into the power system of an enterprise with an uneven schedule of power consumption based on long-term forecasting. The characteristics of the power consumption graph were investigated, endogenous and exogenous components were identified, and their influence on the forecast was analyzed. A comparison of various forecasting algorithms, their advantages and disadvantages, was carried out. The analysis of deviations of the predicted values from the actual ones was carried out and an algorithm for the operation of an ESS was developed, which compensated for the deviations of the actual values from the predicted ones. The optimal capacity of an ESS was determined to compensate for the deviations of the actual values of the load from the planned ones. An additional economic effect from the use of an ESS in the demand management program was determined.
The main advantages of the results of this study over existing methods: • The drawbacks of forecasting using autoregressive and statistical models for the power consumption graph with a high coefficient of unevenness were revealed. • Long-term forecasting based on decision trees using exogenous parameters and gradient boosting to find solutions with a high coefficient of unevenness of the load graph allowed to reduce the forecast error by four times over a forecast horizon of 3 months.

•
The algorithm for choosing the optimal capacity of ESS allowed to achieve an increase in the efficiency of using the storage devices by almost two times, which would significantly reduce the capital costs of ESS installation. Funding: The research was performed at the expense of the subsidy for the state assignment in the field of scientific activity for 2021 №FSRW-2020-0014.

Data Availability Statement:
Restrictions apply to the availability of these data. Data were obtained from LLC "GAZPROM TRANSGAZ TOMSK" and are available from the authors with the permission of LLC "GAZPROM TRANSGAZ TOMSK".

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript: