User-Aware Electricity Price Optimization for the Competitive Market †

Demand response mechanisms and load control in the electricity market represent an important area of research at the international level: the trend towards competition and market liberalization has led to the development of methodologies and tools to support energy providers. Demand side management helps energy suppliers to reduce the peak demand and remodel load profiles. This work is intended to support energy suppliers and policy makers in developing strategies to act on the behavior of energy consumers, with the aim to make a more efficient use of energy. We develop a non-linear optimization model for the dynamics of the electricity market, which can be used to obtain tariff recommendations or for setting the goals of a sensibilization campaign. The model comes in two variants: a stochastic version, designed for residential electricity consumption, and a deterministic version, suitable for large electricity users (e.g., public buildings, industrial users). We have tested our model on data from the Italian energy market and performed an extensive analysis of different scenarios. We also tested the optimization model in a real setting in the context of the FP7 DAREED project (http://www.dareed.eu/), where the model has been employed to provide tariff recommendations or to help the identification of goals for local policies.


Introduction
One of the main research objectives in the field of the efficient use of electric energy is the design and experimentation of new mechanisms to lower the electricity consumption and to improve the electricity consumption via demand shifting.Increasing energy efficiency requires a reduction of energy demand peaks by shifting part of the energy consumption in off-peak hours.This can be done via demand response (DR) mechanisms and load control.Beside environmental advantages, DR mechanisms can also lead to economic gains.In particular, they provide end-users with the opportunity to reduce their electricity costs by responding to market prices.
We developed a non-linear optimization model to provide support for political and economic decision makers to define new business models.In the complex and heterogeneous context of the electricity market, our work aims to create a comprehensive model, which collects all of the main variables and parameters that are relevant in the analysis of DR mechanisms for sustainable energy tariffs.Our model components are: (1) elasticity model for customer behavior (i.e., an elastic model to characterize the demand-response behavior and load management), (2) Time of Use (ToU) DR mechanisms, (3) user perception of energy consumption (i.e., a model for the relationship between real and perceived user consumption) and (4) risk aversion behavior of customers.Our aim is to present a new conceptual approach to model the recently deregulated power markets.Differently from previous literature, our approach works on a time scale of one year.It is focused on ToU-based prices, but it also takes into account many factors that are crucial for modeling a realistic market and that are not considered by existing price optimization approaches (e.g., multiple customers and cognitive aspects, multiple tariffs).By simulating the behavior of the key actors in the electricity market, our model can identify equilibrium situations in which each involved part can pursue its own goals and yet bring the system to a situation of global benefit.To the best of our knowledge, there is no well-established model for the definition of electricity tariffs via optimization and definitely no other model that takes into account existing tariffs and cognitive user aspects.
In our experimental results, we assess what the effect of changing model parameters would be by testing the model in different scenarios.In particular, we show that no model equilibrium (i.e., benefits for both energy provider and customers) is possible in the Italian electricity market under realistic assignments of all of the model parameters.Differently from previous works, which only consider customer elasticity and load consumption, we also show in our results that perception accuracy can significantly affect the demand response model.Our model can be employed in different settings: (1) by an energy utility to obtain tariff recommendations, (2) to obtain recommendations about changes in the customer behavior parameters (e.g., customer flexibility, perception accuracy) and (3) by policy makers to shape incentive mechanisms and to define policy goals.The case study has been defined by merging statistical census, population information and data from the national energy market manager in accordance with the different parameters of our model.We also tested the optimization model in a real setting in the context of the FP7 DAREED project: namely, our optimization model has been employed by staff at ENEL (the main energy provider in Italy) to support the design of attractive tariffs for an Italian town.
The paper is organized as follows.Section 2 provides an analysis of the current state of the art on demand response mechanisms, showing the innovative aspects and the focus of this work.Section 3 describes the proposed optimization model (which comes in a stochastic and a deterministic variant), which take into account the behavior of multiple customers and energy providers.Section 4 presents how our model has been applied to the Italian energy market, and it provides the results and discussion of market scenarios and real-life tests.Concluding remarks follow in Section 5.

Related Work
In this section, we introduce some useful notions in demand response programs with a focus on the price-based DR mechanisms used in our work.Demand response programs studied in the literature can be divided into two main groups: price-based and incentive-based mechanisms.In this paper, we modeled the electricity market using price-based demand response, which is related to the changes in energy consumption by customers in response to the variations of their purchase prices.This group includes DR mechanisms like Time of Use (ToU) pricing, real-time pricing and critical-peak pricing rates.If the price varies significantly, customers can respond to the price structure with changes in their pattern of energy use.We focus on ToU mechanisms, which define different prices for electricity usage during different periods: the tariffs reflect the average cost of generating and delivering power during those periods.A more detailed overview of demand response schemes can be found in [1][2][3].
For its composition, our model and its different parameters can be adjusted to match the market of different countries, regulations and market scenarios.The approaches from the literature in this field are very heterogeneous and difficult to compare directly, so our aim is to present the works that are related to each part of our approach, so as to underline that, differently from previous literature, we grouped all components in a single and holistic model of the electricity market.In the rest of this section, we split the presentation according to the different components of the model.

Benefits of Time of Use Mechanisms for Users
The most widespread DR mechanism in practice is given by ToU-based tariffs.Usually, in this mechanism, peak periods have higher prices than off-peak periods [4].Concerning the study of ToU mechanisms and load management for users, [5] shows an optimal load management strategy for residential consumers, and [6] studies how users can adjust their load level according to a specific DR program.
Our paper is focused on ToU-based tariffs applied to a set of residential and large public customers.However, unlike [5,7], here we are more concerned with defining ToU prices, rather than how to optimally take advantage of them.We therefore use a simpler model for the customer behavior, related to the works that will be discussed in Section 2.2.This choice allows us to obtain an approximate model for a large electricity market (the Italian one, in our experimentation).

Optimization Approaches to Model Electricity Market Prices
It is possible, in the current state of the art, to identify three major trends to model the electricity market: optimization models, equilibrium models and simulation models.A survey of the literature on electricity market models can be found in [8].We used optimization models for the definition of energy prices and provider tariffs: a survey on demand response pricing methods and optimization algorithms is presented in [9].Optimization approaches to define dynamic prices have been proposed in [10][11][12][13].All such works focus on the definition of day-ahead prices for a period of 24 h and for a single customer (or a single group of homogeneous customers).
A model of an energy service provider in the electricity market is defined in [14].This model results in an optimization problem for calculating the optimal electric power and energy selling prices that maximize the economic profits obtained by the provider.Our approach works on a much coarser time scale (one year).It is focused only on ToU-based prices, but our emphasis is on modeling reasonably well the actors and their behavior for the definition of electricity tariffs via optimization by taking into account existing tariffs and cognitive aspects.

Elastic Model for User Consumption
After the electricity market liberalization, consumers have more opportunities to reduce their electricity costs by choosing the proper tariff and modifying their load profile.Therefore, modeling how the electricity demand shifts is a necessary step to obtain an optimization model for the electricity market.The work in [15] proposes an elastic model to characterize the demand-response behavior and load management, and it describes how the consumers' behavior can be modeled using a matrix of self-and cross-elasticity.The same elastic demand-response model is employed in [10,11], which take into account also other incentive schemes.
Some work in the literature, while not proposing models for demand shifting, analyze some of the main features.The work in [16] assesses the impacts of ToU tariffs on a dataset of residential users from the Province of Trento in Northern Italy in terms of changes in electricity demand, price savings, peak load shifting and peak electricity demand at sub-station level, but the paper provides no mathematical model.In general, the response of the customers to the DR programs affects the daily load curve.Therefore, the load duration curve may change considerably due to the responsiveness of the customers over a year [17].For this reason, the effects of DR need to be investigated for a longer time horizon than the daily one.In our paper, we employ a modified version of the elastic demand-response model from [15], which has been adapted to ToU-based prices over a yearly time horizon.This is a major difference w.r.t. the existing literature: it is better suited for the task of defining new tariffs, and it allows us to better identify trends and assess how the characteristics of the market and the customers affect the annual consumption profiles.

Perception of the Electricity Consumption
Consumption and cost awareness have an important role for the effectiveness of demand response schemes.However, many customers do not understand how to lower electricity costs and call for a device that displays the current power output [18], and consumer behavior is complex and difficult to represent in traditional economic theories of decision-making [19].The work in [20] shows how real-time price elasticity provides important information on the demand response of consumers and provides a quantification of the real-time relationship between total peak demand and spot market prices by finding a low real-time price elasticity.The works in [21,22] study how customers respond to price changes and which price indicators are more relevant in this respect to guide the demand shift.The authors of [21] try also to account for misperception of energy consumption, which is further analyzed in [23].The latter work in particular attempts to design a model for the relationship between real and perceived consumption via regression techniques (i.e., function fitting).The paper proposes a (scale dependent) model in logarithmic scale and concludes that customers tend to slightly overestimate low-energy activities and significantly underestimate activities with high energy consumption.
In our work, we take into account the effect of perception accuracy in the consumer behavior using an analytical model.We do not employ the function proposed in [23] due to its dependence on scale: instead, we try to obtain a similar curve by using a different function, discussed in Section 3. We insert this perception model into a richer and more complex model that already takes into account demand elasticity and ToU-based prices.

Multiple Users, Competitive Market and Risk Aversion
All works cited in Section 2.2 focus on the definition of a single customer or a single group of homogeneous customers to model the electricity market.In our work, we model multiple groups of homogeneous customers, and we aim to show how multiple, different consumers react to electricity prices.Differently from the existing literature, we model multiple tariffs in order to represent different competitors in the recently deregulated electricity market.Our aim is to present, with our work, a new conceptual approach to model the recently deregulated power markets (Figure 1).The interaction of competitive agents in the electricity market is usually modeled through equilibrium problems that ensure profit maximization for all of the agents.For example, [24] models the competitive behavior of the electric energy generation market by incorporating a set of constraints, namely the equilibrium constraints, into a traditional production cost model.Usually, consumer choices are marked by personal proclivities, risk aversion and misperception of their consumption, as shown in [25].Therefore, our model analyzes a market situation where the users exhibit risk aversion, which is natural in this type of market.The user risk aversion gives rise to an interesting economical interpretation of our model.

Modeling Approach and Formulation
Each model component is presented here separately.The most natural application of our model is the computation of ToU price recommendation for new tariffs of an energy provider in the situation of a competitive market.In particular, our model is developed from the point of view of a single energy provider whose tariffs are represented as decision variables in our model.The fixed and non-modifiable tariffs are those of competitor providers represented in our model.Moreover, we have developed two distinct modeling approaches for the way customers can switch to a new tariff: the two approaches are presented in the introduction to Section 3.2.

Set of Tariffs
We consider a set T of ToU-based tariffs τ i , defined over a common price band scheme.The scheme specifies a set P of pre-defined price bands π j : the exact configuration (e.g., start, end) of each price band is left unspecified, but we assume that for each band π j , the total number of hours |π j | over a period of one year is available.
Each ToU-based tariff is defined by a price value p i,j for each band.We assume that a subset T f of the tariffs is fixed, i.e., it cannot be altered by the energy provider.For each τ i ∈ T f , the prices are constant values.The remaining tariffs are variable, and their prices are the main decision variables in our model.We assume that the prices take values over a bounded range, i.e., p i,j ∈ [p i,j , p i,j ].As long as the bounds are large enough, this assumption is sufficiently general to handle practical scenarios.Finally, we assume that a subset T o of tariffs is owned by the energy provider, i.e., the provider earns profit (and pays the cost) for the electricity consumed under such tariffs.
This setup is sufficient to handle a number of interesting cases.Variable tariffs are those for which we wish to obtain price recommendations.Tariffs that are both fixed and owned represent pre-existing contracts that cannot be altered.Tariffs that are fixed and not owned are those offered by competitor providers.The point of view is that of a single energy provider that obtains tariff recommendations.

Customer Tariff Choice
The model comes in two variants for customers representation and tariff choice.For the first case, we take into account the behavior of a set C of homogeneous groups of customers, often referred to as "customer classes".We model the tariff switching as a stochastic process as detailed in the next Section 3.2.1.For the second case (i.e., a group of large customers), the model could be used to support the definition of tailored tariffs for public buildings or industrial customers: in this case, the effect of demand shifts on the wholesale price should be disregarded, and finally, the tariff choice should be deterministic rather than stochastic.This deterministic choice behavior could be modeled by formulating the Karush-Kuhn-Tucker (KKT) optimality conditions for a tariff selection subproblem.This modeling is shown in Section 3.7.

Stochastic Tariff Selection for Residential Customers
We take into account the behavior of a set C of customer classes.Each customer class κ k ∈ C is associated with an original tariff τ(κ k ), which must be fixed (i.e., τ(κ k ) ∈ T f ).Moreover, we assume that the approximate number of customers in each class (let this be |κ k |) is known.
Customers may switch to a new tariff, based on its economic benefits.In particular, we assume that each customer in a group can switch tariff with a probability that depends on the obtained savings.Formally, let c k,i be the electricity cost for customer class κ k under tariff τ i .The c k,i term is a constant if τ i is fixed, and a decision variable if τ i is variable: the computation of such cost values will be discussed in the forthcoming Section 3.3.Technically, we say that the customers are likely to exhibit a certain degree of risk aversion, so the savings for class κ k under tariff τ i are given by: where 0 < ρ k < 1 is a risk aversion coefficient.In practice, staying with the current tariffs is considered equivalent to saving a factor ρ k of the current cost: this provides an intuitive approach to define the value of ρ k based on questionnaires or existing data.
As we mentioned, we model the tariff switching as a stochastic process.In particular, we assume that all tariff choices for a given customer class are independent and identically distributed.Formally, we introduce a set of stochastic binary variables Y k,i that are equal to one if a customer in class κ k adopts tariff τ i : i.e., the probability is proportional to the savings computed with Equation ( 1).The number of customers of class κ k that adopt tariff τ i can be obtained by summing Y k,i for |κ k | times.The expected value of this expression is given by: Therefore, on average, the customers in each class spread over the available tariffs proportionally to the value of s k,i .We use this information to define the tariff selection (and risk aversion) component of our model, which is given by: The y k,i variables represent the fraction of customers of class κ k that adopt tariff τ i .Due to the presence of "max" operators in Equation (1), this model component is non-smooth (piecewise linear in particular).The "max" operators can be linearized by using special ordered sets of type 2, which require the addition of binary variables.In our experimentation, however, we employ the modeling system GAMS (See http://www.gams.com/)and let the software take care of the linearization.

Energy Demand and Perception Accuracy
In this paper, we take into account the perception accuracy in the demand response behavior.
The main idea is to view the d(k,i) j variables that will be introduced in Section 3.4 as perceived variations.
We then introduce a second set of variables r(k,i) j to represent the corresponding real variations.The two sets of variables are related by a custom model based on results from [23].In particular, our model is based on a sigmoid function in the form: The α parameter determines the scale of the sigmoid; the β k parameter controls the growth of the sigmoid, which is specific to each customer class κ k .Assuming that y is a perceived variation, that x is a real variation and that β k > 0, then the sigmoid exhibits the qualitative behavior reported in [23]: for values close to zero, y is a overestimation of x; for values close to α, y is an underestimation of x.The break-even point depends on the value of β k .If β k < 1, there is a bias toward overestimation (i.e., for a wide range of values, the perceived variation is larger than the real one), if β k > 1, there is a bias toward underestimation (i.e., for a wide range of values, the perceived variation is smaller than the real one).Figure 2 shows this behavior in the sigmoid function for α = 400, β k = 0.75.(which represent energy values) by the total number of hours in the price bands.Therefore, we obtain: We can then use the real variation variable to compute the total electricity demand for each individual customer of class κ k , in each price band and for each tariff.Formally, we have: where the d represents the total demand.For the original tariff, i.e., τ i = τ(κ k ), the total demand will be the same as the original real demand, i.e., d can be used to compute the cost of energy for each individual customer under each tariff, i.e., the value of the c k,i variables from Section 3.2.This is given by:

Demand Response Behavior
We assume that customers can shift their consumption depending on the energy prices, i.e., they are capable of a demand response behavior.Many demand response programs (including ToU-based prices) have been considered in the literature, but only a few mathematical models have been provided.We have developed a variant of one of the most widely-employed approaches, which was proposed in [15] and is based on a cross-elasticity matrix.Essentially, the approach uses a linear transformation to map the variation of prices to variations of demand: where d is a vector of demand variations over multiple time periods, p is a vector of (normalized) price variations and is called the cross-elasticity matrix.The original approach by [15] and employed in [10,11,26] is designed for time periods of homogeneous duration and day-ahead prices.We adapted the model to ToU-based tariffs with price bands of non-uniform duration, over a year-long time period.The main idea is simply to introduce variables to represent the variation in the yearly electricity demand of an individual customer, for each price band π j .Since we consider multiple customer classes and tariffs in our model, we need separate variables d(k,i) for each class κ k and tariff τ i .The demand variation is therefore connected to the tariff prices by: where the p(k,i) h variables represent normalized price variations.The term dr h is a problem parameter, representing the original demand for an individual customer of class κ k , in price band π h .
With respect to the demand for electricity, a self-elasticity coefficient relates the demand during a band period to the price during that band.A rescheduling of consumption implies that the consumer reduces its electricity demand during some bands and increases it during other (cross-elasticity matrix coefficients).In particular, the terms on the matrix diagonal are always non-positive and are called self-elasticity coefficients.The other terms are always non-negative.Intuitively, the self-elasticity coefficients describe how the demand within each band depends on the prices.The other terms in the matrix represent how the demand shifts from price bands (self-elasticity cells) and to price bands (others two bands in the same column).The sum of the coefficients on each column corresponds to the net increase/decrease of consumption when the normalized prices increase/decrease: we refer to such a quantity as the loss factor.If the loss factor is zero, changing the prices may alter the distribution of the demand between the price bands, but not its total value.Figure 3 reports an example of cross-elasticity matrix, with a visual representation of the demand flows.See [27] for further details.For normalizing the price variations, we use the average price under the original tariff, i.e., p(k,i) Having weighted contributions by dr (k) j and normalized prices provides us with a way to interpret intuitively the j,h coefficients.In particular, if the price in band π h roughly doubles (i.e., the normalized variation is one), then:

•
The demand in band π h (the same band) decreases by a factor | h,h | of the original demand (we recall that self-elasticity coefficients are non-positive).

•
A factor j,h of the original demand of band π h shifts to band π j .

Wholesale Energy Price
The price of the electricity on the wholesale market (i.e., the electricity cost for the provider) depends on the national energy demand, with larger demand values leading to higher prices.This allows a provider to increase profit by exploiting the demand response behavior and reducing the wholesale energy price.In ToU-based tariffs, demand shifts are obtained by lowering prices: hence, the dependency of the wholesale electricity on the demand provides opportunities for win-win situations, where both the provider and the customers obtain some gain.It is important to underline that the wholesale energy price variations along the bands are relevant only if the electricity customers demand is large.If this is not the case, the wholesale energy price for each price band can be considered as a constant parameter.We focus on the retail electricity market, and we consider a demand response problem in a market situation of multiple tariffs and consumers where every entity tries to maximize its own benefits.
Many works (e.g., [2]) assume the wholesale price-demand curve to be super linear, based on the idea that more expensive power generators are activated when the demand is large.We have tested this conjecture for the Italian energy market, which is organized by a (government controlled) corporation called GME (Italian Energy Market Manager) , which issues a reference electricity price and keeps track of the national consumption on a hourly basis.By checking these data, we have observed a weak and linear, rather than super-linear, correlation (see Figure 4).We have therefore decided to use a linear relation to estimate the wholesale energy price w j for each band j, which consists of (∀κ k ∈ C, π j ∈ P): where demand(κ k , π j ) is the total demand of the customers of class κ k in price band π j , and it is given by the product |κ k | y k,i , which is the number of customers of class κ k that adopt tariff τ i .The b j term in Equation ( 15) represents a baseline consumption, which cannot be altered by adjusting the variable tariffs.The µ 1 and µ 0 terms are the coefficients of the linear relation.

Provider Profit and Problem Objective
The most natural problem objective for designing a new tariff is to maximize the provider profit.This is also the natural problem objective if we want to employ our model just to estimate/simulate the behavior of a provider in a given market configuration.In detail, the objective function of our models is: i.e., the sum of the profit for each customer class and price band, with: where p i,j is the tariff price for tariff τ i and w j is the wholesale energy price.The o j term represents an overhead value, which captures indirect costs due to, e.g., energy distribution services or taxes: this is often a very significant part of the energy costs.The summation in Equation ( 19) is performed only on the tariffs owned by the provider.

Deterministic Model
The second variant of our model is a deterministic model for customers; representation and tariff choice: the model could be used to support the definition of tailored tariffs for public buildings or industrial customers.For the deterministic model, we calibrate different coefficients of elasticity and risk-aversion.Since our model consists of components, in this case, we simply disable the consumer perception accuracy component calibrated for residential users.
This deterministic tariff choice behavior could be modeled by formulating the KKT optimality conditions for a tariff selection subproblem.The greatest difficulty of a multi-tariff model is to correctly model user behavior.In fact, users choose their own tariff in order to minimize their energy costs, i.e., by solving an optimization problem whose objective function is in conflict with that of the energy provider.In this work, we modeled the user behavior by converting such an optimization problem into a constraint satisfaction problem by using the first-order necessary conditions that characterize the local minima, known as Karush-Kuhn-Tucker conditions.

Karush-Kuhn-Tucker Conditions
In the following subsection, we cast the tariff selection problem as a constraint satisfaction problem by means of the KKT conditions.See for instance [28] for details on KKT.The user tariff choice subproblem can be modeled for a single user κ k in the following way: we have variables y i that are one if tariff i is chosen and zero otherwise.
Constraints (21) impose the choice of a single tariff for each user; the y i of Constraints ( 22) are all positive binary variables; and the objective function (20) considers the choice of users based on the tariff with lower overall cost.This is an Integer Linear Programming (ILP) problem that models the choice of users tariff.Our aim is to use the KKT conditions to characterize the optimal solution to this problem.This approach requires the objective function and the constraints to be convex, so that the KKT conditions are both necessary and sufficient.ILP problems are not convex in general, which poses in principle a difficulty.
Luckily, in our case, it is possible to replace the original ILP problem with its LP (Linear Programming) relaxation: in fact, we can prove that the optimal LP solution is integer (in non-degenerate cases), and therefore equal to the optimal ILP solution.A proof of this result is provided in Appendix A.

Application of KKT Conditions to Our Model
As shown in the previous subsection, the KKT conditions represent necessary conditions to obtain a local optimum.Since LP problems are convex, the conditions become also sufficient to define a global optimum: hence, a problem solution exists, and it is optimal iff there are multipliers that satisfy the KKT conditions.Now, µ i is the multiplier associated with constraints y i ≥ 0, and ν is the multiplier associated with equality constraints; with these notations and with the Lagrangian function of the problem (µ i ≥ 0, ν ∈ R), the KKT conditions state that, if there exist y i , µ i and ν values such that: then the assignment of y i is an optimal solution for the original problem.It is possible to rewrite these conditions by eliminating µ i , and by taking into account all of the customer classes κ k , we can finally introduce the following constraints in our model: The deterministic version of the model has the same objective function of the stochastic version, which maximizes the provider profit.Both models presented above can be enriched with other constraints that model particular aspects (e.g., the DR behavior, the perception accuracy, the wholesale price), as shown in the following sections.

Experimental Results and Discussion
The model and its parameters can be adjusted to approximately match the market of different countries, regulations and market scenarios.Table 1 contains the list of all model parameters and the source of data that we used to obtain or estimate their value.The table is meant as a tool to simplify grounding the model on different scenarios and in different countries.Price for each band π j ∈ P Data from the main electricity companies (see https://www.enelservizioelettrico.it/it-IT/tariffe,parameter only for fixed tariffs).
Wholesale price coefficients µ 0 and µ 1 Data from GME (see http://www.mercatoelettrico.org/En/Default.aspx) in order to fit a correlation between hourly electricity price and consumption to derive the coefficients.
By having access to real data, it would be possible to derive more precise coefficients through empirical model learning [29].
User classification κ k ∈ C The data to define residential user classes is based on parameters from ISTAT (family information), and it is based on data from Confcommercio for the deterministic (industrial) case.
Perception accuracy parameters α and β k Data from the literature [23] and from analysis of the correlation between real and perceived user demand (the sigmoid function in which α determines the scale of the sigmoid, and β k controls the growth of the sigmoid).

Risk aversion coefficients of customers ρ
The coefficients have been estimated based on data from the literature [25,30].

Case Study: Italian Electricity Market
As a case study, we have used our approach to define a model of the Italian energy market.ToU-based tariffs in Italy are defined over three standard price bands, roughly corresponding to office hours, evenings-and-Saturdays and nights-and-Sundays.The total amount of hours for the three bands is |π 0 | = 2860, |π 1 | = 2132 and |π 2 | = 3768.The coefficients for the wholesale demand-price relation have been obtained based on data from the national energy market management corporation (see http://www.mercatoelettrico.org/En/Default.aspx,GME): in particular, we have µ 1 = ~1.39Ke/GWh 2 and µ 0 = 0.013 Ke/GWh.
There are no standard and well-accepted values for the risk aversion coefficients of customers.For this reason, in our model, the risk aversion coefficient ρ has been estimated based on data from [25,30], and it is equal to 0.95 for all customers.For the perception model, we have α = 400 and β k = 0.75 for all classes: intuitively, this means that an average consumption of 400 W on a price band is considered large and that customers tend to over-estimate demand variations (i.e., the real variation is typically smaller than expected).We model the relation using a different function (i.e., sigmoid), since the approach from [23] had poor predictive performance outside of the range considered in the original experiments.However, we took care of choosing the parameters of our sigmoid function to approximate the behavior observed in [23] on real data.
The coefficients of the cross-elasticity matrix have been defined based on previous cited literature [15] and data and parameters from the National Institute of Statistics (ISTAT) census: in particular, families with fewer members are assumed to be more flexible and more prone to change their net consumption in the case of price changes, i.e., to have a more significant loss factor.By having access to real individual data, it would in principle be possible to derive more precise cross-elasticity coefficients for the matrix through empirical model learning [29].We have differentiated the deterministic and stochastic cases by using different coefficients of the cross-elasticity matrix and the loss factor for each class of users.
For the residential stochastic model, we focus on residential energy consumption, which represents ~22% of the national energy demand from GME and the (Italian) National Transmission Network TERNA (available at http://www.terna.it/it-it/sistemaelettrico/statisticheeprevisioni/datistorici.aspx) data.The baseline consumption has been obtained by subtracting the residential consumption from the national consumption reported in the GME data.The non-residential consumption has a peak in π 0 , while residential consumption is more relevant in π 1 and π 2 .For the experiments, we consider five customer classes corresponding to families with varying number of members, namely 1 (single persons), 2 (couples), 3, 4 and 5 or more.The number of customers per class and their total consumption come from public data from the Italian national institute for statistics (available at http://dati-censimentopopolazione.istat.it,ISTAT).ISTAT data show the distribution of families, according to their number, on the total number of Italian families.The correlation between family size and annual consumption is calculated in [31] starting from the ISTAT census data.In this way, the GME annual residential consumption data were first distributed on the five macro classes according to the distribution of consumption in the three time slots.The subdivision of consumption for the different types of users is estimated based on the convenience of consumption displacement in the least expensive bands.Based on residential data from the Authority for Electricity, Gas and Water System (available at http://www.autorita.energia.it/allegati/seminari/141006.pdf), it is possible to observe that the distribution is more diversified in small families than in the more numerous families.Therefore, we have estimated the consumption distribution over the price bands based on public data, with larger families having flatter profiles.
For the deterministic model, we use data from the Italian Confederation of Enterprises, Professional Activities and Self-employment Confcommercio-REF estimates based on the Authorities for electricity gas and water system AEEGinvestigations data (available at http://www.confcommercio.it/documents/10180/4298586/ICET+n.+4-2014/).We consider five macro-users, which were obtained by aggregating the characteristics of consumption data from enterprises in Italy during one year (2014).The research identifies five types of activity profiles: hotel, restaurant, bar, food retail, non-food retail.The weights are estimated by Confcommercio and REF based on the distribution of the annual consumption of the five classes on total consumption.These weights are also applied to calculate the average consumption profile per time slot in relation to the electricity price in the same time slot.We calibrate also different coefficients of elasticity by using literature data and realistic data of consumption flexibility.The risk aversion coefficient corresponds always to a saving factor, but in this case, when it is reached, the consumer changes the rate in a deterministic way, rather than in a stochastic one.We do not use, in this case, the perception accuracy from residential model.The macro-users of the deterministic model have a total conservation of demand consumption (i.e., loss factor = 0%).
All of the customer consumption and elasticity parameters are summarized in Table 2 for the stochastic model and in Table 3 for the deterministic model.
The overhead electricity costs are assumed to be 250 Ke/GWh for all price bands, and they have been estimated based on data from the Authority for Electricity, Gas and Water System (available at http://www.autorita.energia.it/it/prezzi.htm).We consider two market scenarios in different parameter settings: in the first scenario, we assume that all customers start with a fixed tariff offered by a competitor utility.We distinguish two sub-cases for this competitor tariff in the residential stochastic model: in the flat rate sub-case, the price is 361 Ke/GWh (i.e., 0.361 e/kWh) for each band; the price is 375 Ke/GWh for band π 0 and 350 Ke/GWh for bands π 1 and π 2 in the two-price rate sub-case.For the deterministic model, we add a third case with a band price with price of 355 Ke/GWh for band π 0 , 350 Ke/GWh for band π 1 and 365 Ke/GWh for band π 2 .There is a single variable tariff with p i,j and p i,j respectively equal to 1/10 and twice the price of the fixed tariff.In the second scenario, the situation is identical, except that the initial tariff is now owned by the provider.
In both scenarios, our approach tries to define a new tariff that is beneficial for both the provider (because the profit is the problem objective) and the customers (so that they switch tariff).

Solver Setup
For solving our stochastic model, we used the SCIP solver for mixed integer programming (MIP) and mixed integer nonlinear programming (MINLP) (see http://scip.zib.de/)via the GAMS (see http://www.gams.com/)(Release 24.7.4) modeling system on the Neos server for optimization (available at http://www.neos-server.org/neos/),with a time limit of 2000 s.As detailed in Section 3.2.1,we assume that each customer in a group can switch tariff with a probability that depends on the savings, which are computed using a "max" operator: we found that the SCIP solver was well suited to deal with this type of piecewise linear function.For the experiments with the deterministic model, we used the BARON branch and bound non-linear, mixed integer global optimization solver (see http://www.minlp.com/)via the GAMS (same release) modeling system on the Neos server, since in this case, no "max" operator was employed in the model.It would be possible to use BARON also for the stochastic experiments by modeling the piecewise linear functions via Special Order Set constraints of type 2 (SOS-2) [32].We plan to run experiments with this alternative modeling approach as part of future research.

Analysis and Comparison of Previous Methods
Most of the discussion in this section is devoted to Scenario 1 for both models, since for Scenario 2, we currently have only a negative, but relevant, result.The results is negative in the sense that it seems that no equilibrium is possible under reasonable assignments of all of the parameters in our model.This result is consistent with other analyses of the Italian market independently performed by ENEL [33], the main Italian electricity company.The main reason for this lack of equilibrium points seems to be the weak, linear, correlation between the wholesale energy prices and the demand, which offers limited opportunities to exploit demand shifting.In this situation, competition (which is captured by Scenario 1) is the most reliable approach to yield benefits for the customers.We discuss and report in the next section the results on Scenario 1.
Our experimental evaluation is organized to assess what the effect of changing model parameters would be by testing the model in different scenarios.It is very difficult to compare our results with previous work because we consider a holistic model with many cognitive user aspects, multiple customers and multiple tariffs.In particular, we have some aspects of: (1) the elasticity model for comparison with [11,15], (2) the perception accuracy for comparison with [23] and (3) risk aversion for comparison with [25].All of these parts in our model were enriched and developed compared to previous works and were tuned based on real data by using fitting functions and data analysis.
There is little point comparing individual parts of our model with the corresponding related works for these reasons: a direct comparison with the approaches that offer models of perception or elasticity is not actually possible.The reason is that these works propose models, but did not use them to optimize prices.The only alternative would be to compare our model with other approaches that optimize prices.However, all works in this context are limited to modeling a single user, a single tariff and a very short time frame (24 h).In fact, the aim of these works is to compare the effectiveness of different patterns of DR mechanism; we instead restrict ourselves to a single DR mechanism (ToU prices), but we consider more aspects of the energy market.For these differences, applying one of the two approaches in the other context would not lead to significant results.

Experimental Results of the Stochastic Model
To the best of our knowledge, the data to calibrate some parts of the model (e.g., the elasticity coefficients) have never been adequately collected and analyzed.For this reason, we chose to: (1) obtain a first estimate of these coefficients and then (2) explore the trend of results by varying them.

Elasticity Factor
We solved the first scenario with our model by increasing and decreasing the elasticity factor by multiplying all terms of the matrix by a factor of 0.5 and 1.5.This modification increases the rate of demand shifts, and it causes a proportional growth of the loss factor (i.e., the sum of the coefficients on each column): as a result, more significant changes of the net energy consumption are likely to occur.In Table 4, it is possible to see the price trend by varying the elasticity coefficients, the corresponding fraction of users in each class that make the switch and the provider profit.The remaining customers maintain the original tariff with no demand response changes.The flat rate case presents an estimated provider profit higher than the two-price case (e.g., around 1.40 Me compared to around 1.30 Me of the two-rate case for = 1.0), with the savings a little less evenly spread among customer classes.It is interesting to observe that general improvements are possible by increasing elasticity; in particular, the profit is almost the same for epsilon = 0.5 and epsilon = 1.0 for both tariffs, but it increases for epsilon = 1.5, with the new tariff, which is more beneficial for larger families, in both tariff cases.Such general improvements are possible since the increased elasticity enables a reduction of the wholesale electricity price via demand shifting.We can also notice that, with the highest elasticity factor, the price in p 0 is quite reduced with respect to the other cases.The cause of this behavior could be that the original demand distribution presents a peak in p 2 , and residential customers are less prone to use electricity in p 0 (office hours).By increasing the elasticity factor, we increase the rate of demand shifts, and it causes a proportional growth of the loss factor.This leads to the need for more significant changes in optimal tariff prices to have a demand shift in the specific band (i.e., p 0 ) and to avoid the consumption loss for customers.We also show in Figure 5 the aggregate consumption shift among the bands and the distribution of consumption per band over the total aggregate residential consumption by increasing and decreasing the elasticity factor in the two-price rate (the most common in the Italian market).We can see a local, but interesting peak of consumption in the third band.By increasing , we can notice a redistribution of residential aggregate loads, but we have to consider that, in the residential model, users decide to change tariff by loosing a certain quantity of consumption (see Table 2) to obtain lower prices.

Overhead Costs
Since several parameters of our model have been extrapolated from data, it is reasonable (and very interesting) to wonder what the effect of changing such parameters would be.Therefore, we have tried to investigate the effect of changing the value of the fixed overhead costs.
The value of the overhead o j is a major component of the electricity cost for the provider, and it can have a strong impact on the profit margin.We have changed the fixed overhead costs from 250 Ke/GWh (see Section 3.6) down to 100 and up to 340.The results of this evaluation are reported in Table 5, which shows the overhead value (in Ke/GWh), the prices of the optimized new tariff (in Ke/GWh), the percentage of switching customers for each class and the provider profit.When the overhead is low, the profit margin is very high, and it is possible to lower the prices to the point that the new tariff is competitive for all customer classes.As the overhead grows, attracting customers becomes increasingly difficult (see the fraction of switching customers), and the optimal prices become less convenient for customers.For large overhead (i.e., 340 Ke/GWh), there is no economic advantage in attracting customers to the new tariff.The provider profit is higher in the case of the flat rate.We have also investigated the effect of changing the perception accuracy parameters by repeating our experiments with lower overhead costs, i.e., 220 and 100 Ke/GWh.In particular, besides the initial setup with β k = 0.75, we have performed experiments with β k = 1.0 (i.e., a quite accurate perception, at the relevant range) and β k = 1.25 (i.e., bias toward underestimated variations) for both tariffs.The results are reported in Table 6.Apparently, customers that are less prone to overestimation are more difficult to manage for an energy provider, either because they are better capable of exploiting prices (due to accurate perception) or they are likely to cause wholesale price increases (due to their underestimated variations): to obtain tariffs that are beneficial for both the provider and the customers, the provider has to lower the prices in the first band and to increase them in the third one (where the peak is present) to find an economically favorable tariff with an increase of profit.The trend of obtaining higher profits by lowering overhead costs is respected, and we can notice another trend of obtaining higher profits by growing the underestimated variations of user consumption.Finally, to underline the contribution of cognitive user aspects, we performed a test by considering changes of the customer elasticity factor in relation to the accuracy of their perceived consumption.We show the results in Table 7. Differently from [14], which only considers customer elasticity and load consumption, we show that perception accuracy can significantly affect the demand response model.The general result of [14] is a lower provider profit for more elastic customers, and on the other hand, more inelastic customers tolerate price increases without reducing considerably the consumption, thus generating higher profits.In our work, we also consider the perception accuracy of consumption for each customer, and we can observe different tradeoffs.In particular, we have interesting and different trends by increasing β k : for higher values of β, we can observe an increase of provider profit and a higher percentage switch of more elastic customers.This is due to user capacity to better exploit prices (for accurate perception β k = 1.0) and to their underestimated variations (for β k = 1.25).The increase of β k influences the flexibility to shift consumption.With factor = 0.5, the change in perception accuracy has no effect on profit in both tariff cases.This is because the less elasticity does not allow consumption shifts that make it interesting to move towards a new tariff for users.Moreover, by increasing , consumers are more prone to switch to a new competitive tariff, and this causes a general increase of provider profit.We can observe that the contribution of perception accuracy is very important to define a relation between customer elasticity and provider profit with higher profits for higher values of β k .From this perspective, awareness tools for users on energy consumption can have significant potential to change behavior on energy usage with a reduction of energy consumption which could be achieved through the implementation of this measure.

Experimental Results of the Deterministic Model
We focused on the first scenario, and we have investigated the effect of changing the elasticity factor and the value of the fixed overhead costs from 250 Ke/GWh (see Section 3.6) down to 100 and up to 340.We consider also a third tariff case (referred to as the band rate), which is a close match for tariffs employed for industrial electricity contracts in the Italian market.Optimal prices for flat rate, two-price rate and band rate are reported in Table 8, which shows also the user switch to the new optimal tariff (i.e., y k k ,i = 1.0 if the user k switches to the new tariff).The most interesting case is the experiment with large overheads (i.e., 280 and 340): there is no economic advantage in attracting all customers to the new tariff.In these cases, we can also see a relation between users that remain in the competitor tariff and their self-elasticity (i.e., the amount of consumption to distribute among the other bands).
For the elasticity factor, it is important to underline that we consider a loss factor of 0% for all users (i.e., we have only a shift of total consumption among the bands without a loss as in the residential model).We show in Table 9 the new optimal prices by changing the elasticity factor .We do not report the value of (y k k ,i ) for user tariff switch because in the considered case (i.e., with o j = 250), the new optimal tariff attracts all of the users.
To underline the importance of the elasticity factor, we also show in Figure 6 the shift of aggregate consumption among the bands by changing with the two-price rate (the most common rate in the Italian market).With = 0.5, there is a very small change in the distribution of consumption among the bands.The consumption shifts grow proportionally with the growth of the elasticity factor as expected.It is interesting to notice that the industrial consumption peak is located in the first band, and it decreases with larger elasticity.In this deterministic case, we assume implicitly that consumers are more rational and that they shift their consumption if they have economic benefits.its validation stage, a prototype of the platform had been used by more than 200 users, including 34 energy providers and 13 policy makers.
The DAREED platform included (A working prototype is still running and available at the moment of writing this paper, but it may be discontinued in the following months.The prototype can be accessed at: http://demo.dareed.eu)three tools that were based on our model: two of them were addressed to energy providers and one to local policy makers.In detail, energy providers had access to:

•
A tool for suggesting tariffs for districts, which could provide price recommendation for ToU-based tariffs, via the stochastic version of our optimization model.

•
A similar tool for suggesting tariffs for buildings, which could be used to define tailored tariffs for large electricity consumers and was based on the deterministic version of our model.
Policy makers could instead access a tool for identifying the optimal values of the behavioral parameters of citizens in a district, i.e., their cross-elasticity matrix, their perception accuracy and their risk aversion.In this latter case, our model was optimized over fixed prices, and the decision variables were the i,h , β k , ρ k parameters.
For a whole description of the three decision support tools, we refer to Deliverable 5.3 (http://www.dareed.eu/251).In the remainder of this section, we focus on the first tool (i.e., obtaining tariff recommendations at district level), and we discuss how it has been used to obtain valuable results in the context of the project.
From the perspective of our model, providing this kind of recommendation required obtaining information about: (1) the available prices bands, (2) yearly consumption over the considered district, (3) behavioral parameters for all customer classes and (4) prices for pre-existing tariffs.The definition of price bands is usually subject to national regulations, and the DAREED platform supported a sample of the existing ones in Italy, England and Spain.All decision support systems were connected with a hub for collecting real-time electricity monitoring data, which was integrated with statistical considerations to estimate consumption figures for all customer classes in a district.The platform also featured a market place section to exchange requests and offers between citizens, energy providers and policy makers: this market place represented an excellent source of information to obtain a proper configuration of the customer elasticity, perception accuracy and risk aversion parameters.Finally, prices for the existing tariffs had to be specified manually by the user.Once all relevant information had been obtained, the decision support tool would solve our optimization model and provide solutions.The user could then inspect the outcomes, which contained the price recommendations for the new tariff, an indication of whether the tariff was attractive enough for the customers and an estimate of how the users' energy demand was likely to shift due to the new prices.
The described tool has been employed in the final stage of the project by staff at ENEL [34] to perform a case study and assess how to design an attractive tariff for an Italian town that was one of the project pilots.More in detail, in the period between 1 January 2017 and 30 June 2018, twenty million Italian households and small businesses were required to switch their electricity tariff, as the last stage of a market liberalization process that spanned multiple years.This massive transition represented a huge opportunity for energy providers, but also one that was very difficult to exploit, since competition and taxes had progressively cut the profit margin.In this context, a model such as the one we have presented could provide a significant advantage.
Specifically, project participants from ENEL employed the decision support tool that we have described to obtain tariff recommendations for the municipality of Lizzanello, in southern Italy.The use of the tool allowed them to understand how to define the prices so as to beat the most representative tariffs offered by competitors and to assess the share of new customers that were likely to make switch: in this case, from 22% to 75%, depending on how much profit they were willing to sacrifice in order to obtain new customers.Even in the lowest-prices, largest-number-of-customers scenario (i.e., the 75% switch), the estimated profit per customer was of 75 e/year: a small budget, but enough to support marketing efforts for (more profitable) added value services.

Conclusions
In this work, we have devised a non-linear optimization model for optimizing ToU-based tariffs for electricity.We have developed two versions of our model (i.e., stochastic and deterministic) with different application fields.Overall, our model is rather comprehensive and takes into account: (1) the presence of multiple tariffs and (most importantly) competitors, (2) the demand response behavior of the customers, (3) the effect of demand shifts on the wholesale energy price and, finally, (4) cognitive aspects of the customers (in particular, their risk aversion and the accuracy of their consumption estimates).The problem objective is to maximize the provider profit.
We have modified our model for two additional and relevant use cases.First, the deterministic model could be used to support the definition of tailored tariffs for public buildings or large industrial customers.A second use case consists of employing the model to obtain recommendations about changes in the customer behavior parameters (e.g., elasticity, perception accuracy).This alternative use case may be particularly appealing for policy makers to devise incentive schemes or awareness campaigns to increase the perception accuracy about consumption.
From our results of the residential stochastic model, we notice a strong relation between perception accuracy and consumption shifts.Thus, the contribution of perception accuracy is very important to define a relation between customer elasticity and provider profit.Awareness tools on energy consumption have significant potential to change behavior on energy usage.Moreover, the elasticity factor is an important parameter to obtain peak reductions by distributing the user consumption among the bands to have economic benefits.We have also tested the optimization model in a real setting in the context of the FP7 DAREED project, where the model has been employed to provide tariff recommendations or to help the identification of goals for local policies.
We are improving some components in our model.In particular, our perception model could be made more flexible and validated on real data.The elastic model that we employ for demand shifting could be augmented to take into account limits to the maximal acceptable variation or to take into account the comfort loss/gain due to changes in the net energy consumption.We are also considering the possibility to split the yearly consumption into multiple months, which would allow one to model different types of tariffs and to (partially) take into account weather conditions.We are confident that we could provide support for a wider range of tariff schemes (e.g., discounted rates).

Figure 1 .
Figure 1.Location of this work in the current state of the art.

Figure 3 .
Figure 3. Interpretation of the cross-elasticity matrix.

Figure 5 .
Figure 5. Aggregate consumption among the tariff bands before the switch (left) and after the switch to the new optimized tariff (two-price rate) with respectively = 1.0, = 0.5 and = 1.5.

Table 2 .
Values of all customer-related parameters for the stochastic model.

Table 3 .
Values of all customer-related parameters for the deterministic model.

Table 4 .
Effect of changing the elasticity coefficients.

Table 5 .
Effect of changing the fixed overhead costs.

Table 6 .
Effect of changing the perception accuracy parameters and the overhead costs.

Table 7 .
Effect of changing the perception accuracy parameters and the elasticity factor.