8.1 Introduction

Port power system dominated by conventional synchronous sources is gradually evolving to the power system equipped or even dominated by non-synchronous sources, such as wind power and photovoltaic power [1]. Non-synchronous sources are connected through power inverters which provide no mechanical inertia [2]. They are decoupled from the system frequency and cannot actively provide inertia support for the system under active power disturbance [3, 4]. Hence, frequency stability would be a key challenge for future power systems with low and variable inertia levels [5, 6]. The system will experience faster frequency drops and will have less time to respond, leading to a noticeable impact on its ability to recover from large disturbances such as sudden load variation.

Meanwhile, the fast development of flexible load and demand side response (DSR) is likely to make the future load more volatile. In particular, the time-of-use (ToU) tariff will provide a discontinued price signal at the time between peak and off-peak periods [7,8,9]. If all flexible load simultaneously responds to the price signal, the load will surge or plunge in a very short time. The load spike will, conversely, reinforce the sudden price jump, creating a “critical mass” effect. However, such sudden load variation can be fatal to the frequency stability of low inertia power systems, which do not have enough active power regulation capability.

At present, many scholars have studied the frequency stability problems. Literature [10] modeled the frequency response support capabilities of wind power from the field-measured data, and proposed a frequency-constrained stochastic planning method. In literature [11], a frequency-constrained stochastic unit commitment model was proposed considering the provision of synchronized and synthetic inertia, enhanced frequency response, primary frequency response and a dynamically-reduced largest power infeed. Literature [12] established the analytical formulation of system frequency nadir considering both the thermal generators and the renewable energy plants, and thus proposed a frequency-constrained unit commitment model. Literature [13] proposed a system scheduling method on the premise of quantifying the impact of wind uncertainty on system inertia, which optimizes system operation by simultaneously scheduling energy production, standing/spinning reserves and inertia-dependent fast frequency response. The aforementioned studies have solved the frequency stability problems in power system planning, unit commitment, and system scheduling, but these works are applied to large grids, rather than microgrid systems with less inertia and more flexible loads.

For frequency stability problems in isolated microgrids, Literature [14] proposed an adaptive active power droop controller and voltage setpoint control scheme, which could enhance the primary frequency response and maintain the system frequency within the acceptable limits. Literature [15] presented a primary frequency control for the engine generators to regulate the frequency of isolated microgrids. Literature [16,17,18] also improved the frequency stability of isolated microgrids by augmenting primary frequency controls. Literature [19] proposed a hierarchical control strategy which divided the system frequency in three zones. This strategy ensured the frequency stability of stable zone in the isolated microgrid by scheduling precautionary zone and emergency zone. In literature [20], a novel adaptive droop control was designed for energy storage system in the hybrid AC/DC microgrid, which could provide DC bus voltage support and AC bus frequency support. Literature [21] proposed an approach of load frequency control for hybrid maritime microgrid system, and studied the system dynamics under random variation of wind, wave and sensitive load demand. Literature [22] proposed a multi-agent based multi-objective renewable energy management scheme, which considered consumer’s needs for power reliability, cost saving, and green consumption. The scheme can reduce the steady frequency drop while ensuring economy. In literature [23], a dynamic event-triggered robust secondary frequency control scheme was presented, which provided a good balance between frequency stability performance and communication burden. Literature [24] established a cyber-attack model and presented a resilience-based frequency regulation scheme. It employed different control schemes to protect against the cyber-attack in the system. The previous works have considered some practical problems on frequency control of microgrids. However, the negative impact of DSR on frequency stability resulting from the simultaneous response to ToU tariff has not been investigated. This is a critical challenge for future power systems with many responsive loads but low inertia levels.

This chapter proposes a new frequency-based demand side response (FB-DSR) strategy. Due to the low inertia characteristic and the abundant DSR resources, the frequency stability problem of microgrids is particularly prominent. Hence, the proposed method is validated on a test multi-microgrid system based on real data collected from microgrids in Shanghai, China. The main contents of the chapter are summarized as follows:

  1. (1)

    The frequency stability issue that arises from the DSR guided by ToU tariff is proposed and solved for the first time.

  2. (2)

    The proposed strategy represents frequency dynamics through an analytical expression of exchange power. It achieves the conversion of frequency constraints by modifying long-term DSR decisions by short-term power volatility suppression through two stages.

  3. (3)

    Considering electricity charges and equipment depreciation, a day-ahead DSR optimization model is proposed, which ensures the economics of the strategy.

  4. (4)

    Through the analysis of time–frequency domain, the whole process constraint of frequency involving inertia support, frequency nadir and quasi-steady-state is formulated. The power volatility is suppressed by means of the lowest cost, considering load shedding, RES curtailment and DSR control.

The remainder of this chapter is organized as follows. Section 8.2 discusses how the DSR guided by ToU tariff affects frequency stability, and introduces the scenarios prone to this problem. In Sect. 8.3, the FB-DSR strategy is proposed. Section 8.4 summarizes the case study. Conclusions are drawn in Sect. 8.5.

8.2 Problem Formulation

The total moment of inertia in the port microgrid system decreases with the introduction of renewable energy, and thus the ability to maintain frequency decreases. Meanwhile, the number of flexible loads such as electric vehicles and heat pumps keeps increasing. Their simultaneous responses to the ToU tariff may lead to frequency stability problems in the system operation.

As shown in Fig. 8.1, the price signal of the ToU tariff is discontinuous. When the price suddenly drops, if a large number of flexible loads respond at the same time, the load will surge in a very short time. Such sudden load variation will drag the system’s frequency down and even develop to under frequency load shedding. To present such an undesired outcome, multiple constraints are required when the system’s frequency is undergoing a dynamic process. The first stage of this process (\(t_{1} \sim t_{2}\) in Fig. 8.1) is referred to as system inertial response. The rate of change of frequency (\(\Delta \dot{f}\)) is mainly affected by the system inertia, and it is necessary to ensure that \(\Delta \dot{f}\) does not exceed the limit. The second stage (\(t_{2} \sim t_{3}\) in Fig. 8.1) is referred to as primary frequency modulation. At this point, the governor starts to prevent the frequency from further reduction. In this stage, the frequency nadir of the dynamic process should be considered to make the minimum frequency (\(f^{*}\)) not lower than the set value of under frequency load shedding. The third stage (after \(t_{3}\) in Fig. 8.1) is referred to as secondary frequency modulation. Since the governor cannot bring the frequency back to the original value, the automatic generation control (AGC) will start and use the reserve to bring the frequency back. At this moment, the quasi-steady-state frequency constraint must be satisfied, that is, the difference between the quasi-steady-state frequency and the initial value (\(\Delta f\)) meets the requirement. In general, throughout this frequency response process, the inertia support constraint, the frequency nadir constraint and the quasi-steady-state constraint should be satisfied at the same time. Otherwise, the frequency stability of system will be affected.

Fig. 8.1
figure 1

A conventional diagram of load and frequency response for discontinued price signals

This is a problem that has not been fully discussed but could be critical in the future when flexible load like electric vehicles uptakes on a large scale. It is particularly urgent for microgrids with high penetrations of renewable energy and thus low and variable levels of inertia. With the development of interconnected microgrids and peer to peer (P2P) trading based on ToU tariff, unregulated demand response may lead to serious frequency issues. Therefore, this chapter will study the FB-DSR strategy under the condition of interconnected microgrids with P2P trading based on ToU tariff.

8.3 The FB-DSR Strategy

The mismatch between the power consumption and the ToU tariff leads to high electricity costs. However, the exact match will trigger simultaneous response and potential frequency issues. This section proposes an FB-DSR strategy to address the trade-off between customers’ economic benefits and systems’ frequency stability. Section 8.3.1 introduces the day-ahead complete-period DSR optimization method, which runs iteratively every hour. The conversion of frequency to power and the short-term power volatility suppression method is given in Sect. 8.3.2.

8.3.1 Day-Ahead Complete-Period DSR Optimization

  1. (1)

    Equipment Depreciation Model

The service life of power regulating equipment will be compromised when they participate in DSR. The depreciation of energy storage equipment is related to the charging and discharging cycles during the equipment operation. A complete cycle with x% depths of charge means the storage equipment’s SOC decreases from 100 to x% and then increases from x to 100%. The equipment life depreciation of a complete cycle is defined as \(D_{100\sim x}^{{{\text{comp}}}}\). Therefore, the life depreciation during the incomplete cycle can be calculated according to the rain-flow cycle counting algorithm [25]. Equation (8.1) calculates the life depreciation of the equipment when its SOC changes from x to y%, where \(n_{x\sim y}\) means the number of the cycles the equipment completed during the operation period.

$$ D_{x\sim y}^{{{\text{incomp}}}} = n_{x\sim y} \left| {D_{100\sim x}^{{{\text{comp}}}} - D_{100\sim y}^{{{\text{comp}}}} } \right| $$
(8.1)

Combining the calculation formula of \(D_{100\sim x}^{{{\text{comp}}}} \) [25], the relation between equipment depreciation and their SOC can be obtained, as shown in (8.2).

$$ D\left( {k,h} \right) = 0.5\left| {\frac{{SOC\left( {k,{ }h + 1} \right) - b_{k} }}{{a_{k} }} - \frac{{SOC\left( {k,{ }h} \right) - b_{k} }}{{a_{k} }}} \right| $$
(8.2)

where \(a\) and \(b\) are the parameters determined by the type of equipment.

  1. (2)

    Demand Side Response Model

In microgrids, the heat pump group is often used as flexible load [26]. Generally, the heat demand is met through centralized heat production, which is more efficient. Large water storage tanks will be equipped for heat storage, which can work with the battery for demand response. The heat pump group generally includes base-load heat pumps and flexible regulating heat pumps. The former has high rated power and bears the base load of heat demand. The latter has low rated power and is able to adjust the switch state rapidly with the change of the users’ heat demand. The heat output power of heat pump is defined in (8.3).

$$ Q_{{{\text{hpi}}}} \left( h \right) = C_{{{\text{hp}}}} \cdot P_{{{\text{hpi}}}} \left( h \right) $$
(8.3)

where \(Q_{{{\text{hpi}}}} \left( h \right)\) is the heat output power of heat pump i at hour h, \(C_{{{\text{hp}}}}\) is the energy efficiency ratio coefficient of heat pump, \(P_{{{\text{hpi}}}} \left( h \right)\) is the electric power of heat pump i at hour h. The heat generated by the heat pump group is transmitted to the heat storage tank through the heat exchanger by heat circulating working medium. The heat storage tank supplies the heat demand of each user. The first-order equivalent thermal parameter model is used to simulate water temperature changes in the water tank, as defined in (8.4) and (8.5).

$$ \begin{array}{*{20}c} {V \cdot \rho_{W} \cdot c_{W} \cdot \frac{{dT_{t} \left( h \right)}}{dh} = \mathop \sum \limits_{i} Q_{hpi} \left( h \right) - Q_{load} \left( h \right) - \frac{{T_{t} \left( h \right) - T_{en} \left( h \right)}}{{R_{t} }}} \\ \end{array} $$
(8.4)
$$ \begin{array}{*{20}c} {T^{{{\text{min}}}} \le T_{{\text{t}}} \left( h \right) \le T^{{{\text{max}}}} } \\ \end{array} $$
(8.5)

where V is water storage volume, \(\rho_{W}\) is water density, \(c_{W}\) is the specific heat capacity of water, \(T_{{\text{t}}} \left( h \right)\) is water temperature of heat storage tank at hour h, \(T_{{{\text{en}}}} \left( h \right)\) is environment temperature at hour h, \(Q_{load} \left( h \right)\) is the forecast result of heat demand at hour h, \({ }R_{{\text{t}}}\) is thermal resistance of heat storage tank, \(T^{{{\text{min}}}}\) and \(T^{{{\text{max}}}}\) are the minimum/maximum temperatures of the stored water respectively.

The energy stored in the heat storage tank, which has been converted into electricity, is described in (8.6).

$$ \begin{array}{*{20}c} {S_{{{\text{tank}}}} \left( h \right) = V \cdot \rho_{{\text{w}}} \cdot c_{{\text{w}}} \cdot \frac{{\left[ {T_{{\text{t}}} \left( h \right) - T^{{{\text{min}}}} } \right]}}{{C_{{{\text{hp}}}} }}} \\ \end{array} $$
(8.6)

where \(S_{{{\text{tank}}}} \left( h \right)\) is the energy stored in the tank at hour h. Analogous to the SOC of battery, the SOC of heat storage tank is established in (8.7), which is described by the water temperature.

$$ \begin{array}{*{20}c} {SOC_{{{\text{tank}}}} \left( h \right) = \frac{{\left[ {T_{{\text{t}}} \left( h \right) - T^{{{\text{min}}}} } \right]}}{{\left[ {T^{{{\text{max}}}} - T^{{{\text{min}}}} } \right]}}} \\ \end{array} $$
(8.7)

where \(SOC_{{{\text{tank}}}} \left( h \right)\) is the SOC of heat storage tank energy storage system at hour h. The heat pump group and heat storage tank are able to be regarded as a load and storage coordination power control unit, which can cooperate with the battery to realize the DSR.

  1. (3)

    Day-Ahead Complete-Period Optimization Model

There is likely to be a mismatch between the power consumption and the ToU tariff because of the intermittence of RES and the energy usage habit of users. The DSR optimization can shift electricity from low price periods to high price periods by controlling the heat pump group and battery. Besides, the model proposed in this chapter considers the depreciation expense of storage equipment during the power regulation. The power of heat pump group and battery is adjusted every hour at this stage. The forecast results of load and RES are also based on one-hour timescale. Furthermore, since both photovoltaic and user loads have obvious daily patterns, the energy storage equipment take 24 h as an operation cycle, that is, the SOC after 24 h should be equal to the initial SOC. The optimization model is shown as follows.

$$ \begin{array}{*{20}c} {\min :\mathop \sum \limits_{{h{ = }1}}^{N} \left[ {C_{{{\text{elec}}}} \left( h \right)P_{{{\text{line}}}} \left( h \right) + C_{{{\text{batt}}}} D_{{{\text{batt}}}} \left( h \right) + C_{{{\text{hs}}}} D_{{{\text{hs}}}} \left( h \right)} \right]} \\ \end{array} $$
(8.8)
$$ \begin{array}{*{20}c} {P_{{{\text{line}}}} \left( h \right) = P_{{{\text{load}}}} \left( h \right) + P_{{{\text{hp}}}} \left( h \right) - P_{{{\text{wind}}}} \left( h \right) - P_{{{\text{pv}}}} \left( h \right) + P_{{{\text{batt}}}}^{{{\text{cha}}}} \left( h \right) - P_{{{\text{batt}}}}^{{{\text{dis}}}} \left( h \right)} \\ \end{array} $$
(8.9)

where \(C_{{{\text{elec}}}} \left( h \right)\) is the ToU tariff at hour h, \(P_{{{\text{line}}}} \left( h \right)\) is the optimization result of exchange power at hour h, \(C_{{{\text{batt}}}}\) is the battery cost, \(D_{{{\text{batt}}}} \left( h \right)\) is the battery depreciation at hour h, \(C_{{{\text{hs}}}}\) is the heat storage system cost, \(D_{{{\text{hs}}}} \left( h \right)\) is the heat storage system depreciation at hour h, \(P_{{{\text{load}}}} \left( h \right)\) is the forecast result of electricity demand at hour h, \(P_{{{\text{wind}}}} \left( h \right)\) is the forecast result of wind power at hour h, \(P_{{{\text{pv}}}} \left( h \right)\) is the forecast result of photovoltaics power at hour h, \(P_{{{\text{batt}}}}^{{{\text{cha}}}} \left( h \right)\) and \(P_{{{\text{batt}}}}^{{{\text{dis}}}} \left( h \right)\) are the charging and discharging power of the battery respectively.

Objective function (8.8) minimizes the daily electricity cost and the equipment depreciation expense. The exchange power is determined by load, heat pump group, RES and battery, as shown in (8.9). The model also includes energy storage operation constraints, upper and lower power constraints and security constraints, which can be found in [27].

After solving the complete-period DSR optimization model, the optimal operating status of the heat pump group and battery for the next 24 h is obtained. Then, the results of the first hour are taken as the reference power of heat pump group and battery for the next hour. The adjustments of heat pump group and battery power are based on these reference power at the stage of short-term volatility suppression. In addition, the SOC of the energy storage equipment at the end of the first hour is the target SOC of short-term volatility suppression during the adjustment of the next hour, and the minute-level target SOC is obtained by linearization.

8.3.2 Short-Term Power Volatility Suppression

As the amount of flexible load increases, the system frequency deviation may be too large when all flexible load simultaneously responds. Hence, this subsection discusses the relationship between frequency and short-term power volatility in detail, and proposes a method to judge whether the short-term volatility needs to be suppressed after the complete-period DSR optimization. In addition, the optimal short-term power suppression method is given.

  1. (1)

    Frequency Stability Constraints

When analyzing the power volatility, the multi-microgrid systems can be simplified as Fig. 8.2. If the Microgrid A conducts demand response, a sudden change power \(\Delta P\) occurs on the tie-line and will have an impact on other microgrids. According to the analysis in Sect. 8.2, \(\Delta P_{{\text{B}}}\), \(\Delta P_{{\text{C}}}\), and \(\Delta P_{{\text{N}}}\) need to satisfy the inertia support constraint, frequency nadir constraint and quasi-steady-state constraint at the same time, so as to ensure the frequency stability.

Fig. 8.2
figure 2

The equivalent of multi-microgrid systems

After the sudden disturbances, the system first relies on inertia to suppress the frequency change. The initial rate of change of frequency should meet the following requirements.

$$ \begin{array}{*{20}c} {\left| {\left. {\Delta \dot{f}} \right|} \right. = \left| {\left. {\frac{\Delta P}{{2H}}f_{0} } \right|} \right. \le \Delta \dot{f}_{{{\text{max}}}} } \\ \end{array} $$
(8.10a)

where \(\Delta \dot{f}\) is the rate of change of frequency, \(f_{0}\) is the system nominal frequency, H is the system inertia. The above equation is the inertia support constraint, from which the maximum power mutation value, \(\Delta P_{1}^{{{\text{max}}}}\), can be deduced.

$$ \begin{array}{*{20}c} {\Delta P_{1}^{{{\text{max}}}} = \left| {\left. {\frac{{2H\Delta \dot{f}_{{{\text{max}}}} }}{{f_{0} }}} \right|} \right.} \\ \end{array} $$
(8.10b)

where \(\Delta \dot{f}_{{{\text{max}}}}\) is the maximum value of rate of change of frequency. At the end of the inertia support stage, the governors begin to respond to the sudden change of frequency to prevent its further changes. The frequency nadir constraint should be considered to ensure that the maximum frequency offset value does not exceed the set value of under frequency load shedding.

The dynamic model of the governor is equivalent to the first-order model as follows.

$$ \begin{array}{*{20}c} {\Delta P_{{\text{G}}} = \frac{{K_{{\text{G}}} }}{{1 + T_{{\text{G}}} s}}\Delta \omega } \\ \end{array} $$
(8.11a)

The first-order frequency response model of the system considering the governors is shown in Fig. 8.3, and its transfer function can be written as (8.11b). Note that Microgrid A is connected to multiple microgrids. Hence, parameter equivalent aggregation method is used to merge the parameters of connected microgrids. The parameter aggregation formulas are shown in (8.11c), (8.11d) and (8.11e).

Fig. 8.3
figure 3

The first-order frequency response model

$$ \begin{array}{*{20}c} {\frac{\Delta \omega }{{\Delta P_{{\text{d}}} }} = \frac{1}{{2Hs + D_{{\text{L}}} + \frac{{K_{{\text{G}}} }}{{1 + T_{{\text{G}}} s}}}}} \\ \end{array} $$
(8.11b)

where \(D_{{\text{L}}}\) is the load damping constant. Note that Microgrid A is connected to multiple microgrids. Hence, parameter equivalent aggregation method is used to merge the parameters of connected microgrids. The parameter aggregation formulas are shown in (8.11c), (8.11d) and (8.11e).

$$ \begin{array}{*{20}c} {D_{{\text{L}}} = \frac{{\mathop \sum \nolimits_{{{\text{i}} = {\text{B}}}}^{{\text{N}}} P_{{{\text{Ni}}}} \cdot D_{{\text{i}}} }}{{\mathop \sum \nolimits_{{{\text{i}} = {\text{B}}}}^{{\text{N}}} P_{{{\text{Ni}}}} }}} \\ \end{array} $$
(8.11c)
$$ \begin{array}{*{20}c} {K_{{\text{G}}} = \frac{{\mathop \sum \nolimits_{{{\text{i}} = {\text{B}}}}^{{\text{N}}} P_{{{\text{Ni}}}} \cdot K_{{\text{i}}} }}{{\mathop \sum \nolimits_{{{\text{i}} = {\text{B}}}}^{{\text{N}}} P_{{{\text{Ni}}}} }}} \\ \end{array} $$
(8.11d)
$$ \begin{array}{*{20}c} {T_{{\text{G}}} = \frac{{\mathop \sum \nolimits_{{{\text{i}} = {\text{B}}}}^{{\text{N}}} P_{{{\text{Ni}}}} \cdot T_{{\text{i}}} }}{{\mathop \sum \nolimits_{{{\text{i}} = {\text{B}}}}^{{\text{N}}} P_{{{\text{Ni}}}} }}} \\ \end{array} $$
(8.11e)

where N is the number of power optimization periods. The above Eq. (8.11b) can be converted to

$$ \begin{array}{*{20}c} {\frac{\Delta \omega }{{\Delta P_{{\text{d}}} }} = \frac{1}{{2HT_{{\text{G}}} }}\frac{{1 + T_{{\text{G}}} s}}{{s^{2} + 2\varepsilon \omega_{{\text{n}}} s + \omega_{{\text{n}}}^{2} }}} \\ \end{array} $$
(8.11f)

where:

$$ \begin{array}{*{20}c} {\omega_{{\text{n}}}^{2} = \frac{{K_{{\text{G}}} + D_{{\text{L}}} }}{{2HT_{{\text{G}}} }}} \\ \end{array} $$
(8.11g)
$$ \begin{array}{*{20}c} {\varepsilon = \frac{1}{2}\frac{{2H + D_{{\text{L}}} T_{{\text{G}}} }}{{\sqrt {2HT_{{\text{G}}} \left( {K_{{\text{G}}} + D_{{\text{L}}} } \right)} }}} \\ \end{array} $$
(8.11h)

where in (8.11g), \(\omega_{{\text{n}}}\) is the nominal angular velocity. For sudden disturbances, we assume a step function, i.e., \(\Delta P_{{\text{d}}} \left( s \right) = - \Delta P/s\). Taking t as the index of the minute, the time-domain response can be derived as

$$ \begin{array}{*{20}c} \begin{aligned} \Delta \omega \left( t \right) & = - \frac{\Delta P}{{2HT_{G} \omega_{n}^{2} }} - \frac{\Delta P}{{2H\omega_{r} }}e^{{ - \varepsilon \omega_{n} t}} \\ & \quad \times \left( {\sin \left( {\omega_{r} t} \right) - \frac{1}{{\omega_{n} T_{G} }}\sin \left( {\omega_{r} t + \phi } \right)} \right) \\ \end{aligned} \\ \end{array} $$
(8.11i)

where:

$$ \begin{array}{*{20}c} {\omega_{r} = \omega_{{\text{n}}} \sqrt {1 - \varepsilon^{2} } } \\ \end{array} $$
(8.11j)
$$ \begin{array}{*{20}c} {\phi = {\text{arc}}\sin \left( {\sqrt {1 - \varepsilon^{2} } } \right)} \\ \end{array} $$
(8.11k)

In the extreme points of \(\Delta \omega \left( t \right)\), \(\frac{d\Delta \omega }{{d{\text{t}}}} = 0\), so the maximum frequency offset time can be obtained as follows

$$ \begin{array}{*{20}c} {t^{*} = \frac{1}{{\omega_{r} }}\arctan \left( {\frac{{\omega_{r} }}{{\varepsilon \omega_{n} - \frac{1}{{T_{G} }}}}} \right)} \\ \end{array} $$
(8.11l)

Substituting (8.11l) into (8.11i), the maximum frequency offset \(\Delta \omega \left( {t^{*} } \right){ }\) can be found.

$$ \begin{array}{*{20}c} {\Delta \omega \left( {t^{*} } \right) = \chi \Delta P} \\ \end{array} $$
(8.11m)

where,

$$ \begin{array}{*{20}c} {\chi = - \frac{1}{{K + D_{{\text{L}}} }}\left( {1 + e^{{ - \varepsilon \omega_{n} t^{*} }} \sqrt {\frac{{T_{G} K}}{2H}} } \right)} \\ \end{array} $$
(8.11n)

The minimum frequency is calculated as

$$ \begin{array}{*{20}c} {f^{*} = f_{0} + f_{0} \Delta \omega \left( {t^{*} } \right)} \\ \end{array} $$
(8.11o)

where \(f^{*}\) is the minimum frequency. This frequency should not be lower than the set value of under frequency load shedding \(f_{{{\text{shed}}}}\), that is, \(f^{*} \ge f_{{{\text{shed}}}}\). Therefore, the maximum power mutation value obtained from the frequency nadir constraint is as follows,

$$ \begin{array}{*{20}c} {\Delta P_{2}^{{{\text{max}}}} = \left| {\left. {\frac{{f_{0} - f_{{{\text{shed}}}} }}{{f_{0} \chi }}} \right|} \right.} \\ \end{array} $$
(8.11p)

where \(\Delta P_{2}^{{{\text{max}}}}\) is the maximum power mutation value derived from frequency nadir constraint. After the primary frequency control participated by governors, the sudden change power, \(\Delta P\), is compensated by generation reduction, \(\Delta P_{{\text{G}}}\), and load increase, \(\Delta P_{{\text{L}}}\). The formulas are shown below.

$$ \begin{array}{*{20}c} {\Delta P + \Delta P_{{\text{G}}} - \Delta P_{{\text{L}}} = 0} \\ \end{array} $$
(8.12a)
$$ \begin{array}{*{20}c} {\Delta P_{{\text{G}}} = - K_{{\text{G}}} \cdot \Delta f} \\ \end{array} $$
(8.12b)
$$ \begin{array}{*{20}c} {\Delta P_{{\text{L}}} = - D_{{\text{L}}} \cdot \Delta f} \\ \end{array} $$
(8.12c)

By solving (8.12a), (8.12b) and (8.12c), the frequency deviation is obtained as shown in (8.12d).

$$ \begin{array}{*{20}c} {\Delta f = \frac{\Delta P}{{K_{{\text{G}}} + D_{{\text{L}}} }}} \\ \end{array} $$
(8.12d)

The frequency at this point is called the quasi-steady-state frequency, and it should be within the interval \(\left[ {f^{{{\text{min}}}} ,f^{{{\text{max}}}} } \right]\). Therefore, according to the quasi-steady-state constraint, the upper and lower limits of power mutation value can be obtained as follows.

$$ \begin{array}{*{20}c} {\Delta \overline{{P_{3}^{{{\text{max}}}} }} = \left( {f^{{{\text{max}}}} - f_{0} } \right) \cdot \left( {K_{{\text{G}}} + D_{{\text{L}}} } \right)} \\ \end{array} $$
(8.12e)
$$ \begin{array}{*{20}c} {\Delta \underline{{P_{3}^{{{\text{max}}}} }} = \left( {f^{{{\text{min}}}} - f_{0} } \right) \cdot \left( {K_{{\text{G}}} + D_{{\text{L}}} } \right)} \\ \end{array} $$
(8.12f)

where \(\Delta \overline{{P_{3}^{{{\text{max}}}} }}\), \(\Delta \underline{{P_{3}^{{{\text{max}}}} }}\) are the upper/lower limits of the maximum power mutation value derived from quasi-steady-state constraint.

  1. (2)

    Construction of the Suppression Power

Define the allowable range of sudden change power considering the frequency stability constraints to be \(\left[ {\Delta P^{{{\text{min}}}} ,\Delta P^{{{\text{max}}}} } \right]\), and its calculation formulas are shown as follows.

$$ \begin{array}{*{20}c} {\Delta P^{{{\text{max}}}} = \max \left\{ {\Delta P_{1}^{{{\text{max}}}} ,\Delta P_{2}^{{{\text{max}}}} ,\Delta \overline{{P_{3}^{{{\text{max}}}} }} } \right\}} \\ \end{array} $$
(8.13a)
$$ \begin{array}{*{20}c} {\Delta P^{{{\text{min}}}} = \min \left\{ { - \Delta P_{1}^{{{\text{max}}}} , - \Delta P_{2}^{{{\text{max}}}} ,\Delta \underline{{P_{3}^{{{\text{max}}}} }} } \right\}} \\ \end{array} $$
(8.13b)

where \(\Delta P_{1}^{{{\text{max}}}}\) is the maximum power mutation value derived from inertia support constraint. The allowable range of power exchanged between Microgrid A and the system can be calculated. The calculation formulas are shown below.

$$ \begin{array}{*{20}c} {P_{{{\text{s\_line}}}}^{{{\text{max}}}} \left( t \right) = P_{{{\text{s\_line}}}} (t - 1) - \Delta P^{{{\text{min}}}} } \\ \end{array} $$
(8.14a)
$$ \begin{array}{*{20}c} {P_{{{\text{s\_line}}}}^{{{\text{min}}}} (t) = P_{{{\text{s\_line}}}} (t - 1) - \Delta P^{{{\text{max}}}} } \\ \end{array} $$
(8.14b)

where \(P_{{{\text{s\_line}}}}\) is the exchange power after using the real-time data, \(\Delta P^{{{\text{max}}}}\) and \(\Delta P^{{{\text{min}}}}\) are the upper/lower power fluctuation limits of the microgrid respectively. After the complete-period power optimization, the initial exchanged power is determined by the user load, the real-time output of RES and the reference power of heat pump group and battery, which is shown in (8.15).

$$ \begin{array}{*{20}c} {P_{{{\text{s}}\_{\text{line}}}} \left( t \right) = P_{{{\text{s}}\_{\text{load}}}} \left( t \right) - P_{{{\text{s}}\_{\text{wind}}}} \left( t \right) - P_{{{\text{s}}\_{\text{pv}}}} \left( t \right) + P_{{{\text{hp}}}}^{{{\text{ref}}}} + P_{{{\text{batt}}}}^{{{\text{ref}}}} } \\ \end{array} $$
(8.15)

where \(P_{{{\text{s\_load}}}} \left( t \right)\), \(P_{{{\text{s\_wind}}}} \left( t \right)\), \(P_{{{\text{s\_pv}}}} \left( t \right)\) are the real-time electricity demand/wind power/photovoltaics at time t, \(P_{{{\text{batt}}}}^{{{\text{ref}}}}\), \(P_{{{\text{hp}}}}^{{{\text{ref}}}}\) are the reference power of battery/heat pump group respectively. Influenced by the sudden changes of the ToU tariff, the initial exchanged power may have significant short-term volatility. The portion of this power that exceeds the allowable range is the short-term suppression power that needs to be processed at this minute.

$$ P_{{{\text{s\_line}}}}^{{{\text{flu}}}} (t) = \left\{ {\begin{array}{*{20}l} {P_{{{\text{s\_line}}}}^{{{\text{max}}}} (t) - P_{{{\text{s\_line}}}} (t),} \hfill & {{\text{if }}P_{{{\text{s\_line}}}} (t) > P_{{{\text{s\_line}}}}^{{{\text{max}}}} (t)} \hfill \\ {P_{{{\text{s\_line}}}}^{{{\text{min}}}} (t) - P_{{{\text{s\_line}}}} (t),{ }} \hfill & {{\text{if }}P_{{{\text{s\_line}}}} (t) < P_{{{\text{s\_line}}}}^{{{\text{min}}}} (t)} \hfill \\ {0,} \hfill & {{\text{otherwise}}} \hfill \\ \end{array} } \right. $$
(8.16)

where \(P_{{{\text{s\_line}}}}^{{{\text{flu}}}}\) is the fluctuation power that need to be stabilized.

  1. (3)

    The Suppression Approach of Power Volatility

To ensure frequency stability, power volatility can be suppressed by load shedding, RES curtailment and DSR control. The optimal suppression model of short-term power volatility is established as follows.

$$ \begin{array}{*{20}c} {\min :C_{{{\text{shed}}}} \cdot P_{{{\text{shed}}}} + C_{{{\text{curt}}}} \cdot P_{{{\text{curt}}}} + C_{{{\text{dsr}}}} \cdot P_{{{\text{dsr}}}} } \\ \end{array} $$
(8.17)

s.t.

$$ \begin{array}{*{20}c} {P_{{{\text{s\_line}}}}^{{{\text{flu}}}} = - P_{{{\text{shed}}}} + P_{{{\text{curt}}}} + P_{{{\text{dsr}}}} } \\ \end{array} $$
(8.18)
$$ \begin{array}{*{20}c} {P_{{{\text{shed}}}} \ge 0} \\ \end{array} $$
(8.19)
$$ \begin{array}{*{20}c} {P_{{{\text{curt}}}} \ge 0} \\ \end{array} $$
(8.20)
$$ \begin{array}{*{20}c} {C_{{{\text{curt}}}} = C_{{{\text{elec}}}} \left( h \right)} \\ \end{array} $$
(8.21)
$$ \begin{array}{*{20}c} {C_{{{\text{dsr}}}} = C_{{{\text{elec}}}} \left( h \right) - C_{{{\text{elec}}}} \left( {h + 1} \right)} \\ \end{array} $$
(8.22)

where \(C_{{{\text{shed}}}}\) is the load shedding cost, \(C_{{{\text{curt}}}}\) is the renewable energy sources (RES) cost, \(C_{{{\text{dsr}}}}\) is the demand side response control cost, \(P_{{{\text{shed}}}}\) is the load shedding power, \(P_{{{\text{curt}}}}\) is the RES curtailment power, \(P_{{{\text{dsr}}}}\) is the demand side response control power.

Objective function (8.17) minimizes the cost of load shedding, RES curtailment and DSR control. The sum of the power suppressed by these three measures equals to \(P_{{{\text{s\_line}}}}^{{{\text{flu}}}}\), as shown in (8.18). Note that load shedding can only reduce power, and RES curtailment can only reduce generation. The cost of load shedding is determined by the importance of load. The cost of RES curtailment is consistent with the electricity price, and the cost of DSR control is consistent with the difference of ToU tariff.

After solving the optimal suppression model, load shedding and RES curtailment are implemented. The battery, together with the power control unit composed of the heat pumps and heat storage tank, participates in the DSR control. The DSR suppression task is distributed according to the energy storage capacity of battery and heat storage tank, so as to coordinate the output of battery and heat pump group. The base proportion that the battery should undertake is shown in (8.23).

$$ \begin{array}{*{20}c} {\alpha_{0} = \frac{{S_{{{\text{batt}}}}^{{{\text{max}}}} }}{{\left( {S_{{{\text{tank}}}}^{{{\text{max}}}} + S_{{{\text{batt}}}}^{{{\text{max}}}} } \right)}}} \\ \end{array} $$
(8.23)

where \(\alpha_{0}\) is the ratio of battery energy storage, \(S_{{{\text{batt}}}}^{{{\text{max}}}}\), \(S_{{{\text{tank}}}}^{{{\text{max}}}}\) are the maximum capacity of the battery/heat storage tank respectively.

The proportion of the task assignment is dynamically adjusted based on \(\alpha_{0}\). The fuzzy control method is utilized, and the deviation between the actual state and target state of each energy storage equipment is taken as the reference, which is calculated in (8.24) and (8.25). When energy consumption is required, that is, \(P_{{{\text{s\_line}}}}^{{{\text{flu}}}} (t) > 0\), if \(deSOC_{{{\text{batt}}}} (t)\) is higher than \(deSOC_{{{\text{tank}}}} (t)\), the suppression proportion undertaken by the battery will be reduced, otherwise the proportion will be increased. When energy discharging is required, the opposite is true. Under different circumstances, the suppression proportion of battery is shown in Fig. 8.4.

$$ \begin{array}{*{20}c} {\begin{array}{*{20}c} {deSOC_{{{\text{tank}}}} \left( t \right) = SOC_{{{\text{tank}}}} \left( t \right) - SOC_{{{\text{tank}}}}^{{{\text{tar}}}} \left( t \right)} \\ \end{array} } \\ \end{array} $$
(8.24)
$$ \begin{array}{*{20}c} {\begin{array}{*{20}c} {deSOC_{{{\text{batt}}}} \left( t \right) = SOC_{{{\text{batt}}}} \left( t \right) - SOC_{{{\text{batt}}}}^{{{\text{tar}}}} \left( t \right)} \\ \end{array} } \\ \end{array} $$
(8.25)

where \(deSOC_{{{\text{batt}}}} \left( t \right)\), \(deSOC_{{{\text{tank}}}} \left( t \right)\) are the deviation between the actual state and the target state of battery/heat storage tank energy storage system at time t respectively. \(SOC_{{{\text{batt}}}}^{{{\text{tar}}}} \left( t \right)\), \(SOC_{{{\text{tank}}}}^{{{\text{tar}}}} \left( t \right)\) are the target soc of battery/heat storage tank energy storage system at time t respectively. \(SOC_{{{\text{batt}}}} \left( t \right)\) is the SOC of heat storage tank energy storage system at time t.

Fig. 8.4
figure 4

The suppression ratio of battery during the short-term power volatility suppression

After considering taking part in short-term volatility suppression, the control power of battery at this time is shown as follows.

$$ \begin{array}{*{20}c} {P_{{{\text{s\_batt}}}}^{{{\text{flu}}}} (t) = \alpha (t) \cdot P_{{{\text{dsr}}}} (t)} \\ \end{array} $$
(8.26)
$$ \begin{array}{*{20}c} {P_{{{\text{s\_batt}}}}^{{{\text{tar}}}} (t) = P_{{{\text{batt}}}}^{{{\text{ref}}}} + P_{{{\text{s\_batt}}}}^{{{\text{flu}}}} (t)} \\ \end{array} $$
(8.27)

where \(P_{{{\text{s\_batt}}}}^{{{\text{flu}}}}\) is the fluctuation power that need battery to stabilize, \(P_{{{\text{s\_batt}}}}^{{{\text{tar}}}}\) is the target power of the battery. The actual power of the battery is also limited by the rated power.

The heat pump group reduces the short-term power volatility by changing the switch state of heat pump and adjusting the consumed power. The target power of heat pump group is the sum of the reference power and the remaining short-term suppression power. The difference between the target power and the actual power at the previous moment is the on–off control target of the heat pump group at this moment. The formulas are shown as follows.

$$ \begin{array}{*{20}c} {P_{{{\text{s\_hp}}}}^{{{\text{tar}}}} (t) = P_{{{\text{hp}}}}^{{{\text{ref}}}} + P_{{{\text{dsr}}}} (t) - [P_{{{\text{s\_batt}}}}^{{{\text{act}}}} \left( {t) - P_{{{\text{batt}}}}^{{{\text{ref}}}} } \right]} \\ \end{array} $$
(8.28)
$$ \begin{array}{*{20}c} {P_{{{\text{s\_hp}}}}^{{{\text{oc}}}} (t) = P_{{{\text{s\_hp}}}}^{{{\text{tar}}}} (t) - P_{{{\text{s\_hp}}}}^{{{\text{act}}}} \left( {t - 1} \right)} \\ \end{array} $$
(8.29)

where \(P_{{{\text{s\_hp}}}}^{{{\text{tar}}}}\) is the target power of heat pump group. \(P_{{{\text{s\_batt}}}}^{{{\text{act}}}}\) is the actual power of battery, and \(P_{{{\text{s\_hp}}}}^{{{\text{oc}}}}\) is the on–off control target of heat pump group.

The heat pump group includes two types: the base-load heat pump and the flexible regulating heat pump. When controlling the heat pump group to meet the on–off control target, the following rules are considered in this chapter: (1) avoid the flexible regulating heat pumps all on or off; (2) average the on–off times of the same type heat pump; (3) turn on or off as few heat pumps as possible. When rule 1 contradicts rule 3, follow rule 1 first. These rules will help to extend the overall service life of heat pumps.

8.4 Case Studies

8.4.1 Case Description

The case study of the proposed FB-DSR strategy is based on a test multi-microgrid system. This system consists of three AC microgrids, which are connected by DC transmission line. The data is collected from microgrids in Shanghai, China. Microgrid A shall perform peak shaving and valley filling through DSR, and its frequency shall be kept within the allowable range. Microgrid A uses the heat pump group as flexible loads, which contains 20 base-load heat pumps and 25 flexible regulating heat pumps. In addition, the maximum power of the battery and the SOC range of the hybrid energy storage system are limited during complete-period DSR optimization, so as to satisfy the requirement of short-term suppression. The ToU tariff [28], which is obtained from net load of the multi-microgrid system, is shown in Fig. 8.5 and the load shedding cost is ¥27.08/kWh [29]. The actual load and power generation of Microgrid A is shown in Fig. 8.6. Table 8.1 summarizes the equipment parameters [30]. Other parameters for case simulation are shown in Table 8.2.

Fig. 8.5
figure 5

An example of typical ToU tariff for microgrids

Fig. 8.6
figure 6

The actual load and power generation of Microgrid A

Table 8.1 Equipment parameters for the case study
Table 8.2 Simulation parameters for the case study

8.4.2 The Results of the Proposed Strategy

Figure 8.7 shows the simulation results of the proposed strategy, and Fig. 8.8 demonstrates the regulating power of the battery and heat pump group. Note that, the exchange power fluctuates according to the ToU tariff by adjusting the power of controllable devices.

Fig. 8.7
figure 7

The exchange power obtained by the proposed strategy and for previous situation

Fig. 8.8
figure 8

The equipment regulating power obtained by the proposed strategy

The SOC target and actual SOC of battery and heat storage tank are shown in Fig. 8.9. After participating in the short-term volatility suppression, the actual SOC is still able to follow the target SOC obtained by the complete-period DSR optimization. This indicates that the short-term suppression strategy proposed in this chapter will not have a significant impact on the DSR result. Figure 8.10 shows the on–off times of heat pumps. It can be seen that the on–off times of the same type heat pumps are equal, which is conducive to extending the overall service life of the heat pump group.

Fig. 8.9
figure 9

The SOC of each equipment obtained by the proposed strategy

Fig. 8.10
figure 10

The on–off times of heat pumps obtained by the proposed strategy

8.4.3 Comparative Studies

In addition to the proposed FB-DSR strategy (S1), the common DSR strategy that ignores frequency stability (S2) is also utilized in this chapter. We have magnified the simulation results of the two strategies at thirteen o’clock, as shown in Fig. 8.11. It can be seen that as the ToU tariff suddenly decreases, the load power increases immediately. Under the control of S2, the sudden increase of power results in the 1.8% decrease in the frequency. While, under the control of S1, the exchange power gradually increases, so that the frequency is always maintained within the allowable range. The generators start AGC to increase output and eventually recover the power volatility. The differential power of load under two strategies is compensated by controlling the power of heat pump and battery. In the actual operation process, when the frequency goes beyond the lower limit, it will maintain the frequency stability by cutting the load. Therefore, under the control of S2, under frequency load shedding will occur when the frequency is in the shaded part of the figure.

Fig. 8.11
figure 11

The comparison of results obtained by the proposed strategy (S1) nd the common DSR strategy (S2) at thirteen o’clock

Table 8.3 presents the results comparison for the two strategies. The maximum absolute value (MAV) of the 1-min exchange power volatility is used to measure the short-term volatility. The MAV of S1 and S2 is 313.02 kW and 845.77 kW, respectively, which proves that S1 is effective in short-term volatility suppression. The electricity cost and the depreciation expense of equipment are almost equal for the two strategies. The power volatility suppression cost of S1 is much lower than S2. This is because when the power fluctuates greatly, S2 can only adopt load shedding and RES curtailment to maintain frequency stability, while S1 can adopt DSR control. In general, S1 is superior to S2 in economy and security.

Table 8.3 Comparison of results obtained by the proposed strategy (S1) and the common DSR strategy (S2)

8.4.4 Short-Term Volatility Suppression Effect

This subsection analyses the short-term volatility suppression effect of the proposed strategy. The short-term suppression power of each equipment is presented in Fig. 8.12 and the frequency deviation in Fig. 8.13. It can be seen from Figs. 8.5 and 8.7 that the sudden change in price will cause the sudden change of exchange power, but will not destabilize the frequency. The proposed strategy can adjust the power of battery and heat pump group when the short-term volatility of exchange power is too large, so that the frequency can be kept within the allowable range. For example, at eight o’clock, the price of electricity jumps 80% and the load power of Microgrid A drops rapidly. At this moment, the battery and the heat pump group consume additional power based on the reference power determined by the complete-period DSR optimization, to alleviate the short-term volatility of power and maintain the frequency within the allowable range.

Fig. 8.12
figure 12

The short-term suppression power of each equipment obtained by the proposed strategy

Fig. 8.13
figure 13

Frequency deviation of Microgrid A obtained by the proposed strategy

8.5 Conclusion

The DSR guided by the ToU tariff can change the electricity consumption behaviour of users and promote the balance between energy supply and demand under the condition of high renewable energy penetration. However, with the increase of flexible load, the discontinuity of the ToU tariff could trigger sudden and drastic variations of loads, threatening the frequency stability of low-inertia system. This chapter proposes a FB-DSR strategy, which integrates time-domain optimization and frequency-domain control and realizes the whole process constraint of frequency. By dynamically distributing the regulating power of each equipment, it adjusts the complete-period power fluctuation, as well as the drastic short-term volatility. The strategy reduces the electricity cost, and circumvents frequency stability issues associated with DSR. The equipment depreciation due to power regulation is also considered. Case simulation demonstrates that the proposed strategy can improve the acceptability of power system to DSR. The MAV of 1-min exchange power volatility decreases by 62.99%, which keeps the system frequency within the allowable range and reduces the loss caused by frequency instability. The overall operating cost is reduced by 7.34%.