1 Introduction

Renewable energy sources (RESs) have been rapidly developed around the world for the past two decades. It is foreseen that more renewables will be integrated into the power system in the future. As an effective solution for the RES integration, the microgrid concept [14] has attracted a lot of attention due to its control flexibility to the utility grid [5]. A typical microgrid consists of distributed generation (DG) units, energy storage system (ESS) and loads. According to the status of the external grid or self-requirement, the microgrid can operate in grid-connected mode or island mode. Due to the intermittent characteristics of renewable energy based DG units, it will cause stability problems (voltage or frequency). Particularly in the island operation, the frequency and voltage control of the microgrid is not straightforward. Since the RESs, i.e. wind and solar, have an intermittent nature, they cannot guarantee the constant power supply required by loads. Furthermore, the DG units with relatively slow response have insufficient dynamic performance in terms of load tracking [6]. To overcome these challenges, the ESS is considered as an effective option. Some studies have been shown the use of the ESS [79] for smoothing wind power production and improving the stability of isolated power systems. The battery energy storage system (BESS) is the most efficient technology because of its fast response and is used to improve the power system operation and control with large renewable energy penetration.

However, if only the BESS is used to stabilize the microgrid, it may result in an operational failure due to the capacity constraint of the BESS. Therefore, the power outputs of the dispatchable DG units shall be coordinated to share the load following burden.

In [5] and [10], coordinated control strategies of BESS and DG in microgrid for island operation were proposed. The control strategies consist of a primary control action of the BESS and a secondary control action of the management system. During the island operation, the frequency and voltage are regulated by the fast-acting primary control of the BESS. The secondary control of the microgrid management system (MMS) detects the change of the power output of the BESS and tries to return the power output of the BESS to the reference value by dispatching the power output set points to dispatchable DG units.

With the development of the battery technology, BESSs with larger capacity are expected. The BESS will contribute to both the primary control and the secondary control. In that case, the state of charge (SOC) of the BESS shall be considered in the control scheme. In order to take into account the SOC of the BESS in the control of the microgrid, a fuzzy logic based coordinate control strategy of the BESS and dispatchable DGs is proposed for the MMS in this paper. Compared to conventional controllers, the fuzzy logic based controller is not very sensitive to variations of system structure, parameters and operation points, and can be implemented for a large scale nonlinear system.

The paper is organized as follows. Section 2 describes the modeling of the microgrid. The microgrid control system structure is explained in Section 3 with the details of the coordinated control scheme. The design of the fuzzy-logic based controller is presented in Section 4. The case study results are described and discussed in Section 5. In the end, the conclusion is drawn.

2 Microgrid modeling

A typical microgrid consists of several DG units together with ESS and loads. The modeling of the microgrid is described in this section.

2.1 BESS modeling

Different modeling approaches have been developed for BESS [11, 12]. Normally, the battery model shall represent the terminal voltage and the internal resistance which are a function of several internal variables such as the SOC, the age and temperature of the battery [13]. A simple electric equivalent battery model and a more complex equivalent battery model are shown in Fig. 1a and Fig. 1b. In Fig. 1, \( s \) is the Laplace variable, \( \theta \) is the electrolyte temperature, \( Z\left( {s, SOC} \right) \) is the internal impedance, \( E(s,SOC) \) is the internal voltage, \( Z(s,\theta ,SOC) \) is the internal impedence considering the parasitic reaction, \( Z_{\text{p}} (s,\theta ,SOC) \) is the impedence of the parasitic branch, \( E(s,\theta ,SOC) \) is the internal voltage considering the parasitic reaction, \( E_{\text{p}} (s,\theta ,SOC) \) is the voltage of of the parasitic branch, \( R^{0} \) is the resistor between the parasitic branch and the battery terminal voltage. In this paper, the simplified battery model is used which is the model in Fig. 1a with constant inner resistance \( Z(s,SOC) = Z \) and a controlled voltage source (CVS) dependent on the SOC.

Fig. 1
figure 1

Battery electric equivalent model

The SOC is calculated with an integrator considering the current of the battery. The terminal voltage of the CVS is,

$$ u_{\text{DC}} = u_{\hbox{max} } \cdot SOC + u_{\hbox{min} } \cdot (1 - SOC) - i_{\text{DC}} \cdot Z $$
(1)

where \( u_{\text{DC}} \) is the battery terminal voltage; \( u_{\hbox{max} } \) is the voltage of the fully charged battery; \( u_{\hbox{min} } \) is the voltage of the discharged batter; \( i_{\text{DC}} \) is the current of the battery; Z is the internal impedance.

The BESS controller aims to regulate the two current components: \( i_{d}^{{}} \) (d-axis current) and \( i_{q}^{{}} \) (q-axis current). These components are the real and reactive power accordingly. There are three different control modes: (a) Active and reactive power is regulated according to the set point; (b) Droop control; (c) Frequency/Voltage (F/V) control. In this paper, different control schemes are used according to the operations. For the grid-connected operation, mode (a) is applied. The set point is determined by the MMS. In the island operation, the BESS contributes to stabilize the frequency. Therefore, mode (c) is utilized.

The BESS controller is divided into the PQ Control and charging control which is shown in Fig. 2.

Fig. 2
figure 2

BESS control system

The charge controller is used to limit the current and charging level [13].

2.2 Disptachable DG modeling

A typical synchronous generator system is shown in Fig. 3. An automatic voltage regulator (AVR) and a power system stabilizer (PSS) are equipped for the excitation system control. The governor (GOV) is to control the prime mover in order to regulate the rotation speed of the generator according to the reference value. The IEEE models are used in this study which are listed in Table 1.

Fig. 3
figure 3

Synchronous generator system

Table 1 Generation system model

2.3 RES and load modeling

A Wind Power Generation System (WPGS) represents the RES in this study. It is assumed that the WPGS always tracks the maximum power point. Therefore, instead of detailed modeling, it is modeled as a negative dynamic load (supply power to the grid) in PowerFactory.

The loads are modeled dynamic loads with a constant power factor.

3 Microgrid control system

3.1 Control system structure of microgrid

The microgrid control system consists of two control levels: the central level and the local level. The management of the microgrid is performed through local controllers at DG units and BESS, and a central controller MMS [8]. The MMS is a supervisory centralized controller that includes several key functions, such as economic managing functions, frequency control, voltage control, etc. For dispatchable DG units, the MMS can exchange information with local controllers (LCs) and determine the power output set points. For RES DG units, in some extreme situations, e.g. the wind power is larger than the load demand and ESS reaches its maximum limit, the MMS can down regulate the RES. The hierarchical control structure is shown in Fig. 4.

Fig. 4
figure 4

The hierarchical control structure of microgrid

3.2 Coordinated control strategy

The coordinated control strategy is to determine the set points of the BESS and dispatchable DG units. The objectives of the coordinated control are,

  1. 1)

    Smoothing the output power of the microgrid in grid-connected mode

  2. 2)

    Maintain the voltage and frequency level in island mode.

3.2.1 Grid-connected mode

In the grid-connected mode, the frequency of the microgrid is closely linked to the external grid. Therefore, it is not necessary to regulate the dispatchable DGs for the frequency control. In order to maximize the use of wind power, the local controller regulates wind turbine to track maximum power point (MPP). The main object of the MMS is to control the charging or discharging of the BESS to mitigate the power fluctuations at the Point of Common Coupling (PCC) \( p_{\text{PCC}} \). Furthermore, the battery will be charged if the charging level is lower than the predefined threshold (SOC < 50 %).

As shown in Fig. 5, the active power output reference at the PCC \( p_{\text{pcc}}^{\text{ref}} \) is derived through a first-order filter with the time constant \( T_{\text{wp}} \). The difference between the \( p_{\text{pcc}} \) and the \( p_{\text{pcc}}^{\text{ref}} \) is set to be the target power output of the BESS (\( p_{\text{bess}}^{\text{tar}} \)). In order to respect the BESS physical constraint, the SOC of the BESS shall be taken into consideration. The fuzzy logic controller (FLC) is used to maintain the SOC of the BESS above a certain level and mitigate the fluctuation. Both the \( p_{\text{bess}}^{\text{tar}} \) and the SOC are used as inputs to the FLC and the active power reference (\( p_{\text{bess}}^{\text{ref}} \)) is derived and given to the BESS. As a result, the BESS will supply or absorb active power accordingly.

Fig. 5
figure 5

Smoothing control for the gird-connected operation

3.2.2 Island mode

The controller for the island operation is illustrated in Fig. 6. In this mode, the quality of the frequency in the microgrid is the key issue of concern. The main cause of the frequency deviation is the imbalance between the generation and the consumption. When the frequency deviation exceeds a predefined threshold, the primary control acts to arrest the frequency decline or rise. The time scale is in the order of seconds. During this period, the BESS responds and fills the gap between the generation and the consumption very fast. Then the secondary control restores the frequency to the nominal value. It adjusts the load reference set point of the governor of the dispatchable DG units. The time scale is in the order of minutes.

Fig. 6
figure 6

Island operation control

In this study, the BESS can also participate in the secondary control due to the large capacity (60 kWh in this study. The specific parameters are listed in Section 6, Table 3). The participation is dependent on the SOC and the power output required (\( p_{\text{cmd}} \)) which is derived from the frequency controller. \( p_{\text{cmd}} \) is further allocated by the dispatch function block to generate the load reference set point for each dispatchable DG unit. Each participation factor (\( pf_{i} \)) can either be based on the nominal power or the available power. In this study, it is proportional to the nominal power \( p_{{{\text{nom}}i}} \). The calculation of the participation factors are listed in (2)–(4).

$$ p_{{{\text{DG}}i}}^{\text{ref}} = pf_{i} \cdot p_{\text{total}}^{\text{ref}} $$
(2)
$$ pf_{i} = \frac{{p_{{{\text{nom}}i}} }}{{p_{{{\text{total}}\_{\text{nom}}i}} }} $$
(3)
$$ p_{{{\text{total}}\_{\text{nom}}i}} = \sum\limits_{i = 1}^{n} {p_{{{\text{nom}}i}} } $$
(4)

4 Design of fuzzy logic controller

As described in Section 4, the fuzzy-logic based controller adjusts the active power output reference \( p_{\text{bess}}^{\text{ref}} \) of the BESS based on the SOC and the target active power (\( p_{\text{bess}}^{\text{tar}} \)) for the grid-connected operation. During island operation, the fuzzy-logic based controller adjusts the active power output reference \( p_{\text{bess}}^{\text{ref}} \) of the BESS based on the SOC and the active power command for frequency control (\( p_{\text{cmd}} \)). The proposed control strategy can be formulated as follows,

$$ p_{\text{bess}}^{\hbox{min} } \le p_{\text{bess}} \le p_{\text{bess}}^{\hbox{max} } $$
(5)
$$ SOC_{\hbox{min} } \le SOC \le SOC_{\hbox{max} } $$
(6)
$$ p_{\text{bess}}^{\text{ref}} = f_{\text{fuzzy}} (p_{\text{bess}}^{\text{tar}} ,SOC) $$
(7)

Each input and output has a membership function. For the input SOC, there are five memberships: VS (very small), S (small), M (middle), B (big) and VB (very big). For the input \( p_{\text{bess}}^{\text{tar}} \), there are seven memberships: NB (negative big), NM (negative middle), NS (negative small), ZO (zero), PS (positive small), PM (positive middle), PB (positive big). For the output \( p_{\text{bess}}^{\text{ref}} \), there are seven members hips and their name and descriptions are same as \( p_{\text{bess}}^{\text{tar}} \). Fuzzy rules for \( p_{\text{bess}}^{\text{ref}} \) is listed in Table 2 and the relevant surface is shown in Fig. 7.

Table 2 Fuzzy rules
Fig. 7
figure 7

Fuzzy rule surface

5 Case studies

The microgrid system in [5] was used as the test system for the case studies. The system is comprised of two dispatchable DG units, a RES, a BESS, a distribution feeder and three loads, as shown in Fig. 8. The parameters of these components are listed in Table 3, some of which are different from [5].

Fig. 8
figure 8

Test system configuration

Table 3 Model parameter

The range of the SOC of the BESS is set between 20 % and 80 %. In the grid-connected mode, the SOC of the BESS will be charged to a high level (SOC > 50 %). In the case study, both the grid-connected and island operation modes are studied. The transition time is t = 1000 s when the PCC switch opens. The simulation time is 2500 s. In order to test the response of the designed controller to different charging levels, two cases with different initial SOC are defined (Case 1: SOC = 50 %; Case 2: SOC = 70 %).

The profiles of wind and loads are shown in Fig. 9. The total load con sumption varies from 100 kW to 110 kW and the total wind power varies from 5 kW to 35 kW. The wind penetration level is about 30 %.

Fig. 9
figure 9

Wind and load profile

5.1 Grid-connected operation

From t = 0 s to t = 1000 s, the system operates in the grid-connected mode. As described above, the main objective of the control strategy is smoothing the output power at PCC by regulating the BESS. As shown in Fig. 10a, the high frequency parts of power fluctuation are filtered for both cases (power flow from the microgrid to the external grid is considered to be positive here). This period is divided into two phases according to the wind power variation. When t < 600 s, the wind power generation changes slowly and the SOC levels are stable for both cases. When t > 600 s, wind output decreases and the BESS discharges. Due to the different initial SOC levels, the BESS with higher charging level will discharge more power. Therefore, the power curve of Case 2 is smoother than that of Case 1. Accordingly, the SOC decreases about 0.1 % in Case 1 and 0.13 % in Case 2 (Fig. 10b).

Fig. 10
figure 10

Grid-connected operation

5.2 Island operation

From t = 1000 s to t = 2500 s, the system operates in island mode. The main objective of the control strategy is to stabilize the frequency. The frequency deviation is illustrated in Fig. 11.

Fig. 11
figure 11

Frequency deviation at PCC

The frequency recovery can be divided into two parts. From t = 1000 s to t = 1100 s, the frequency increases rapidly due to the fast response of BESS (Fig. 12a, b).

Fig. 12
figure 12

Island operation

This time frame belongs to the primary frequency control period. Also, MMS starts to regulate the dispatchable DG units to compensate active power. More power is distributed for the DG units. The power distribution factors are different: pf1: pf2 = 1:3, the DG generation is plotted in Fig. 12c, d. Since the charging level is still high, the BESS participates in the secondary control. The BESS with a lower charging level decreases the active power output earlier. The gap is filled by the dispatachable DG units. After about 23 min (t = 1100 s to t = 2500 s), the frequency returns to the normal range (0.9998 pu–1.0002 pu, dead band is set to ±0.002 pu).

6 Conclusion

A fuzzy logic based coordinated control scheme of a BESS and disptachable DG units is developed for microgrid. The coordinated control scheme is to mitigate the active power fluctuation at the PCC of the microgrid for the grid-connected operation, and maintain the frequency of the microgrid within the defined range for the island operation. In the control scheme, the SOC of the BESS is used as an input to the fuzzy logic based coordinated control in order to achieve good performance for fluctuation mitigation and frequency control with the BESS SOC constraint respected.

Case study results show that the proposed coordinated control scheme is able to mitigate the active power fluctuation at the PCC for the grid connected control and realize efficient frequency control for the island operation. It is also shown that the SOC level affects the contribution from the BESS for the fluctuation mitigation and the frequency control. The proposed coordinated control scheme can strike a balance between the technical performance and the physical constraint.