Simulation of the Energy Efﬁciency Auction Prices via the Markov Chain Monte Carlo Method †

: Over the years, electricity consumption behavior in Brazil has been analyzed due to financial and social problems. In this context, it is important to simulate energy prices of the energy efficiency auctions in the Brazilian electricity market. The Markov Chain Monte Carlo (MCMC) method generated simulations; thus, several samples were generated with different sizes. It is possible to say that the larger the sample, the better the approximation to the original data. Then, the Kernel method and the Gaussian mixture model used to estimate the density distribution of energy price, and the MCMC method were crucial in providing approximations of the original data and clearly analyzing its impact. Next, the behavior of the data in each histogram was observed with 500, 1000, 5000 and 10,000 samples, considering only one scenario. The sample which best approximates the original data in accordance with the generated histograms is the 10,000th sample, which consistently follows the behavior of the data. Therefore, this paper presents an approach to generate samples of auction energy prices in the energy efficiency market, using the MCMC method through the Metropolis–Hastings algorithm. The results show that this approach can be used to generate energy price samples.


Introduction
Energy consumption and economic growth must be directly related [1]. Therefore, it is important that, when planning efficient energy conservation policies, policymakers consider the direct impacts of energy consumption on economic growth and the consequences on energy consumption [2,3]. In addition, studies reveal that with higher levels of economic activity, there are higher levels of energy use and environmental impacts [4][5][6]. Moreover, it is important to address the concept of energy efficiency, since it provides security [7,8] and contributes to the reduction of carbon dioxide (CO 2 ) emissions. Energy efficiency is one of the best ways to reduce and control greenhouse gas emissions [9]. Energy efficiency is an essential tool to protect the environment. Energy efficiency reduces greenhouse it would be necessary to obtain the probability density distribution of the available data. More recently, a study on the estimated density via the kernel method can be seen in [28]. Another approach used to obtain the density function is using Gaussian mixture models [29]. From the probability density distribution, the Markov Chain Monte Carlo (MCMC) method can be used to obtain the samples of interest [30]. Two methods were used to obtain the density distribution of the data: the Kernel method and the Gaussian mixture model. In addition, the MCMC method was used to generate energy price samples from energy efficiency auctions in Brazil. That is important for the agencies and companies that use the energy auction. Therefore, this study can contribute to the energy system planning of companies or countries.
Furthermore, a Demand Side Bidding (DSB) model adapted for the Brazilian market is proposed. This proposal contemplates the development of the process based on the specification of a case study evaluated in 2 scenarios: First, without the use of energy efficiency and second, with the use of energy efficiency (energy that was not used). The rest of the paper is organized as follows: Section 2 brings a review of the literature on energy efficiency experiences in other countries. Section 3 shows the dynamics of the demand side bidding proposal in Brazil and the operation of the proposal. Section 4 describes the methodology, which includes estimation and simulation methods. Section 5 presents the results and discussion, as well as the reports obtained based on the energy prices that were assigned in the Brazilian electricity market. Finally, Section 6 provides the main conclusions and some possibilities for future research.

Experiences of Energy Efficiency in Other Countries
Interest in energy efficiency policies in the final use of electricity has boomed in recent years worldwide. A main reason is that the MWh of electricity that is not produced is cheaper than building new generating plants [31]. Recently, Brazil became the first country in South America, which was considered by the International Energy Agency in the annual statistical report on energy efficiency for the first time [32]. The purpose of this section is to present the main energy policies implemented in those countries that stand out for continuous improvement in energy efficiency, so that the Brazilian energy market, according to its reality, also adapts those policies.

Germany
In Germany, energy efficiency is already accepted as a key element of a sustainable energy system, which offers the lowest cost reduction of CO 2 , safeguards energy security and reduces energy costs [33]. In recent years, the German government has presented a new set of energy efficiency policy measures in its action plans on energy efficiency [34] and climate protection [35]. The purpose was to achieve national and European political objectives and, in parallel, generate economic, environmental and social benefits [34].
The set of energy efficiency policy measures has been considerably expanded and refined [33,34]. In this context, important energy efficiency objectives stand out, such as: 50% less energy consumption by 2050 compared to 2010 and the use of energy efficiency and renewable energies to reduce CO 2 emissions by at least 25% by 2020 and 80% by 2050 compared to 1990. In addition, it is possible to mention the minimization of electricity consumption against projections for economic and demographic development, 10,000 energy efficient districts by 2020 and 100 energy efficient office buildings by 2020 [33]. All these constant efforts at the national level place Germany among the leading countries with best energy efficiency practices [36].

Italy
Italy is considered one of the most outstanding models in energy efficiency, since it has successful energy efficiency obligation schemes, especially in the industrial context [37,38]. Over the years, 80% of White Certificates have been produced in the industrial sector [38]. In order to achieve the objectives during the 2014-2020 period, Italy relies mainly on the White Certificate obligation scheme, which was created in 2001 but has been applied since 2005 [39].
The Italian White Certificate, evaluated in tons of oil equivalent saved, acts as an obligation scheme and as an incentive, due to the presence of a market for the trade of white certificates. On the one hand, electricity and gas distributors with more than 50,000 customers are bound to meet ever-increasing annual energy efficiency targets. On the other hand, it is a flexible mechanism, since energy savings can be obtained through the operation of market operators: distributors bound by the environment, companies operating in the energy service sector, companies or organizations that have an energy manager or an ISO 50001 certified energy management system in place [40].

United States
According to Figure 1, the United States (US) occupies the top ten of the ranking, according to the American Council for an Energy-Efficient Economy (ACEEE) [36]. Likewise, the US has projected that consumers will save more than USD 545 billion between 2009 and 2030, in the adoption of these minimum efficiency standards, thus reducing energy consumption by 11,957.29 TWh and, consequently, of CO 2 emissions by more than 2.26 trillion tons [41].
The US government, through energy efficiency policies, believes that it can control the growth of electricity consumption. Simultaneously, they are guided by the rules of building construction, standard equipment, as well as labeling and incentives. These actions aim to achieve an estimated annual savings of 0.8% in 2025 [41].

Overview: International Energy Efficiency
Governments that promote investment in energy efficiency and the implementation of supportive policies save citizens' money and reduce pollution. In this context, the ACEEE, through the 2018 International Energy Efficiency Scorecard, presents and explores energy efficiency policies and performance of 25 of the world's top energy-consuming countries, including Brazil [36]. Figure 1 shows the top 25 countries with their respective position in the ranking. In the evaluation carried out by ACEEE [36], and according to the established scores, it is possible to see that Germany and Italy tied for first place, obtaining the highest overall score of 75.5 out of 100 possible points (considering four categories: National efforts, Buildings, Industry and Transportation). The first places in the ranking are occupied by France, which ranked first in the transportation category, Japan, which led the industry category, and the building categories led by Spain and the national efforts by Germany.
The average score was 50.5 points. Faced with this scenario, Brazil presents a low score, due to the minimal effort in policies to tackle energy consumption [36]. Although Brazil has an effective and mandatory policy for equipment labeling, determined by an energy efficiency Law n. 10.295/2001 [42], it does not obligatorily comply with buildings, which are very inefficient. The building labelling is still voluntary and, therefore, has a low impact on the market. In addition, Brazilian industries benefit from the label policy for electric induction motors, but there is no policy for better energy management of the industrial park (ISO 50001, for example). It is also worth mentioning that the transport sector is quite inefficient, despite some policies for the use of ethanol and biodiesel. Thus, there are still challenges to be pursued in this country, although there are already imposing policies that provide for greater energy efficiency.
In the last three editions of ACEEE, the European countries have made constant improvements in their scores: Germany and Italy. In the case of Brazil, one can observe that the scores have slightly improved a over the years (2014: 30; 2016: 32.5 and 2018: 36.5), though it is still far from those of the developed countries [36].

DSB in Brazil
In this section, a proposal for the DSB model adapted to the situation of Brazil is developed. DSB allows for an active participation of energy consumers (demand) in the process pricing while maintaining the quality of the power supply. Side management of the demand has important implications for the overall efficiency of the electricity supply, both economically and environmentally [43]. In the long term, it also implies postponing or even avoiding the need for expensive investments in power plants.
It may also involve reducing both the size of the transmission lines and the construction of hydro and thermal power plants. This is quite important, as the total cost could be considerably reduced. In most cases, the level of CO 2 emissions could be reduced with the DSB mechanism.
The DSB mechanism will not occur unless each one of the different participants (a: Regulation, legislation, government; b: Transmission system operators; c: Energy Conservation Service Companies; d: Sellers; e: Consumers) benefits from it. The Brazilian National Electric System Operator is responsible for maintaining the system's security and power supply quality. The virtual power generation would be another power source available to ensure system reliability. Generally, in competitive markets, suppliers must buy enough energy to always meet the needs of theirs customers to avoid possible financial penalties [44].
Customers have greater flexibility in their electricity usage patterns, which is particularly valuable for suppliers, as it can help suppliers avoid periods of maximum energy demand. Electricity consumers are naturally interested in buying electricity at the lowest cost, and demand side management can help in this case [45]. In fact, some consumers can change their consumption habits without harming seriously their way of life. In addition, in most cases, residential consumers use low amounts of energy, which makes them not eligible to participate in the DSB mechanism [46].
Having examined the actors to participate in the DSB mechanism, the concepts are defined based on expert opinion [23]. In addition, the steps include an attempt to adapt and use technology to facilitate some points. These steps are shown in Figure 2. The first step in developing a DSB system is to establish standards/governance processes of the market. In addition, pricing mechanisms must be well defined, since before fixing the price and establishing its sales policies, a market must have knowledge of the elements of the establishment of the sale price of the product.
Currently, many markets seek excellence in production processes through quality. In the same way, the mechanisms of the DSB involve the definition and guarantee of quality of the participants [47]. It is also important to have a demand side product that is well adjusted. With respect to this, the design of a methodology for measurement and verification will convey reliability among its participants. In this context, it is essential to mention the regulation, as it becomes an instrument that the regulator can rely on to establish rules (rights and obligations) for all participants. In addition to the regulator, there is a mechanism that can monitor the overall process [23]. It is essential that efficiency and effectiveness be evaluated, and alternatives to solve problems and the best solution are selected and implemented.

Operation of the DSB
To contextualize the operation, a Brazilian example of the energy market will be taken into account in the occurrence of a possible DSB, which will be composed of three free consumers and three energy distributors, both consuming a total of 2000 megawatt average (MW avg) in a year t. The market will have six hydroelectric generators that supply the consumers (free consumers and distributors). Figure 3 shows the example in a time t. The losses in the network (technical and commercial) were not considered. In addition, to standardize the notation of operation, the following abbreviations were used, GE: Generated Energy, HE: Hydroelectric, FC: Free Consumer, DB: Distributor [5,23].
Thus, the energy prices that the demand market will pay will be set by the energy prices that each generator decides to sell through established contracts. Likewise, the contracts will be established between the generators and the demand market matching the energy demanded and the energy supplied, as shown in Figure 3.  Figure 4 shows that the energy market grew in time t + 1, that is, the consumption energy increased. Consumption went from 2000 MW avg to 2100 MW avg, whereas the market observed in the Figure 4 does not make use of energy efficiency.
In addition, the FC 1 went from 100 MW avg to 120 MW avg (20% growth), the FC 3, went from 300 MW avg to 330 MW avg (10% growth), DB 1 passed of 800 MW avg to 820 MW avg (2.5% growth), and DB 2 went from 600 MW avg to 630 MW avg (5% growth). Meanwhile, to meet the new need for energy, without the use of energy efficiency, two new generators were built (Generators 7 and 8). In addition, the price of energy also increases when compared to other generators. Furthermore, the different contracts established between generators and consumers are observed, matching the amount of energy and the price that both parties require. Thus, one can see that the average price in Brazilian real (R$), has an increase of 1.2% compared to the average price in year t (price year t = 107.50 R$/MWh, price year t + 1 = 108.76 R$/MWh). In general terms, the market in t + 1 increased by 5% compared to the time market t.
After analyzing the market without energy efficiency, Figure 5 presents the same market, but with the use of energy efficiency. In this context, two DSB scenarios are proposed: real environment and virtual environment. In the following figure, one can check the behavior of the participants in the real environment. At the same time t + 1, FC 2 managed to reduce its consumption of energy up to 160 MW avg, that is, decreased 40 MW avg from the original 200 MW avg, with the use of energy efficiency measures. It is important to note that the difference of this market in relation to the market without energy efficiency, is that the construction of the generator was avoided, as shown in Figure 6. In addition, the average price decreased (108.16 R$/MWh) compared to the market without efficiency (108.76 R$/MWh), thus showing that there is a gain with energy efficiency. This is expected to happen in the real market proposed by the DSB. Furthermore, the contracts are matched according to the energy demanded and the energy supplied by the different participants.
Thus, the market will be analyzed using energy efficiency in the virtual environment, which is the environment that contemplates how the consumer who manages to save energy can sell it to other consumers.
As seen in Figure 6, the FC 2 reduces its consumption to 160 MW avg, saving 40 MW avg, which could be sold to both FC 1 and DB 1. Both have increased their energy consumption. Considering the contract that FC 2 had with generator 2 still continues, this has not been modified despite the reduction of consumption. Therefore, the FC 2 must take into account the price to use at the time of selling the energy that it has managed to save. One will have to analyze that the ideal price that could be used to sell energy must be greater than the price set for generator 2 (flat price of 110.00 R$/MWh) and should also consider that the price it tries to use must be less than the price required to build generator 7 (140.00 R$/MWh). In this way, FC 2 will make a profit when selling energy. In this scenario, the price that FC 2 is using is 125.00 R$/MWh (energy value between 110.00 R$/MWh and 140.00 R$/MWh). It can also be seen that the average price decreased to 108.48 R$/MWh compared to average market price without the use of energy efficiency (108.76 R$/MWh). Everything indicates that the use of energy efficiency, as proposed by the DSB, brings profit to society, not only in economic terms, but also in environmental aspects, considering the energy efficiency measures translated as a virtual power plant in an environment of extreme energy expansion of the system as in developing countries. As a result, investments in the construction of new generation plants (solar, wind, hydro, thermal, etc.) and new transmission and distribution networks would have been postponed.

Methodology
With the aid of the proposed methodology, the conditions are created for planners and controllers to better manage DSB prices. Depending on how the price behaves over time, the proposed methodology provides the conditions for adaptation. The methodology is presented in what follows: first, a method is described to approach a proper density function to the behavior of the original data (Energy Efficiency Auction prices). Then, the MCMC method, which generates samples from the distribution of interest, is presented.
The MCMC methods are simulation methods to generate samples of the a posteriori distributions and estimate statistics of interest of this posteriori distribution within a Bayesian framework. Values of an auxiliary density are successively simulated, which do not necessarily have to be similar to the density a posteriori. Each generated value depends only on the previous simulated value, hence the notion of Markov chain. They can be used to simulate values of a distribution that is difficult to generate samples directly from it. The MCMC algorithm used was the Metropolis-Hastings, which allows for different samples to analyze different price scenarios.

Estimation of the Density: The Kernel Method and Gaussian Mixture Models
The histogram is one of the most used non-parametric method for density estimation. Generally, the idea is based on dividing the interval of variation of the data into intervals of size h and count the number of observations that exist in each interval [48].
Considering the interval [−h/2, h/2), the probability that an observation X belongs to the interval, is given by: where f is the density of X. Typically, an estimate of the density f can be defined as the count of the amount of observations that are in each interval, divided by the total of observations. Note that the estimate f h (x) depends strongly on the choice of h, called the smoothing parameter.

Estimation by the Kernel Method
The main idea, previously presented on the histogram, suggests a generalization [48], considering the following function: Therefore, a new estimate for f can be: Clearly, this new estimate makes a generalization of the notation based on the histogram. Likewise, it is observed that f is not a continuous function and has a derivative equal to zero at all points, except at jump points X i ± h. Furthermore, the estimate is strongly influenced by the choice of h. The smaller the size of h, the less softened the estimate will be. Conversely, the higher h, the smoother the final estimate.
Data for Energy Efficiency Auctions of price negotiations are taken from previous auctions, from 2005 to 2014. The objective of this research is to evaluate the behavior of energy prices between 110.00 R$/MWh and 140.00 R$/MWh, following the suggestions of [23].
The data distribution in the range of interest is unknown. Therefore, the nonparametric kernel method was used to obtain the estimated density function of the data energy prices. The method can be interpreted as a generalization of the histogram. An estimated density function provided by the kernel method was then approximated by a polynomial of order 17. The polynomial coefficients were obtained using the method of least squares.
On the previous definition, the probability is recognized with the following notation: A Markov chain (homogeneous in time) is defined by its initial state, θ 0 , and the nucleus of transition: Under certain conditions, a Markov chain converges to its stationary distribution:

MCMC
The MCMC methods are based on the creation of a suitable Markov chain [51,52]. Suppose one wants to simulate values of a posterior distribution π(θ|x). The idea of MCMC consists of simulating a Markov chain θ 1 , θ 2 , . . . , whose stationary distribution is π(θ|x). Each simulated value θ t depends only on its predecessor θ t−1 . If the algorithm is implemented correctly, the convergence of the chain is guaranteed regardless of the initial values [30].
It is necessary to simulate the string for a large number of iterations, so that it approaches the stationary distribution. The first simulated values (burn-in iterations) are eliminated because they are not yet in the steady state.
Considering the estimated density obtained by the kernel method from the approximation polynomial and Gaussian mixture model, the alleged distribution of interest and the MCMC method can be used to generate samples.
The MCMC method can generate samples from any distribution of interest. The MCMC algorithm used was Metropolis-Hastings and the interest distribution was obtained by the polynomial approximation and Gaussian mixture model. In fact, random energy price values were generated through the probability distribution obtained by the Kernel method and Gaussian mixture model.

The Metropolis-Hastings Algorithm
The Metropolis-Hastings algorithm was initially developed by Metropolis [53] and generalized by Hastings [48]. Indeed, the idea of the algorithm is to obtain the desired distribution, through a proposed approximate distribution. The Metropolis-Hastings algorithm can be considered as one of the most general algorithms of the MCMC.
This algorithm simulates a Markov chain whose stationary distribution is π(θ). It starts with an initial value θ 0 . Given the current value θ t , a candidate valueθ of a proposed density q θ |θ t is generated. Therefore, the probability of accepting the generated value is calculated: Subsequently, a uniform distribution U(0, 1) is simulated. The decision rule is: if u < α, take θ t+1 =θ. Otherwise, it is rejected and θ t+1 = θ t . Finally, it returns to the beginning of the process. The probability of accepting α, does not depends on the integration constant of the posterior distribution. In this case, the distribution data used to generate an achievement depends on the previous simulation. The distribution proposal adopted in this study was the normal distribution.
The algorithm was able to perform simulations and create scenarios with different sample sizes. The generated samples follow the behavior of the original data. Therefore, these samples can be used to understand the behavior of the distribution of energy prices. They have also allowed to know the probability distribution of the proposed price of DSB between 110.00 R$/MWh and 140.00 R$/MWh.

Results and Discussion
The results of energy efficiency auction prices in Brazil are presented in two stages. First the summary statistics results are shown, followed by the results to the MCMC method. Table 1 shows the prices after having applied the inflation index. In addition, a descriptive analysis of the energy prices was carried out and this will allow for obtaining the different simulations to evaluate the behavior of a possible DSB price. In Table 2, the results obtained can be observed. Therefore, Table 3 shows those prices in which inflation has been applied since the year in which the different auctions began, and the behavior of the classified data is also represented. A frequency distribution was made to analyze and identify auction prices that would be between 110.00 R$/MWh and 140.00 R$/MWh (with an 37.26%) according to the proposal of [23]. Through the non-parametric kernel method, it was possible to adjust a density via an order 17 polynomial function (Figure 7). This figure the density obtained by the Gaussian mixture model with two components.
With the achieved estimation, it is possible to generate simulations following the order of the polynomial and Gaussian mixture model. Thus, several samples were generated with different sizes. The larger the sample, the better is the approximation to the original data.
In this respect, it is worth mentioning that using the kernel and the MCMC methods is crucial to provide approximations of the original data and clearly analyze its impact. Next, the behavior of the data in each histogram with 500, 1000, 5000 and 10,000 ( Figure 8) samples is observed, considering only one scenario. Notice that the sample which best approximates the original data in accordance with the generated histograms is the 10,000 size, having had consistently followed the behavior of the data.
Moreover, once achieved the best-fitted curve, the analysis of each scenario with each sample was carried out to find the probability of prices staying within the range 110.00 R$/MWh and 140.00 R$/MWh. The following table presents the different results obtained with each probability.
According to the reports obtained in Tables 4 and 5, it is observed that the sales price averages were close to the original average proposed by [23], after carrying out different iterations. In addition, there is a minimal decrease in the variation. From the above, Table 4 shows that the variation has a minimal decrease, as the coefficient of variation in the different iterations confirms this.
Finally, as shown in Tables 6 and 7, and now considering in terms of percentages for the ten scenarios, the probability of the price fall in the range of 110.00 R$/MWh and 140.00 R$/MWh is evaluated in each simulated scenario. In fact, the probabilities range between 26% and 35%, the minimum is displayed in scenario 1 with 1000 iterations, and the maximum is displayed in scenario 5 with 500 iterations (Table 6). Table 7 shows that, with the increase in the number of iterations, the results are more stable. Likewise, regarding the Kernel method, a percentage average of 29.9% is obtained for the possible sale of saved energy using 500 iterations; 29.7% with 1000 iterations; 30.1% with 5000 and 30.7% with 10,000. An increase is observed with a greater number of iterations. In parallel, with respect to the Gaussian mixture model, a percentage average of 35.3% is obtained with 500 iterations; 35.4% with 1000 iterations; 36.7% with 5000 iterations and 36.8% with 10,000 iterations. The initial proposal makes sense in relation to the sale price of the energy saved using energy efficiency, since it is possible to achieve a 30.1% probability with the kernel method, and 36.05% with the Gaussian mixture model, for the price in the range between 110.00 R$/MWh and 140.00 R$/MWh.
Through the numerical scenarios, as proposed in [23], the contracting environment and the possible formation of sales prices in the energy efficiency auction were observed. However, the energy balance and financial settlement that DSB proposes within the real and virtual energy market were analyzed, with the purpose of simulating, using the methods proposed and developed in this study, the formation of prices that would be accepted within the Brazilian electricity market, taking into account both buyers and sellers who use different energy efficiency measures.

Concluding Remarks
This research addressed the simulation of energy prices in the Brazilian electricity market considering a possible DSB mechanism. The simulation provided experimentation, considering policy proposals using statistical theory. Considerable simulation processing has been required to obtain statistically significant results. For the approximation of the density distribution of the energy prices of a possible power DSB, the Kernel method and the Gaussian mixture model with two components were used. With the estimation carried out, it was possible to generate simulations following the order of the polynomial and the Gaussian mixture model. These were carried out through the MCMC, and the use of the Metropolis-Hastings algorithm generated samples to allow for the analysis of the behavior of the prices.
Considering the threshold proposed in the work, in which it is preferable to invest in energy efficiency policies rather than build power plants, we suggest studying the various investment options in energy efficiency. This would originate the study of other renewable energy resources. A real approach could help the Brazilian government in making decisions on better energy efficiency policies at certain time intervals, taking into account existing uncertainties.
One of the policies, such as the white certificate, which is to be used in some European countries, such as Germany and Italy, may be necessary to increase the energy saving. This is characterized by three main components: an obligation imposed on energy companies to achieve a quantified energy savings target (including limitations on non-compliance); certified energy savings using standardized calculations that minimize analysis costs; and the certified energy savings that could be commercialized to allow the obligated party to meet its purpose [5,54].
In this work, the main contribution is related to a methodology for generating energy prices that can contribute to energy planning in the sale of energy and in the decision making of the bodies involved and, consequently, with energy efficiency. Besides, countries with a large volume of investment targets at construction of new power plants, and new transmission and distribution networks would benefit from this policy. The methods presented were able to capture the characteristics of the data presented in this study and, consequently, allowed for the simulation of energy prices.
Another fundamental point of this research was to establish a methodology, made up of the different steps defined in general for the implementation of a possible energy efficiency auction in Brazil.
Likewise, future studies should focus on finding another methodology to obtain the different scenarios that were generated in the Brazilian electricity market in order to be considered as a possible alternative to the proposed approach adopted in this paper.