# Clustering of consumers based on their demand elasticity

**21 Clustering of consumers based on their demand elasticity **

**21.1 Rationale & Link to BEYOND Apps**

The demand elasticities of portfolio customers can provide useful insights of the demand-price relationship that depict the customers’ consuming habits according to prices. For a retailer, the clustering of customers into groups of similar elasticity levels, can contribute to defining pricing schemes dedicated to each group’s consuming behavior. The customers are clustered into three different groups of high, medium and low elasticity, meaning that customers that belong i.e. to the cluster of low elasticity, are less possible to alter their consumption based on prices. Various pricing strategies will be proposed to the retailer by the BPMO tool based on the elasticities of each customer group of his portfolio. However, one will be chosen for each group and will be available for the PEASH tool to retrieve it and take it into consideration in load shifting activities.

**21.2 Overview of relevant implementations**

Customer segmentation techniques are mainly applied in the formulation of prices in demand response programs to achieve a more targeted scheme to customers with similar characteristics. Most commonly, customers are clustered based on their load profiles from smart meter data (i.e. with Finite Mixture models [1]), on consumption along certain periods of time when specific tariffs were applied with the use of KMeans clustering [2] or on mean daily shifting loads by using Fuzzy C-means clustering [3]. In addition, there were attempts to include the responsiveness of customers to price variations in customer segmentation by considering survey data and device-level elasticities over groups of customers in order to define proper incentives for each customer cluster [4].

**21.3 Implementation in BEYOND**

For the implementation in BEYOND the clustering is performed over the customer related elasticities that have been already calculated with OLS method and stored in the local storage component of the BPMO tool. For each customer, a representative from these results is chosen. The algorithm used for clustering is KMeans, with k set to 3 because of the three distinct classes of high, low and medium elasticity levels. In general, what we expect is that a bigger slope of the regression line, indicates that a customer is more elastic in price changes in contrast to those with smaller, who do not tend to alter their consumption pattern based on prices. Those customers that are somewhere in-between are expected to be clustered as “medium elasticity level” customers.

**21.3.1. Data inputs and Analytics Pipeline (incl. assumptions /limitations)**

Input of the KMeans algorithm are the slope and intercept of the Ordinary Least Squares results applied on the demand-price pairs for each group of measurements of the same hour (0 to 23), type of day (weekday or weekend) and season (winter/summer/spring-autumn). Then, a pair of slope-intercept is chosen for each customer. In case the pairs are identical between each distinct set of hour-type of day-season, since the same pricing scheme was applied in all hours, then only one entry of price elasticities is enough to represent the customer for the clustering procedure. Otherwise, a representative between all possible sets has to be found, so as to allow the customer to participate in the process. When the labels are defined, they are sorted by their centroid values, from maximum to minimum slope (the first feature) and customers that belong in each cluster are assigned to each class (“high”, “medium”, “low”). The customers’ ids along with their cluster label are finally kept in the BPMO’s storage for statistical visualizations and as useful information for the definition of a retailer’s portfolio pricing strategies.

**21.3.2. Analytics Libraries Employed**

The python libraries used for data manipulation and data analytics are:

- Pandas

- Numpy

- Sklearn

**References**

[1] Haben, S., Singleton, C., & Grindrod, P. (2016). Analysis and clustering of residential customers energy behavioral demand using smart meter data. IEEE Transactions on Smart Grid, 7, 136–144

[2] Menga F., Mab Q., Liub Z., Zeng X.(2021). Multiple Dynamic Pricing for Demand Response with Adaptive Clustering-based Customer Segmentation in Smart Grids

[3] Chrysopoulos, A., & Mitkas, P. (2017). Customized time-of-use pricing for small-scale consumers using multi-objective particle swarm optimization. Advances in Building Energy Research, (pp. 1–23).

[4] Asadinejad, A., Varzaneh, M. G., Tomsovic, K., Chen, C.-f., & Sawhney, R. (2016). Residential customers elasticity estimation and clustering based on their contribution at incentive-based demand response. In Power and Energy Society General Meeting (PESGM), 2016 (pp. 1–5) IEEE

Back to BEYOND_Baseline_Analytics