Quantifying the Demand Response Potential of Inherent Energy Storages in Production Systems

: The increasing share of volatile, renewable energy sources rises the demand for consumers who can shift their electrical power demand in time. In theory, the industrial sector o ﬀ ers great potential here, as it accounts for a large proportion of electricity demand. However, the heterogeneous structure of facilities in factories and the concerns of operators regarding data security and process control often prevent the implementation of demand side management measures in this sector. In order to counteract these obstacles, this paper presents a general mathematical framework for modelling and evaluating di ﬀ erent types of inherent energy storages (IES) which typically can be found in industrial production systems. The method can be used to calculate the ﬂexibility potential of the IES in a factory with focus on hysteresis-controlled devices and make the potential visible and usable for power grid stabilization. The method is applied in a typical production line from metalworking industry to provide live monitoring of the current ﬂexibility potential of selected devices.


Introduction
The energy system in Germany and many other countries of the world is currently in a state of transition. In the past, electricity systems were centrally managed with conventional base load-capable power plants only. These generated electricity at high voltage level according to the consumer's requirements. Renewable power plants instead often feed in decentral at lower voltage levels and their generation capacities depend on the seasons and daily changing weather. The increasing usage of regenerative energy sources in Germany requires a comprehensive system redesign [1,2]. In order to maintain future grid stability at acceptable costs it will be necessary for more consumers to shift their electric loads in time [3,4]. Especially the industrial sector can make a large contribution to demand response (DR), as it accounts for 45.7% of Germanys electricity demand [5].
The active participation of industrial consumers to DR requires knowledge of the actual flexibility of the electrical power demand. However the current electricity market design has few incentives especially for smaller organizations to motivate the companies for providing systemically useful load management measures [6,7]. There are currently various efforts to change this, as shown, for example, by the activities to transform the European electricity market. These explicitly take into account the simplification of market access for flexible electricity consumers, but the transformation process is not yet complete [8]. In addition, factories have a highly heterogeneous plant structure due to their specialization on different industry branches. This leads to the fact that many companies do not have precise knowledge of the existing flexibility potential in their processes and therefore cannot participate Energies 2020, 13 in DR. However, the heterogeneity of machines and devices in industrial processes is only at first glance an obstacle for flexible electrical energy demand. A closer analysis often reveals that many processes are very similar in the mathematical characteristics which define their flexibility potential. There are different approaches to group flexibilities into categories in order to make solutions that have been developed for a specific plant transferable to other plants [3,[9][10][11]. For example, in [10] flexible load is distinguished into three categories-"Buckets", which can be described as energy storages with defined capacity limits, "Batteries" which have the additional restriction that they must be fully charged at a certain time and "Bakeries", where the device that charges the energy storage must remain switched on for a defined time span. Based on these considerations, this paper analyzes inherent energy storages (IES). IES are another category of energy storage-like flexibilities that are very common in industrial processes. Examples for IES in production systems are electrical heated tanks of a cleaning machine, the cooling system of a machine tool or the air-conditioning system of a production hall. They all have inherent storage capacities that make it possible to decouple the devices' electricity consumption from the use of the form of energy required. According to [12] IES are using the tolerances of different state variables in a process to store energy. The additional restriction in making the operation of these devices more flexible is that the useful energy demand of the production process must always be covered. This paper presents a mathematical model to calculate the flexibility potential of inherent energy storages with classical key indicators known from the energy markets. Furthermore, a method is presented how the flexibility potential of the devices can be extracted from measured data of the electrical energy demand or state variables.
The paper is structured as follows: first an overview of current research in the field of industrial demand response and the use of inherent energy storages in other sectors is given. Afterwards the developed modelling method for IES is described in Section 2. Using examples, the energetic formulas to describe IES are developed and the basics for the calculation of an IES' flexibility potential are explained. It is shown how to calculate the reference load profile and different flexible load profiles depending on the method by which the flexibility measure is activated. In Section 3 the developed method is applied in a case study on two machines in the ETA research factory of the Technical University of Darmstadt, where data from a typical metalworking production line can be used for testing the method regarding its practical applicability. The last chapter discusses the results and gives an outlook to further research.

Related Work
Current research on DR in the industrial sector is focused on specific high energy consuming processes for example paper production [13], steel plants [14,15], chemical industry [16] or cement plants [17,18]. The industrial sectors of paper production, basic chemicals, metal production and stone and earth processing together account for 65% of the energy demand in Germany. An analysis of these sectors therefore covers in principle a large share of the energy demand [19]. However, the analyses are usually process-specific and not easily transferable to other industries. An overview of current research activities, especially in the area of potential analysis of the industrial sector as a whole, is provided for example by [20] and [21].
In contrast to the lack of transferrable approaches in the industrial sector, methods and technical solutions to qualify inherent storage capacities for DR in the private sector is a much-debated research field. Especially using the thermal inertia of thermostatically controlled loads (TCLs) like refrigerators or electrical boilers is often discussed and analysed mathematically: In Conte et al. a simulation shows how the coordinated control of refrigerators in combination with water heating systems can compensate the frequency fall-off after the blackout of a large-scale power plant in Sardinia [22]. In [23] the authors are using three different approaches to control a pooled system containing 900,000 individual fridges and freezers. The data was based on estimations for households in Canada. In [24] an algorithm is presented to optimize a large amount of thermostatically controlled devices in household Energies 2020, 13, 4161 3 of 22 by communicating through a central instance and thereby aggregating the devices to a distributed virtual energy storage system. Furthermore the usage of heating, ventilation and air conditioning (HVAC) systems of buildings for DR is often mentioned in literature: In [25] the usage of 1000 air handling units as primary operating reserve and their benefit to the power grid stability is simulated. The authors in [26] investigate the extent to which concrete core activation can increase the inherent energy storage capacity of different building types and how it can be used for electrical load transfer. In [27] the flexibility potential of inherent energy storages, called "non electrical energy storages", is analyzed in private households. These considerations are also transferable to industrial processes.
The approaches from the private sector to retrieve the flexibility potential of IES and especially hysteresis controlled systems can be divided into two main categories: direct load control (DLC) on the one hand, where the device is switched remotely by the instance requesting the flexibility. On the other hand, there are approaches in which the hysteresis limits of the devices are adapted to a certain signal [23]. Studies from this field show, that if controlled by a central instance a large pool of thermostatically controlled loads can follow any desired load signal and thereby can participate in DR just as well as optimized high energy consuming processes [28].
The aim of this paper is to close the gap between research activities in the industrial and private sector in order to make the inherent storage capacities of different production processes usable for the electricity grid. The presented methods provide a general framework for the evaluation of the flexibility potential of IES in production systems, in particular with focus on hysteresis-controlled devices.

Modelling of IES
Inherent energy storages consist of a storage capacity and an energy converter which converts electrical energy into the desired energy form or the type of energy carrier that is required by the production process. Examples for required energy forms are thermal energy in heating and cooling processes or mechanical energy of conveyor systems, which remove waste materials from production machines. Typical energy carriers are compressed air in pneumatic supply systems, fluids in hydraulic systems or the airflow in ventilation and exhaust air systems. The amount of energy or energy carrier which is provided by the energy converter to the production process per time, is referred to as P use in the following. The concept of inherent energy storages in production systems was introduced in [12] and defined as the "usage of tolerances of different state variables in processes as energy storage". This illustrates the goal that is common to all inherent energy storages: keeping a certain value within defined limits, e.g., the temperature of a cooling system or the pressure in a compressed air supply system. The greater the range between the upper and lower limit, the more flexible is the system to shift its electrical energy consumption in time. This flexibility can be used to shift electrical loads, similar to an electrical energy storage system. To calculate the hereby generated equivalent electrical energy content E, models are needed to describe the characteristics of the different types of inherent storage systems. Against the background, we propose a general substitute model for IES shown in Figure 1. The basic key indicators included in this model are allow a comparison of different types of IES. This is especially helpful when evaluating complex factory systems in order to prioritize promising devices instead of spending a lot of time on the analysis of devices with low potentials. Simplified substitute model of an inherent energy storage consisting of the energy converter, which converts electricity into the energy form required by the production process and the inherent storage capacity.

Examples for IES in Production
The values which must be kept between the upper and lower level are indicators for the state of charge (SOC) of the inherent energy storage. In case of thermal energy for example, the SOC indicator is the temperature in the heated or cooled storage capacity. When the SOC indicator reaches the upper limit, the energy storage is fully charged, when it reaches the lower limit it is empty. Table 1 shows typical examples for inherent energy storages in production systems and the main formulas to estimate the magnitude of the respective storage capacity. In case of an exemplary electrically heated water tank, which can be found for example in all water-based cleaning machines, with a volume of 1.000 L, the density (1.000 kg/m³) and specific heat capacity (4.12 kJ/kgK) of water and a target temperature of 60-65 °C the calculation of useful energy content results in 5.72 kWh. Since the conversion efficiency of the heating element can be assumed to be 100%, the equivalent electrical energy storage capacity is 5.72 kWh for this example, too. Assuming a nominal electrical power of 10 kW for the heating element and losses and demand to be zero, the minimum time the converter needs to fill the energy storages is 5.72 kWh/10 kW = 34.3 min. Regarding a compressed air system with a volume of 1 m 3 and a target pressure of 7 bar, the calculation of the useful energy content results in 0.38 kWh, if the ambient pressure of 1 bar is taken as reference point. As the conversion efficiency of compressed air generation systems is at around 60%, the equivalent electrical energy storage for this example is 0.38 kWh/0.6 = 0.63 kWh. Thus, the minimum time for filling the storage amounts to 0.63 kWh/10 kW = 3.8 min in case of a Physical modeling of all kind of inherent energy storages cannot be completely standardized. The more complex the production facilities and boundary conditions are, the more specific the models become in order to be able to represent all interrelationships exactly. Nevertheless, there is the possibility to establish simplified physical substitute models for inherent energy storages, which allow a comparison of different types of IES. This is especially helpful when evaluating complex factory systems in order to prioritize promising devices instead of spending a lot of time on the analysis of devices with low potentials.

Examples for IES in Production
The values which must be kept between the upper and lower level are indicators for the state of charge (SOC) of the inherent energy storage. In case of thermal energy for example, the SOC indicator is the temperature in the heated or cooled storage capacity. When the SOC indicator reaches the upper limit, the energy storage is fully charged, when it reaches the lower limit it is empty. Table 1 shows typical examples for inherent energy storages in production systems and the main formulas to estimate the magnitude of the respective storage capacity.  3 5 V · c high − c low [27] Filling level (c) Lifting pump in machine tool Pump 55 Wh/m 3 6 V · c high − c low [27] 1 with volume (V), density (ρ), specific heat capcity (c p ). 2 typical value for coefficient of performance [30]. 3 including motor and compressor losses, no leakage or pressure losses in pipes considered [31]. 4 formula for isothermal compression and ideal gas. 5 minimum efficiency requirements for ventilation systems in non-residential buildings [32] 6 specific electrical power consumption of a machine tool's lifting pump [33].
In case of an exemplary electrically heated water tank, which can be found for example in all water-based cleaning machines, with a volume V of 1.000 L, the density ρ (1.000 kg/m 3 ) and specific heat capacity c p (4.12 kJ/kgK) of water and a target temperature T of 60-65 • C the calculation of useful energy content results in 5.72 kWh. Since the conversion efficiency of the heating element can be Energies 2020, 13, 4161 5 of 22 assumed to be 100%, the equivalent electrical energy storage capacity is 5.72 kWh for this example, too. Assuming a nominal electrical power of 10 kW for the heating element and losses and demand to be zero, the minimum time the converter needs to fill the energy storages is 5.72 kWh/10 kW = 34.3 min. Regarding a compressed air system with a volume V 2 of 1 m 3 and a target pressure p 2 of 7 bar, the calculation of the useful energy content results in 0.38 kWh, if the ambient pressure p 1 of 1 bar is taken as reference point. As the conversion efficiency of compressed air generation systems is at around 60%, the equivalent electrical energy storage for this example is 0.38 kWh/0.6 = 0.63 kWh. Thus, the minimum time for filling the storage amounts to 0.63 kWh/10 kW = 3.8 min in case of a compressor with a nominal electrical power of 10 kW. This simple assessment indicates that the thermal inherent energy storage has a far greater electrical flexibility potential, than the compressed air system although the volume of the storage and the nominal electrical power of the energy converter are equal. In this calculation, however, the losses and the demand for useful energy from the production process have been neglected. In the following, we discuss how these values influence the actual flexibility potential of the devices. For this purpose, it is necessary to explain the most important mathematical interrelationships for describing the operation of inherent energy storages: Many IES are two-point, respectively hysteresis controlled. This means that the energy converter switches on (s = 1), when the content in the storage reaches its lower limit which is defined by the operator. Afterwards, as long as the content is below the upper level, the converter remains in the switched-on state. Such devices can be modelled as a hybrid system consisting of discrete and continuous states [34]: The electrical power P el is calculated from P use through: Assuming that the efficiency is constant and thus the temporal decoupling between the coverage of demand and the purchase of electrical power has no influence on the efficiency, the discharge power P discharge , seen from the electrical grid, can be calculated by: Therefore, the change rate over time of the equivalent electrical energy content E is defined by: The maximum usable equivalent electrical energy content E max . of the storage unit is calculated from the difference between the upper and lower limits of the usable storage capacity divided by the efficiency: These equations are needed to calculate the flexibility potential of a hysteresis-controlled system from the power grids' point of view. The general procedure for this is derived in the following section.

General Remarks on the Calculation of the Flexibility Potential Calculation for IES
In general, the effectiveness of a load shifting measure for the power grid corresponds to the difference between the load profile in normal operation (reference load) and the load profile in energy flexible operation (flexible load) [12]. This is visualized in Figure 2 by the example of shifting the start Energies 2020, 13, 4161 6 of 22 of a defined electrical load from time step t 0 to t 2 . By implementing the flexibility measure, a load change ∆P can be achieved and a defined amount of energy E shift can be shifted in time.
Energies 2020, 13, x FOR PEER REVIEW 6 of 22 Figure 2. The effectiveness of a flexibility measure from the electricity grids' point of view is calculated according to [12] from the difference between the load profile in normal operation (reference load) and the one in energy flexible operation (flexible load).
The characteristics of the flexibility measure can be described by the following parameters which are based on the definition for standardized flexibility products which are for example discussed in [12,35]: To quantify the flexibility potential of an inherent energy storage device, it is therefore necessary to know the reference load profile in order to compare it with the load profile in energy flexible operation mode. In the case of classic energy storages like batteries, but also cold and heat storage devices that are only used for the purpose of load shifting, the break and regeneration time are variable. This means that the operator is relatively unrestricted to decide when to catch up the load. The only limitations are standby losses of the storage unit. In case of IES, this statement no longer applies since there is a predefined demand load profile, which must be covered by the energy converter. In [36] the different types of energy storage are compared in terms of their suitability for demand response. The authors conclude that thermostatically controlled loads can be used for most system services of demand response if the necessary information and communication technology infrastructure is available.

Reference Load Profile
In order to simulate the operative behavior of a hysteresis controlled device, the following formulas can be used to calculate the electrical load profile and the energy content in each time step of the time horizon which is considered. The formulas presuppose that the losses and the energy demand of the production process can be predicted and therefore ( ) is known for all time steps of the horizon. The timespan between and is called ∆ in the following. In the first step, the storage's energy content in case of maintaining the existing state of the energy converter is calculated: Figure 2. The effectiveness of a flexibility measure from the electricity grids' point of view is calculated according to [12] from the difference between the load profile in normal operation (reference load) and the one in energy flexible operation (flexible load).
The characteristics of the flexibility measure can be described by the following parameters which are based on the definition for standardized flexibility products which are for example discussed in [12,35]: • t 0 to t 1 : Activation time (from first load change to reach of final load level) ∆t activation • t 1 to t 2 : Holding time (constant load level) ∆t hold • t 2 to t 3 : Deactivation time (from load level to zero) ∆t deactivation • t 3 to t 4 : Break time (time until load recovery starts) ∆t break • t 3 to t 5 : Regeneration time (time until load recovery is completed) ∆t regeneration To quantify the flexibility potential of an inherent energy storage device, it is therefore necessary to know the reference load profile in order to compare it with the load profile in energy flexible operation mode. In the case of classic energy storages like batteries, but also cold and heat storage devices that are only used for the purpose of load shifting, the break and regeneration time are variable. This means that the operator is relatively unrestricted to decide when to catch up the load. The only limitations are standby losses of the storage unit. In case of IES, this statement no longer applies since there is a predefined demand load profile, which must be covered by the energy converter. In [36] the different types of energy storage are compared in terms of their suitability for demand response. The authors conclude that thermostatically controlled loads can be used for most system services of demand response if the necessary information and communication technology infrastructure is available.

Reference Load Profile
In order to simulate the operative behavior of a hysteresis controlled device, the following formulas can be used to calculate the electrical load profile and the energy content in each time step t i of the time horizon which is considered. The formulas presuppose that the losses and the energy demand of the production process can be predicted and therefore P discharge (t i ) is known for all time steps of the horizon. The timespan between t i and t i−1 is called ∆t i in the following. In the first step, the storage's energy content in case of maintaining the existing state of the energy converter is calculated: Hereby P el,nom is the nominal electrical power of the energy converter, which is consumed if the converter is switched on. If the calculated value is between the upper and lower level of the energy storage capacity ( E low < E(t i ) < E high ), the state s of energy converter can remain unchanged and the power can be calculated by: If the calculated value is greater than E high , the energy converter must be switched off when the limit is reached and cannot remain switched on for the entire time step. In this case, the average consumed electrical power in t i can be calculated by: The same applies if the lower limit is exceeded. The proportional power in this case is: After the electrical load is calculated, the actual value for the energy content can be assessed: For the abovementioned example of a heated water tank in a cleaning machine, the load profile in Figure 3 is calculated. When starting the calculation, the water tank has an energy level coresponding to the initial temperature of 62.5 • C and the heating element is switched on. It should be noted, that the linearization of the curves in Figure 3 is idealized -in the case of the temperature and thus energy curve of a thermostatically controlled loads, for example, the course actually corresponds to an exponential function [37,38].
Hereby , is the nominal electrical power of the energy converter, which is consumed if the converter is switched on. If the calculated value is between the upper and lower level of the energy storage capacity ( ( ) ), the state of energy converter can remain unchanged and the power can be calculated by: If the calculated value is greater than , the energy converter must be switched off when the limit is reached and cannot remain switched on for the entire time step. In this case, the average consumed electrical power in can be calculated by: The same applies if the lower limit is exceeded. The proportional power in this case is: After the electrical load is calculated, the actual value for the energy content can be assessed: For the abovementioned example of a heated water tank in a cleaning machine, the load profile in Figure 3 is calculated. When starting the calculation, the water tank has an energy level coresponding to the initial temperature of 62.5 °C and the heating element is switched on. It should be noted, that the linearization of the curves in Figure 3 is idealized -in the case of the temperature and thus energy curve of a thermostatically controlled loads, for example, the course actually corresponds to an exponential function [37,38]. Although in order to ensure the comparability and generalizability of the substitute model, a linearization is sufficiently accurate in most cases. As outlined in the figure, each charging cycle can be characterized by the cycle time ∆ and the load factor , which is the proportion of time the energy converter is switched on during the cycle: Although in order to ensure the comparability and generalizability of the substitute model, a linearization is sufficiently accurate in most cases. As outlined in the figure, each charging cycle can be characterized by the cycle time ∆t cycle and the load factor a, which is the proportion of time the energy converter is switched on during the cycle: These characteristic values can be extracted from measurement data of the electric load profile of a hysteresis-controlled energy converter or its SOC indicator by the logic described in Figure 4. The logic was implemented in a load analysis function, which receives as input the measured electrical load data of the energy converter or measured data of any SOC indicator. Output of the function are the number of full charging cycles included in the considered time series, the cycle times of all recorded charging cycles as well as the respective load factor. For the example of the described heated water tank, the application of the load analysis function to the reference load profile results in a cycle duration of 144 min and a load factor of 40%. These two values are later needed later to quantify the flexibility potential of the plant. The possibilities for energy-flexible operation in the case of hysteresis-controlled devices and the effects on the electrical load profile will be discussed in the next section.
Energies 2020, 13, x FOR PEER REVIEW 8 of 22 These characteristic values can be extracted from measurement data of the electric load profile of a hysteresis-controlled energy converter or its SOC indicator by the logic described in Figure 4. The logic was implemented in a load analysis function, which receives as input the measured electrical load data of the energy converter or measured data of any SOC indicator. Output of the function are the number of full charging cycles included in the considered time series, the cycle times of all recorded charging cycles as well as the respective load factor. For the example of the described heated water tank, the application of the load analysis function to the reference load profile results in a cycle duration of 144 min and a load factor of 40%. These two values are later needed later to quantify the flexibility potential of the plant. The possibilities for energy-flexible operation in the case of hysteresis-controlled devices and the effects on the electrical load profile will be discussed in the next section.

Calling a Flexibility Measure
As mentioned before, there are two main options to shift the electrical load of a hysteresiscontrolled device: direct load control (DLC)-thus direct switching of the energy converter-and adapting the hysteresis limits (HYST). By defining the desired call time of the flexibility measure and the direction of the desired load change (1 = load increase, −1 = load reduction) these two options can be implemented to calculate the flexible load profile by logic expressed in Figure 5. In case of an adaption of the hysteresis limits, the maximum upper limit of the energy content and the minimum lower limit must be defined in advance.

Calling a Flexibility Measure
As mentioned before, there are two main options to shift the electrical load of a hysteresis-controlled device: direct load control (DLC)-thus direct switching of the energy converter-and adapting the hysteresis limits (HYST). By defining the desired call time of the flexibility measure t x and the direction of the desired load change d load (1 = load increase, −1 = load reduction) these two options can be implemented to calculate the flexible load profile by logic expressed in Figure 5. In case of an adaption of the hysteresis limits, the maximum upper limit of the energy content E max and the minimum lower limit E min must be defined in advance.  As can be seen, direct load control of the energy converter leads to an immediate reaction when the converter has the opposite state to the desired direction of load change (i.e., ON when load reduction is desired and OFF when load increase is desired). If the converter is already in the desired state, there is no reaction to the flexibility call signal. If a flexibility measure with adaption of the hysteresis limits is called at the same time and direction of load change, the flexible load profile in Figure 7 is the result. It turns out that shifting the hysteresis limits causes the desired reaction, regardless of the state of the converter at the time of flexibility call. However, the activation can be If a flexibility measure of type DLC at time step t x = 150 and with d load = −1 is called, a new flexible load profile can be calculated and compared to the reference load profile in normal operation mode like it is shown for the mentioned heated water tank example in Figure 6.  As can be seen, direct load control of the energy converter leads to an immediate reaction when the converter has the opposite state to the desired direction of load change (i.e., ON when load reduction is desired and OFF when load increase is desired). If the converter is already in the desired state, there is no reaction to the flexibility call signal. If a flexibility measure with adaption of the hysteresis limits is called at the same time and direction of load change, the flexible load profile in Figure 7 is the result. It turns out that shifting the hysteresis limits causes the desired reaction, regardless of the state of the converter at the time of flexibility call. However, the activation can be delayed, depending on when the respective limit for the energy content in the storage is reached. As can be seen, direct load control of the energy converter leads to an immediate reaction when the converter has the opposite state to the desired direction of load change (i.e., ON when load reduction is desired and OFF when load increase is desired). If the converter is already in the desired state, there is no reaction to the flexibility call signal. If a flexibility measure with adaption of the hysteresis limits is called at the same time and direction of load change, the flexible load profile in Figure 7 is the result. It turns out that shifting the hysteresis limits causes the desired reaction, regardless of the state of the converter at the time of flexibility call. However, the activation can be delayed, depending on when the respective limit for the energy content in the storage is reached. Therefore in [23] it is postulated, that direct load control is suitable for short-term flexibilisation, while adaption of hysteresis limits within the initial limits can be used for long-term load shifting. It should be noted, however, that for both options the state of the energy converter at the time of retrieval plays a role. The effect of the measure on the electrical energy demand can only be calculated if the state and the electric power consumption of the energy converter is monitored and a forecast of the discharging power of the inherent storage capacity is available. In both cases (direct load control and adapting the hysteresis limits) it can be observed, that a single flexibility call causes further load changes in later time steps in addition to the desired initial load change. If these effects are not considered, they can lead to unwanted side effects such as load synchronization and avalanche effects, especially if a large fleet of similar devices is controlled by a central instance [39,40].

Method for Quantifying the State-Dependent Flexibility Potential of IES
In order to counteract these unwanted further load shifts, it is possible to calculate the time at which the energy converter can re-enter the load profile in the reference case [41]. For this, the point of intersection of the reference load profile and the flexible load profile must be identified. This point ( ) is marked in Figure 8 for the heated water tank example. To implement this strategy in the calculation of the flexible load profile, a "reversed" call for a DLC flexibility measure which opposite load change direction compared to the original flexibility call can be inserted at . By applying this method, a defined load change can be achieved. This can be described with the standard key indicators for flexibility products. For example, the holding time of the achieved load shift is 22 min for the difference load profile shown in Figure 8. The break time between the end of the initial load reduction and the start of the corresponding load increase is 31 min and the regeneration time is 75 min. The activation and deactivation time are neglected in this example because they are less than the duration of a time step. The shifted energy amount is calculated by multiplying the holding time of the flexibility measure by the nominal electrical power of the energy converter (see Formula (13)). In the example shown, this value is 10 kW • 22 min = 3.7 kWh. Therefore in [23] it is postulated, that direct load control is suitable for short-term flexibilisation, while adaption of hysteresis limits within the initial limits can be used for long-term load shifting. It should be noted, however, that for both options the state of the energy converter at the time of retrieval plays a role. The effect of the measure on the electrical energy demand can only be calculated if the state and the electric power consumption of the energy converter is monitored and a forecast of the discharging power of the inherent storage capacity is available. In both cases (direct load control and adapting the hysteresis limits) it can be observed, that a single flexibility call causes further load changes in later time steps in addition to the desired initial load change. If these effects are not considered, they can lead to unwanted side effects such as load synchronization and avalanche effects, especially if a large fleet of similar devices is controlled by a central instance [39,40].

Method for Quantifying the State-Dependent Flexibility Potential of IES
In order to counteract these unwanted further load shifts, it is possible to calculate the time at which the energy converter can re-enter the load profile in the reference case [41]. For this, the point of intersection of the reference load profile and the flexible load profile must be identified. This point (t re−entry ) is marked in Figure 8 for the heated water tank example. To implement this strategy in the calculation of the flexible load profile, a "reversed" call for a DLC flexibility measure which opposite load change direction compared to the original flexibility call can be inserted at t re−entry . By applying this method, a defined load change can be achieved. This can be described with the standard key indicators for flexibility products. For example, the holding time of the achieved load shift is 22 min for the difference load profile shown in Figure 8. The break time between the end of the initial load reduction and the start of the corresponding load increase is 31 min and the regeneration time is 75 min. The activation and deactivation time are neglected in this example because they are less than the duration of a time step. The shifted energy amount E shift is calculated by multiplying the holding time of the flexibility measure by the nominal electrical power of the energy converter (see Formula (13)). In the example shown, this value is 10 kW ·22 min = 3.7 kWh. E shift (t x ) = P nom,el · ∆t hold (t x ) (13) Energies 2020, 13, x FOR PEER REVIEW 11 of 22 By varying the call time for the flexibility measure within a charging cycle, the statedependence of the flexibility potential of a typical hysteresis-controlled system can be analyzed in more detail. In Figure 9 can be seen that there are basically two parameters that can limit the holding time of the flexibility measure: The first one is the time interval ∆ in which the upper or lower limit of energy content of the storage is reached in flexible operation mode (see Figure 9a). The second parameter is the time period between the flexibility call and the time step in which the energy converter would have switched the next time in normal operating mode ∆ (see Figure 9b). These two quantities can be calculated depending on the state of the energy converter and the converter running times of the regarded charging cycle by the following system of equations: By varying the call time t x for the flexibility measure within a charging cycle, the state-dependence of the flexibility potential of a typical hysteresis-controlled system can be analyzed in more detail. In Figure 9 can be seen that there are basically two parameters that can limit the holding time of the flexibility measure: The first one is the time interval ∆t SOC in which the upper or lower limit of energy content of the storage is reached in flexible operation mode (see Figure 9a). The second parameter is the time period between the flexibility call and the time step in which the energy converter would have switched the next time in normal operating mode ∆t switch (see Figure 9b).
These two quantities can be calculated depending on the state of the energy converter and the converter running times of the regarded charging cycle by the following system of equations: The call time of the flexibility measure t x is calculated here from the last switching time of the energy converter in normal operation. Figure 10 shows that the holding time reaches a maximum value at the time when ∆t switch and ∆t SOC are equal in case of desired load reduction as well as in case of a desired load increase. At these points in time, the amount of energy that can be shifted is maximum. dependence of the flexibility potential of a typical hysteresis-controlled system can be analyzed in more detail. In Figure 9 can be seen that there are basically two parameters that can limit the holding time of the flexibility measure: The first one is the time interval ∆ in which the upper or lower limit of energy content of the storage is reached in flexible operation mode (see Figure 9a). The second parameter is the time period between the flexibility call and the time step in which the energy converter would have switched the next time in normal operating mode ∆ (see Figure 9b). These two quantities can be calculated depending on the state of the energy converter and the converter running times of the regarded charging cycle by the following system of equations:  Based on this knowledge, a formula for the calculation of the maximum shiftable amount of energy, E shift,max in dependence on the characteristical key indicators a and ∆t cycle , which can be extracted from measurement date by load analysis, is established. For calculating this energy amount, the maximum holding time must be multiplied by the nominal electrical power of the energy converter: E shift,max = P el,nom · ∆t hold,max = P el,nom · a · (1 − a) · ∆t cycle (16) It is also possible to calculate the times at which the flexibility measures must be activated in order to shift this maximum amount of energy: t x, E_shift,max = a · a · ∆t cycle if load reduction is required (1 − a) · (1 − a) · ∆t cycle if load increase is required (17) Energies 2020, 13, 4161 13 of 22 For the example discussed with a cycle time of 144 min and a load factor of 0.4 this results in a maximum shiftable energy quantity of 5.76 kWh. Load reduction must be activated 23.04 min after switching on the energy converter, load increase after 51.84 min after switching off in order to shift this amount of energy. The cycle time and load factor are depending on the amount of useful energy required by the production process and the energy losses per time. It should be noted, however, that the amount of energy E shift,max that can be flexibilised corresponds to the actual equivalent electrical energy content of the storage E max , as the following calculation shows: These equations are valid if the hysteresis limits are fixed and the flexibility is obtained by DLC. If the hysteresis limits are shifted, the flexibility potential changes as the usable energy content in the storage is changed. In addition to shifting one of the two hysteresis limits, as already mentioned above, it is also possible in some systems to shift both hysteresis limits, thus bridging the time of several charging cycles of the reference operation. This mode of operation was suggested in [42], for example, to enable hysteresis-controlled systems for load management.
When shifting both hysteresis limits, the difference between the reference load profile and the flexible load profile, i.e., the effectiveness of the flexibility measure, can no longer be described by the standard key indicators for flexibility products. This is due to the difference between the load profile in normal operation and that in energy-flexible operation: As we see in Figure 11 at the time, where the converter would have been switched off in normal operation it stays on. Hence the difference is not constant but separated in two parts. When shifting both hysteresis limits the shiftable amount of energy consists of a state-dependent part E shift (t x ) which describes the flexibility within the hysteresis limits and an additional, state-independent part which represents the additional energy amount E * due to the shift of the hysteresis limits. In addition, the amount of energy which the energy converter would have required or not required in reference mode E el,ref in the period under consideration must be subtracted: Energies 2020, 13, x FOR PEER REVIEW 13 of 22 These equations are valid if the hysteresis limits are fixed and the flexibility is obtained by DLC. If the hysteresis limits are shifted, the flexibility potential changes as the usable energy content in the storage is changed. In addition to shifting one of the two hysteresis limits, as already mentioned above, it is also possible in some systems to shift both hysteresis limits, thus bridging the time of several charging cycles of the reference operation. This mode of operation was suggested in [42], for example, to enable hysteresis-controlled systems for load management.
When shifting both hysteresis limits, the difference between the reference load profile and the flexible load profile, i.e., the effectiveness of the flexibility measure, can no longer be described by the standard key indicators for flexibility products. This is due to the difference between the load profile in normal operation and that in energy-flexible operation: As we see in Figure 11 at the time, where the converter would have been switched off in normal operation it stays on. Hence the difference is not constant but separated in two parts. When shifting both hysteresis limits the shiftable amount of energy consists of a state-dependent part ( ) which describes the flexibility within the hysteresis limits and an additional, state-independent part which represents the additional energy amount * due to the shift of the hysteresis limits. In addition, the amount of energy which the energy converter would have required or not required in reference mode , in the period under consideration must be subtracted: For the example shown in Figure 11, ( ) is zero since the energy converter is already switched on at the time step in which the load increase is called. The number is calculated from the ratio of the amount of energy gained by shifting the For the example shown in Figure 11, E shift (t x ) is zero since the energy converter is already switched on at the time step in which the load increase is called.
E el,ref can be calculated from the number of full charging cycles x which can be bridged by the shift of the hysteresis limits: x · a · ∆t cycle · P el , for load increase / increasing hysteresis limits x · (1 − a) · ∆t cycle · P el , for load reduction / lower hyeteresis limits (20) The number x is calculated from the ratio of the amount of energy gained by shifting the hysteresis limits to the original energy content of the storage: Up to a certain point, even if the hysteresis limits are shifted, the effect of the flexibility measure can still be described with the standard key figures for flexibility products. This is the case when the additional amount of energy E * is small, so that no complete cycle is bridged and there is no gap in the difference load profile. The following condition then applies: a · x ≤ 1 for load increase (22) (1 − a) · x ≤ 1 for load reduction (23) The described methods for quantifying the flexibility potential of hysteresis-controlled systems are validated in terms of their practical applicability in real production environments. The case study carried out for this purpose is described in the next section.

Case Study
The test environment for the case study is the ETA research factory at the Technical University of Darmstadt [43]. Here, a typical production chain for the metal processing industry is set up for research in energy efficiency and energy flexibility of production systems.
For the purpose of data acquisition, production days are regularly carried out representing real factory operations. For this study two machines are examined in detail: an industrial cleaning machine that removes oil residues and metal chips from the manufactured components and the central air compressor that supplies various production machines in the factory. In Figure 12 the two machines are shown.
Up to a certain point, even if the hysteresis limits are shifted, the effect of the flexibility measure can still be described with the standard key figures for flexibility products. This is the case when the additional amount of energy * is small, so that no complete cycle is bridged and there is no gap in the difference load profile. The following condition then applies: ⋅ ≤ 1 for load increase (22) (1 − ) ⋅ ≤ 1 for load reduction (23) The described methods for quantifying the flexibility potential of hysteresis-controlled systems are validated in terms of their practical applicability in real production environments. The case study carried out for this purpose is described in the next section.

Case Study
The test environment for the case study is the ETA research factory at the Technical University of Darmstadt [43]. Here, a typical production chain for the metal processing industry is set up for research in energy efficiency and energy flexibility of production systems.
For the purpose of data acquisition, production days are regularly carried out representing real factory operations. For this study two machines are examined in detail: an industrial cleaning machine that removes oil residues and metal chips from the manufactured components and the central air compressor that supplies various production machines in the factory. In Figure 12  In order to quantify the flexibility potential of these two machines, the electrical load profiles were measured during one day of production operation. Since a comprehensive energy monitoring system is available in the ETA factory, which also logs data from the machine controls, the SOC indicators are also recorded. In case of the cleaning machine the SOC is calculated with the temperature in the electrical heated water tank inside the machine, in case of the air compressor it is In order to quantify the flexibility potential of these two machines, the electrical load profiles were measured during one day of production operation. Since a comprehensive energy monitoring system is available in the ETA factory, which also logs data from the machine controls, the SOC indicators are also recorded. In case of the cleaning machine the SOC is calculated with the temperature in the electrical heated water tank inside the machine, in case of the air compressor it is the pressure in the compressed air network. The measured data is shown in Figures 13 and 14.  The compressor starts to maintain pressure in the network before the shift starts at 08:00. When the machines are not running, it covers the losses in the pipes and the points of delivery caused by leaks. Since the flexibility potential obviously depends on whether the machines are running or not, the load analysis is carried out for two different time intervals in order to determine the characteristic values. The first interval is the time of the day during which production took place (08:00-16:00), the second is the idle time when the compressor was running and the machines were turned off (04:00-8:00). For each of these two phases and for both machines, the following steps were performed: In the first step, the idling phase of the compressor between 4:00 a.m. and 7:30 a.m. is considered. Figure 15 shows that the compressor has completed a total of 4 charging cycles before the start of the shift.  The compressor starts to maintain pressure in the network before the shift starts at 08:00. When the machines are not running, it covers the losses in the pipes and the points of delivery caused by leaks. Since the flexibility potential obviously depends on whether the machines are running or not, the load analysis is carried out for two different time intervals in order to determine the characteristic values. The first interval is the time of the day during which production took place (08:00-16:00), the second is the idle time when the compressor was running and the machines were turned off (04:00-8:00). For each of these two phases and for both machines, the following steps were performed: In the first step, the idling phase of the compressor between 4:00 a.m. and 7:30 a.m. is considered. Figure 15 shows that the compressor has completed a total of 4 charging cycles before the start of the shift. The compressor starts to maintain pressure in the network before the shift starts at 08:00. When the machines are not running, it covers the losses in the pipes and the points of delivery caused by leaks. Since the flexibility potential obviously depends on whether the machines are running or not, the load analysis is carried out for two different time intervals in order to determine the characteristic values. The first interval is the time of the day during which production took place (08:00-16:00), the second is the idle time when the compressor was running and the machines were turned off (04:00-8:00). For each of these two phases and for both machines, the following steps were performed: In the first step, the idling phase of the compressor between 4:00 a.m. and 7:30 a.m. is considered. Figure 15 shows that the compressor has completed a total of 4 charging cycles before the start of the shift. Energies 2020, 13 The average duration of these cycles takes 41.75 min and the mean load factor is 8.4%. This means that the compressor needs in average 3.5 min to raise the pressure in the system from the lower to the upper limit. In this case, the resulting maximum holding period for the flexibility measure is 3.2 min according to Formula (16). If a load increase is desired, the flexibility measure must be called 35.0 min after switching off the compressor in normal operation mode, load reduction has to be called 0.30 min after switching on. In order to calculate the maximum shiftable amount of energy, in addition to the holding time the electrical load of the compressor must be extracted from the measured load profile or from other information like data sheets. Here, the peak load measured is 4.13 kW between 4:00 a.m. and 7:30 a.m. With this value as nominal power, the maximum shiftable energy amount per cycle is 0.22 kWh (see Formula (16)). The procedure is similar for the other two analyzed cases. The results of the load analysis of the compressor during production (8:00 a.m. to 4:00 p.m.) are shown in Figure 16 and for the cleaning machine in Figure 17, respectively.  The average duration of these cycles takes 41.75 min and the mean load factor is 8.4%. This means that the compressor needs in average 3.5 min to raise the pressure in the system from the lower to the upper limit. In this case, the resulting maximum holding period for the flexibility measure is 3.2 min according to Formula (16). If a load increase is desired, the flexibility measure must be called 35.0 min after switching off the compressor in normal operation mode, load reduction has to be called 0.30 min after switching on. In order to calculate the maximum shiftable amount of energy, in addition to the holding time the electrical load of the compressor must be extracted from the measured load profile or from other information like data sheets. Here, the peak load measured is 4.13 kW between 4:00 a.m. and 7:30 a.m. With this value as nominal power, the maximum shiftable energy amount per cycle is 0.22 kWh (see Formula (16)). The procedure is similar for the other two analyzed cases. The results of the load analysis of the compressor during production (8:00 a.m. to 4:00 p.m.) are shown in Figure 16 and for the cleaning machine in Figure 17, respectively. The average duration of these cycles takes 41.75 min and the mean load factor is 8.4%. This means that the compressor needs in average 3.5 min to raise the pressure in the system from the lower to the upper limit. In this case, the resulting maximum holding period for the flexibility measure is 3.2 min according to Formula (16). If a load increase is desired, the flexibility measure must be called 35.0 min after switching off the compressor in normal operation mode, load reduction has to be called 0.30 min after switching on. In order to calculate the maximum shiftable amount of energy, in addition to the holding time the electrical load of the compressor must be extracted from the measured load profile or from other information like data sheets. Here, the peak load measured is 4.13 kW between 4:00 a.m. and 7:30 a.m. With this value as nominal power, the maximum shiftable energy amount per cycle is 0.22 kWh (see Formula (16)). The procedure is similar for the other two analyzed cases. The results of the load analysis of the compressor during production (8:00 a.m. to 4:00 p.m.) are shown in Figure 16 and for the cleaning machine in Figure 17, respectively.  The results of steps 1-5 described in Table 2 are summarized in Table 3. The largest flexibility potential can be identified for the cleaning machine during production. The air compressor has a lower shiftable energy amount per cycle, but theoretically this can be activated more often due to the greater number of cycles.  Calculation of the amount of electrical energy consumed by the system (integral of the electrical load profile) 2 Measurement of the electrical load peak and average electrical power 3 Counting the full charging cycles in the considered time interval 4 Determination of the duration and load factor of the respective cycle (according to Formulas (11) and (12))

5
Calculation of the maximum shiftable amount of energy per cycle as well as the call times in case of fixed hysteresis limits (according to Formulas (16) and (17)) 6 Extracting the hysteresis limits in standard operation mode from the measured data 7 Calculation of the possible flexibility potential by shifting the hysteresis limits (according to Formulas (19) and (23)  A detailed discussion of the results was conducted in Section 4. It must be emphasized that the air compressor is a device with the possibility of partial load operation. The extent to which this should be taken into account when calculating the potential for flexibility should be analyzed in future work. Furthermore, in the case of the cleaning machine, it was not the flexible auxiliary unit (the tank heating) that was measured, but the total electrical power consumed by the machine. The results of steps 1-5 described in Table 2 are summarized in Table 3. The largest flexibility potential can be identified for the cleaning machine during production. The air compressor has a lower shiftable energy amount per cycle, but theoretically this can be activated more often due to the greater number of cycles. Table 2. Work steps carried out in the case study.

1
Calculation of the amount of electrical energy consumed by the system (integral of the electrical load profile)

2
Measurement of the electrical load peak and average electrical power

3
Counting the full charging cycles in the considered time interval

4
Determination of the duration and load factor of the respective cycle (according to Formulas (11) and (12))

5
Calculation of the maximum shiftable amount of energy per cycle as well as the call times in case of fixed hysteresis limits (according to Formulas (16) and (17)) 6 Extracting the hysteresis limits in standard operation mode from the measured data 7 Calculation of the possible flexibility potential by shifting the hysteresis limits (according to Formulas (19) and (23)) A detailed discussion of the results was conducted in Section 4. It must be emphasized that the air compressor is a device with the possibility of partial load operation. The extent to which this should be taken into account when calculating the potential for flexibility should be analyzed in future work. Furthermore, in the case of the cleaning machine, it was not the flexible auxiliary unit (the tank heating) that was measured, but the total electrical power consumed by the machine. Although the switch-on times of the tank heating can be clearly identified from the load profile, it would still be necessary to analyze how large the base load share of the electrical power requirement of the machine is, which could distort the result. In addition to the flexibility potential within the existing hysteresis limits of the systems, there is also the possibility of gaining flexibility by shifting the hysteresis limits (step 6-7). For the two machines in the ETA research factory, the following shifts are available after consultation with the plant managers: Compressor: Increase of the upper pressure level up to 8 bar possible Cleaning machine: Extension of the upper hysteresis limit up to 68 • C is possible Under the assumption that the additional energy amount gained by shifting the hysteresis limits can be extrapolated linearly, the values summarized in Table 4 can be calculated for the new flexibility potentials in this case.

Discussion and Conclusions
The presented methodology for quantifying the flexibility potential of inherent energy storages respectively hysteresis-controlled devices in production systems offers a framework that is transferable to different types of machines or other devices. With the developed substitute model, the devices can be benchmarked against each other in terms of their flexibility potential and the flexible energy amount can be calculated in the form of the standard key figures of flexibility products on the energy markets. With the presented method it is possible to calculate the flexibility potential automated from the electrical load profiles of the energy converters or measurements of the respective SOC indicator. This will enable integration into energy monitoring systems in the future.
The case study which has been carried out for an industrial cleaning machine and an air compressor shows a flexibility potential of 0.92 kWh and 0.12 kWh, respectively, which can be shifted per charging cycle during production time. The maximum holding times of the flexibility measures are 4.12 respectively 1.02 min. As the cycle time of the compressor is significantly shorter than that of the tank heating of the cleaning machine, its flexibility potential can be called up more frequently per day. Over the entire production period of 8 h, this results in a flexible energy quantity of 11.88 kWh for the compressor and 17.48 kWh for the cleaning machine. If a shift of the upper hysteresis limits for both systems were implemented within the limits specified by the plant managers, the additionally gained, state independent flexibility potential is 0.12 kWh per charging cycle for the compressor during production time and 2.18 kWh per cycle for the heated tank of the cleaning machine. For both installations, the effectiveness of the flexibility measure can still be described using the standard indicators for energy flexibility measures described in Section 2.2 in this case.
To evaluate these results, typical energy contents of classical electrical energy storage systems can be used as a reference. For example, the size of a battery for scheduling the electrical power consumption of households with photovoltaics ranges between as 5.5 kWh [44] and 13.5 kWh [45]. The energy content of a mobile phone battery like the Apple iPhone 11 is about 0.012 kWh [46] and a the battery capacity of a laptop like the Lenovo Thinkpad T490s is 0.057 kWh [47].
It thus becomes clear that the flexibilisable energy quantities of inherent energy storage in production systems are certainly within a relevant range, especially when considering the number of these systems installed. However, the amounts of energy can only be shifted at certain points in time and, at least for the examples considered, only for relatively short time periods. Whether it is economical for companies to make these flexibilities available to the electricity market depends on the effort it takes to enable the machines. As a guideline, in which cases an investment could be worthwhile, a comparison with classic electrical energy storage systems can also be used here. According to [48] the investment sum for a lead acid battery with a capacity of 11.88 kWh amounts to 13,500 €-so such a battery with the same capacity as the flexible energy amount of the cleaning machine per cycle (0.92 kWh + 2.18 kWh = 3.1 kWh) would cost roughly 3500 €. For lithium ion batteries, the authors quote an amount of 52,500 € for a system with a capacity of 40 kWh-with this specific cost, the investment for a storage capacity of 3.1 kWh would be 4100 €. This rough calculation does not take into account the fact that ageing effects and wear are likely to play a greater role in electrical energy storage systems than in an electrically heated water tank designed for cyclic operation. However, the prices for lithium ion batteries are currently falling steadily. According to [49] they are around 100 €/kWh, [50] forecasts a value of 84 €/kWh for the year 2020. With these values the investment for a storage capacity of 3.1 kWh would only be 260-310 €.
Besides financial aspects, an evaluation of the ecological sense is also possible in this way. According to [48], the resource expenditure for the construction of 14 lead acid batteries results in a greenhouse gas emission of 8718.13 kg CO 2 equivalent. Converted to a capacity of 3.1 kWh, this would result in 162.5 kg CO2 equivalent if a new electrical battery would be produced instead of using the flexibility potential of the cleaning machine, which already exist. This idea will be further developed in subsequent research work. In addition, it will be analyzed how a flexible operation affects the efficiency of the devices-for example, heat losses increase when the bath temperature of cleaning machines is Energies 2020, 13, 4161 20 of 22 increased, which was not considered in the present study. The developed tool for load analysis will be improved in further work, especially regarding the partial load behavior of the devices and the use of advanced data analysis techniques. For example, clustering methods can be used to identify time spans with regular cycle times and thus reliably available flexibility potentials. The developed procedure for the extraction of the characteristic values of IES from measurement data is to be tested in the ETA research factory in real operation, in which the algorithm continuously updates the flexibility potential of the devices. This will provide further insights into how the approaches can be applied under real network conditions. In particular, an analysis of the reliability of the forecasts of the useful energy demand and thus of the possible call times for the maximum flexibility potential will be examined more closely.
Finally, the aggregation of the potential of several flexible devices in larger production facilities as well as the optimal composition of these plant pools in terms of different goals of demand side management will be investigated in future work. This is particularly interesting with regard to a possible use of the flexibility potential of IES in the field of ancillary services. A large number of IES, whose flexibility is aggregared, can provide flexibility in both load directions through the stochastic distribution of their system states. In addition, in large plant pools forecast uncertainties of the individual plant my be compensated by other devices. This can increase reliability and thus the suitability for the provision of control power.
Author Contributions: N.S. provided the idea and mainly developed the concept and mathematical framework. She created the load analysis and other functions needed to perform the case study and was largely responsible for creating the figures and manuscript. D.F.-V. contributed text passages in the introduction, related work and storage model and supported the design of the mathematical formulas and the interpretation of the results of the case study. M.W. and E.A. supervised the work. All authors and supervisors provided critical feedback and helped to shape the research, analysis, and manuscript. All authors have read and agreed to the published version of the manuscript.