In 2014, to achieve targets set by the 2030 framework for climate and energy, the European Union committed to increase the share of energy efficiency and renewable energies to 27% of gross energy consumption . Increasing number of renewable energy sources (RES) such as wind and solar positively contributes to the reduction of the carbon footprint of electricity generation. However, the high level of uncertainty and variability associated with the output of RES generators poses serious challenges to the operation of the power system. The California Independent System Operator (CAISO) in 2013, analyzed the projected net load from 2012 to 2030. Net load is defined as the load served by the electric power system minus load served by variable generation. From the results, it was concluded that load dropped midday and quickly ramped to a late-day peak. It was also found that these ramps get more severe each year . A follow-up report by ScottMadden (2016)  found that net load ramps are steeper and occur frequently in regions that have a high penetration of RES.
To reliably operate in an electricity distribution grid with a high penetration of RES, system operators and market participants need flexible resources that provide the functionalities of storing energy or modifying use and reacting quickly to satisfy operational requirements. Flexibility is defined as the ability of a power system to modify the generation and/or consumption patterns in reaction to an external signal . Sources of flexibility range from flexibility in supply, flexibility in consumption and flexibility in energy production. For example, combined heat and power plants can be ramped up/down from 1 MW to 10 MW within 15 minutes to satisfy consumer demand . Another option for flexibility in supply is that of hydro-electricity where by controlling the flow of water through impoundments or reservoirs, fast power ramping capability can be provided for increasing the ease of operation of power systems with a high integration of renewable generators such as solar and wind . Through demand-side management consumers can adapt their electricity needs within certain limits with respect to time and quantity. This can be facilitated through indirect means where a consumer can be incentivized for relaxing their comforts. Alternatively, a utility can also be aware of the consumers degree of flexibility and directly control their resources. Additionally, the storage of energy and its provision is an ideal source of flexibility for providing ancillary services to the grid or for addressing price volatility . Energy storage impacts both the supply and demand side of the electric grid and causes a change in balance over time. Example of energy storage can range from individual solar and integrated storage prosumers to large scale industrial storage applications.
Summarizing, flexibility is defined as the capacity of a power system to adapt to the inherent variability in supply and the uncertainty of demand. A schematic view of flexibility options with respect to residual load duration curves is presented in Figure 2. Residual Load Duration Curves refer to the difference in hourly electricity demand and feed-in of renewable energy in decreasing order. This curve is characterized by regions of low capacity which means that it is possible that most renewable energy technologies are not available during periods of high demand, reduced full-load hours where renewable energy decreases the full-load operation hours of conventional power plants by reducing residual load and periods of overgeneration where the output of renewable energy is higher than the power demanded. Depending on the scenario, either downward or upward flexibility options can be availed, ranging from grid imports/exports to demand-side management or converting power to different forms of energy .
Quantifying Energy Flexibility:
While, energy flexibility is required for facilitating a transition to a greener future, metrics are required for estimating its adequacy in the system. Flexibility can be quantified across varying time scales from the operational scale to planning as well as in the spatial domain from a community to national scales.
Operational flexibility can be characterized based on power provision capacity (MW), power ramp-rate capacity (MW/Min), energy provision capacity ε (MWh) and ramp duration (min). Based on the specific scenario, upward or downward flexibility can be provided through the supply of power to the grid or consuming power from the grid respectively. The ramp rate duration δ is dependent on power ramp rate ρ and power capacity Π as δ = Π/ρ. Given the relation, the quantification of flexibility can be done in the power-related metrics which are related to each other through inter-temporal constraints. This relation can be visualized in Figure 3. where the nominal and actual operation of the power system is compared with respect to the flexibility metrics while providing either upward or downward flexibility.
Visually, we can assume that flexibility is modeled in the form of a Power Node which provides a modeling framework for characterizing diverse storage (fly-wheels, pumped hydro), generation (wind turbines) and Load (controllable or non-controllable) units. In Figure 4. the energy provided or demanded are lumped into an external process termed as ξ.
The term ξ < 0 indicates energy being consumed while a value of ξ > 0 is energy being supplied. Power generation is denoted by ugen and has a conversion efficiency of ηgen and similarly uload is the power consumption with efficiency ηload. Storages are modeled using state-of-charge which is normalized between 0 ≤ x ≤ 1 with energy storage capacity C ≥ 0. Internal storage losses are comprised within the parameter v(x) ≥ 0 while waste terms such as spilled energy w > 0 and unserved load w < 0 is also represented .
In , flexibility metrics is used for quantifying the dynamic response of a building’s thermal energy system in terms of energy (available storage capacity, storage efficiency) and power (power shifting capability) while responding to costs in the day-ahead markets. The quantification of energy flexibility is also the topic in  where the dynamic nature of flexibility is investigated using a flexibility function which describes the extent to which a building is able to respond to the grids need for flexibility. The flexibility function describes transients in the power system operation and hence is able to capture the non-steady state behavior of energy flexibility. Concepts such as impulse response functions, step response functions, frequency response and transfer function to describe flexibility in frequency or time domains is made possible through a linear version of the flexibility function. A flexibility index is derived from the flexibility function which is used for quantifying the response of a building or a cluster of buildings to external signals such as real-time carbon emissions, real time pricing or determining the energy efficiency of the building. Flexibility can also be acquired from electric vehicles and its quantification is the subject of . Characterization of the flexibility is performed using a data-driven approach in which EV charging behavior is clustered based on arrival, departure and idle times and the influence of the day of the week on the charging session is investigated. Flexibility is quantified in terms of duration and amount of energy used at different times of the day, providing better insights into the development of more realistic price and incentive signals.
Additional to flexibility metrics with respect to time, is the quantification of flexibility with respect to location in the electric grid. In  locational flexibility is defined based on grid location and current network utilization. To account for locational flexibility re-dispatching measures such as deployment of reserves, demand-side participation and changes in network topology is required. The flexibility polytope which can be constructed based on the flexibility metrics should be sized such that it is successful in encapsulating the uncertainties from renewable energy sources.
Planning of flexibility is a concomitant to operational flexibility, and as proposed in  can be considered in four stages. Level 1 involves analysis of requirements for flexibility and for determining the load ramping due to demand, wind and solar generation. Level 2 involves analysis of the characteristics of flexibility such as operating range of resources, distributions of start-up times and ramp rates. The analysis of flexibility available from resources once dispatched in the time domain is considered in Level 3. Finally, Level 4 extends Level 3 by estimating flexibility at the locational scale by considering network constraints and planning for network capacity.
Role of Flexibility in Electricity Markets:
Energy flexibility provides services to a different electricity markets, and its provision is governed by interested stakeholders. The Transmission System Operator (who is responsible for the operation of the transmission network), the Distribution System Operator (responsible for the operation of the distribution network), Balance Responsible Party (market entity responsible for addressing imbalances in markets and paying penalties for any deviation from planned schedule), Aggregator (intermediary between smaller consumers and markets, and who provides flexibility services to the system operators and balancing parties) and retailer (commercial entity procuring electricity from the market or balancing party) are the main stakeholders involved in flexibility markets. Given the diversity of stakeholders and their objectives, different flexibility products can be identified in electricity markets:
- Balancing flexibility at the transmission grid: Flexibility is provided to the Transmission System Operator (TSO) for balancing energy in their network. This generally involves ramping capacity of generators as a product.
- Balancing flexibility at the distribution grid: These include flexibility services that can be provided by distributed energy resources (DER) owners to the Distribution System Operator (DSO) for balancing energy at the distribution grid. In order to avail this services coordination is required between the TSO and DSO.
- Flexibility for the distribution grid: These include more specialized services that can be provided by DER owners for voltage regulation, congestion management and loss reduction.
Developments related to flexibility markets need to consider different attributes when providing these services. These attributes relate to: time-scale of the product (short-term ramps or long-term capacity), provider type (conventional generation or distributed generation), target consumer (TSO or DSO), quantifying flexibility and identifying end use, scale of market (global or local markets), and coordination requirements between TSO, DSO and other entities, market operation periods and time-scales at which flexibility can be provided. A major challenge that faces the design of flexibility markets is that of simultaneously serving the requirements of both the TSO and DSO and guaranteeing a certain return on investment for market players . In response, the SmartNet project  presents different schemes based on the coordination between TSO, DSO and aggregator for interaction in flexibility services markets. The choice of coordination scheme results in a trade-off in the flexibility markets for providing services either for frequency or voltage control while balancing the markets and addressing congestion issues are addressed completely under each scheme.
Furthermore, the large-scale integration of renewables in countries such as the Netherlands, has an impact on the operation and the prices of the day-ahead and intra-day electricity markets. Flexibility services are required to account for the variability of generation and forecast uncertainties can be provided by an entity such as the aggregator. The aggregator plays an important role in addressing issues of high price volatility  and in  it is shown how the aggregator by using an energy storage system can provide a measure of physical hedging against the rapid price fluctuations.
Future of Flexibility:
Flexibility of a power system provides the means for accommodating a large-scale integration of renewables to the grid, thereby contributing to the energy transition. This flexibility is in turn dependent on how the system develops over time with respect to the resources and policies in place. Generation mix is important criteria to consider as some generators are more responsive and hence more flexible than others. The grid infrastructure facilitates increased access to system flexibility and hence policies are required for its increased development. Additionally, increase in demand flexibility is critical as having a higher presence of price responsive load will ensure that energy is consumed when it is cheaper to buy and when the grid is uncongested. Electricity storage is key for balancing demand and supply across different time-scales. The cost of storage is decreasing, and storage has the ability of providing multiple services at the same time. Sizing of energy storage requires consideration at high temporal and spatial resolution in terms of positioning in the network. To increase flexibility in the long-term, coupling energy demand for heat, fuels and mobility by using power-to-heat (heat pumps) power-to-gas (hydrogen from renewable electricity) and power-to-mobility (Electric Vehicles) can be considered for providing significant flexibility to the power system while promoting decarbonization .
Hence, flexibility provides various benefits for the technical and economical operation of the power system and hence better awareness of its quantification, coordination and future is gaining widespread attention.