**1. Introduction**

Scarcity of fossil fuels, oil price fluctuations, and increased awareness of the negative impacts caused by anthropogenic climate change have led to an increasing use of variable renewable energy (VRE) sources. With the agreed goal of limiting anthropogenic global warming to well below 2 degrees Celsius, this trend is expected to continue and even accelerate. While hydropower and biomass are, in their operational behavior comparable to conventional power plants, the power generation of photovoltaic and wind systems is variable, and generation prediction challenging and subject to uncertainty. Introducing flexibility products to the power system is one measure to cope with this variability and uncertainty.

Ma et al. define flexibility as the "the ability of a power system to cope with variability and uncertainty in both generation and demand, while maintaining a satisfactory level of reliability at a reasonable cost, over different time horizons" [1]. While this definition describes the general characteristic of flexibility, the Union of the Electricity Industry—Eurelectric—defines flexibility in a more application-oriented way, as "the modification of generation injection and/or consumption patterns in reaction to an external signal (price signal or activation) in order to provide a service within the energy system. The parameters used to characterize flexibility include the amount of power modulation, the duration, the rate of change, the response time, the location, etc." [2].

Nowadays, large-scale flexibility products with a capacity greater than 1 MW are widely used to stabilize grid frequency. On the supply side, system operators (SO) use measures such as redispatch and feed-in management. On the demand side, they use sheddable loads and industrial demand-side-management as grid ancillary services [3–5]. While regulation and various market designs for energy trading already exist, academic and industrial research now focus on introducing unique flexibility platforms [6]. Such new platforms will allow residential consumers and prosumers to participate with their distributed energy resources (DER)—such as combined-heat-and-power units (CHP), electric vehicles (EV), residential heat pumps (HP), photovoltaic systems (PV), and battery storage units—as well as large industrial parties to offer flexibility [7–9]. In the future, SO will be able to manage grid congestions in a less resource-intensive manner and potentially avoid costly grid expansions and the curtailment of VRE [10,11]. Such flexibility platforms differ from existing energy market mechanisms in that they trade power instead of energy. SOs place their flexibility demand on the platform and are matched with residential and industrial flexibility providers.

Flexibility can be both negative and positive. Negative flexibility refers to the delay of grid feed-in or the consumption of non-scheduled energy. Positive flexibility is the delay of grid energy consumption or the non-scheduled grid feed-in.

Home energy management systems (HEMS) can quantify, price, and offer flexibility from private DER to such platforms and re-schedule devices based on the platform response. Beaudin et al. conclude that an HEMS is a demand response tool with the goal of optimizing consumption and production profiles in a house that communicates with household devices, utilities, and forecasting service provider [12]. The most important components of such a system required for calculating flexibility offers are visualized in Figure 1.

**Figure 1.** Generalized structure of an HEMS. Historical and forecast data refers to weather data, historical consumption and production data and expected energy prices.

A review of HEMS concluded that cost optimization is the most frequently implemented objective function [12]. Yan et al. state that price-driven demand response is an important demand response measure [13]. Therefore, the type and structure of the electricity price signal is of crucial importance for the optimization problems of HEMSs.

Eurelectric differentiates fixed-priced offers and various types of dynamic pricing [14]. Nowadays, the majority of residents in the US, for example, have a fixed-priced electricity tariff [15]. Besides fixed-priced offers, utilities offer different types of dynamic pricing: time-of-use (ToU), real-time pricing (RTP), and others, such as critical peak pricing (CPP). ToU tariffs offer static pricing schemes with pre-defined prices for specified periods and seasons. As such, ToU tariffs are easy to follow for any customer, however, for the SO they run the risk of creating demand peaks of higher magnitude than the ones caused by fixed-priced offers [13]. In RTP, prices vary over short periods and are communicated to customers one day or less in advance. California was one of the first states to introduce RTP, in 1985 [16]. Nowadays, only a few RTP programs, such as ComEd's Hourly Pricing, exist because they are technically difficult to implement and hard for customers to understand. A lot of studies have investigated the impact of different electricity tariffs on the peak demand of a distribution grid and concluded that simple ToU strategies can lead to increased peak demand [17,18]. However, the literature rarely discusses the impact of different electricity tariffs on flexibility.

Zade et al. published an HEMS model that optimizes the charging process of an electric vehicle (EV), and calculates the flexibility based on synthetic electricity prices, vehicle availabilities, and energy demands [9]. In order to analyze the realistic flexibility potential of EVs in a distribution grid, this paper describes a detailed case study conducted with vehicle field trial data from California, USA and Germany, three electricity tariffs, two controller strategies, and three charging power levels.
