Real Time-Based under Frequency Control and Energy Management of Microgrids

: In this paper, an e ﬃ cient under frequency control and the energy management of a distributed energy resources (DERs)-based microgrid is presented. The microgrid is composed of a photovoltaic (PV), double-fed induction generator (DFIG)-based wind and diesel generator with critical and non-critical loads. The system model and the control strategy are developed in a real time digital simulator (RTDS). The coordination and power management of the DERs in both grid-connected and islanded operation modes are implemented. During power imbalances and frequency ﬂuctuations caused by fault or islanding, an advanced automatic load shedding control is implemented to regulate and maintain the microgrid frequency at its rated value. One distinct feature implemented for the load shedding operation is that highly unbalanced critical loads are connected to the microgrid. The diesel generator provides the required inertia in the islanded mode to maintain the microgrid rated frequency by operating in the isochronous mode. The International Council on Large Electric Systems (CIGRE) medium voltage (MV) test bench system is used to implement the DERs and their controller. The proposed control approach has potential applications for the complete operation of microgrids by properly controlling the power, voltage and frequency in both grid-connected and island modes. The real time digital simulator results verify the e ﬀ ectiveness and superiority of the proposed control scheme in grid connected, island and fault conditions.


Introduction
A small-scale power grid with distributed storage, distributed generation (DG) and loads connected to each other with a clear electrical boundary is a microgrid [1,2]. Microgrids are operated either in grid connected mode where power is exchanged with the main grid based on demand and supply [3,4], or in islanded mode where the microgrid acts as a power hub supplying the loads connected to it [5,6]. In 2011, IEEE approved a standard called IEEE 1547.4-2011 that will guide the design and operation of islanded systems with a high penetration of DG when integrated with the main electric power system [7]. A microgrid control must regulate the power, voltage, and frequency when in grid-connected or islanded operation within specified thresholds of power quality and reliability.
Microgrid control structures are classified as centralized and decentralized. In the centralized microgrid control, the central control unit coordinates the microgrid control and protection functions by sending operating commands to the local control units and circuit breakers [8,9]. In the decentralized microgrid control structures, each component is independently controlled by its local control unit, and does not coordinate with other local control units [10,11]. Typically, due to the widespread topology of power system networks and electrical coupling between power system components, microgrid implementations are a combination of centralized and decentralized control structures. A significant challenge to microgrid implementation is the stable control of voltage and frequency during grid-connected and islanded operation modes.
On the other hand, microgrid control should switch from grid-connected mode to autonomous mode with minimum voltage and frequency fluctuations. Managing the power balance between supply and demand is one of the most important evaluating criteria for the successful operation of the microgrid in both operating modes. The utility grid maintains the balance in the grid-connected mode [12,13], whereas, in the islanded mode, the microgrid has to do this, either by increasing generation or load shedding [14,15]. Load shedding schemes must be designed for cases where the power available from the distributed energy resources (DERs) is insufficient to supply the loads in the islanded microgrid [16,17]. Load shedding control should operate rapidly to restore the power balance in the microgrid to avoid voltage and frequency collapse [18][19][20][21]. Energy management of hybrid energy systems consisting of battery energy storage system is presented in [22,23]. The authors proposed a controller to ensure thermal safety and the reduction of overall driving cost. A review of the methods used to optimize the uncertainties involved in renewable sources such as wind and photovoltaic (PV) and the optimal power flow of those sources with energy storage is discussed in [24,25].
To cope with potential power deficits caused by microgrid islanding, a two-stage load shedding scheme is presented in [26]. However, the research focused on the curtailments of the loads in each stage and the impact of fault in island mode was not addressed. Adaptive distribution state estimator based under frequency load shedding controller is addressed in [27]. However, the distribution state estimator requires costly measuring devices which are uneconomical for practical applications. The authors in [28] proposed a controller to regulate frequency and bus voltages simultaneously within the permissible values, using load shedding schemes considering power and power factor of various load types. However, inverter based autonomous microgrids have low effective inertia and fail to regulate the frequency under severe fault conditions. A Monte Carlo simulation to continuously monitor load flow for the verification of the frequency and the voltage of all buses to design a global and local strategies of load shedding is presented in [29]. However, the authors focused only on the steady state analysis, and the transient response of the microgrid from grid connected to island mode was not addressed. Under voltage-frequency load shedding strategy using four variable/dimensional (4D) piecewise linear curves to determine the proper load shedding location and amount of load rejection in multi-bus microgrids is proposed in [30]. However, the communication protocol required for the proposed controller hinders it from practically implementation.
The load shedding operation in the islanded mode and the microgrid transient response during islanding have not been extensively studied in the previous research. In this paper, an efficient automatic load shedding control strategy for microgrids supplying critical and non-critical loads is proposed and implemented. The microgrid is based on PV, doubly fed induction generator (DFIG) based wind system and a diesel generator. The PV and the DFIG based wind sources are interfaced to the point of common coupling (PCC), using a voltage source converter (VSC) with decoupled d-q current control strategy. The main contributions of the paper are: • The coordination and power management between DERs during grid-connected and island modes is addressed.

•
During intentional islanding or fault, with insufficient DER power, an automatic under frequency load shedding is activated to disconnect the non-critical loads until the system frequency is restored.

•
The transient and load shedding operation under highly unbalanced loads connected to the microgrid is also investigated.

•
In island mode of operation, the DERs supply the loads and a controller is proposed and implemented for the diesel generator to control the frequency in isochronous mode, by maintaining a constant speed regardless of the load.
The rest of the paper is organized as follows. The proposed microgrid system structure is presented in Section 2. Section 3 describes the proposed controller. Results and discussions are presented in Section 4, while Section 5 concludes the paper.

System Configuration
The microgrid structure consisting of three DERs of PV, diesel generator and DFIG based wind system is shown in Figure 1. The eleven bus CIGRE medium voltage (MV) benchmark test system [31] is used for this study. However, due to the real time digital simulator (RTDS) node limitation, the system is reduced to seven bus, while maintaining the original structure. The 13.2 kV microgrid is connected to the 138 kV utility grid through a 138 kV/13.2 kV transformer. The point of common coupling (PCC) is at Bus 1 on the LV side of the transformer, and the microgrid is interconnected using a static switch (S 1 ). The 5.5 MVA diesel generator is connected to the microgrid at Bus 7 and performs the frequency and voltage control of the microgrid during the islanded operation. The 1.74 MW PV system is connected to the microgrid at Bus 3 and the 2 MW DFIG wind turbine generator is connected to Bus 5. The total balanced and unbalanced loads connected to the microgrid are provided in Tables 1 and 2 respectively. The PV and DFIG sources are interfaced to their corresponding buses using voltage source converters (VSC) with decoupled d-q current control strategy.  Dynamic models of the main components of the microgrid were developed using RSCAD. Under normal operation, the static switch S 1 is closed and the microgrid and the main grid operate in parallel supplying the loads together. The grid maintains the voltage and frequency at their corresponding rated values. In the islanded mode, the DERs supply the loads, and if the generated power from the DERs is insufficient to supply the loads or during fault events, an automatic load shedding control is activated to regulate the frequency to its nominal rated value by removing the non-critical loads. In this operating mode, the frequency is controlled and maintained at the rated 60 Hz by the diesel generator in isochronous mode, by keeping the original speed set point after a disturbance.

Proposed Control Scheme
Each DER is equipped with its own proposed and implemented controller. The DERs supply constant P-Q during grid connected mode, however, during islanded mode, the diesel generator maintains the system voltage and frequency at the rated nominal value. The details of the PV control can be found in [12]. The proposed controller for each component of the microgrid described in Section 2 and the load shedding scheme is provided in Sections 3.1-3.3.

Diesel Generator Model and Control
Diesel generators are used as backup power supply during power outages, or to generate power in off-grid applications, such as in remote locations or on large ships. Diesel generators are also used to control voltage, frequency and load regulation.
Currently, most microgrid implementations rely on diesel generating systems. Although diesel generators are not environmentally friendly, they are vital in controlling the microgrd frequency, as they provide the required inertia in the islanded mode by operating in the isochronous mode. The diesel generator used in this paper has two roles: firstly, it controls the frequency of the microgrid in the islanded operation, and secondly, it provides real and reactive power in both grid-connected and islanded operations. Figure 2 depicts the diesel generator M and is represented in the simulation by a synchronous machine. The diesel generator is controlled by the excitation system and the speed governor. The speed governor driven by a diesel engine regulates the machine frequency. Figure 3 presents the diesel generator and speed governor controller. The input parameters to Figure 3 are the speed reference ω ref and the diesel generator speed ω both in pu, and the output is the mechanical torque Tpu. The diesel generator operates in speed-droop mode and supplies a preset reference power at the grid frequency in grid-connected operation, and in islanded operation, it maintains a constant frequency, irrespective of the load by operating in isochronous mode. The switch in Figure 3 is to select the operation of the diesel generator in island mode or grid connected mode.

Doubly Fed Induction Generator (DFIG) Model and Control
The doubly fed induction generator is used to convert the wind turbine's mechanical power to electrical power. The output power generated from a horizontal axis wind turbine is given by: where, C p is power coefficient, ρ is the density of air, A is the swept area and V is the wind velocity. C p is a function of the tip speed ratio λ and the blade pitch angle β, which is the angle between the wind speed direction and the surface of the wind turbine blades [32]. Figure 4 shows a wind turbine system based on DFIG, where its stator is directly connected to the grid through a transformer and its rotor is interfaced to the grid using two power converters connected back to back with a common DC link voltage. The DFIG allows variable speed operation over a slip speed range (typically 0.7-1.2 pu), and has better controllability than other wind turbine generators, without the need for additional mechanical parts and capacitors for reactive power compensation. To limit the generated power from the wind turbine above the rated wind speed, pitch angle control is implemented. For wind speeds between the cut-in speed V c and rated speed V r range, the pitch angle is set to zero, and a maximum power point tracking (MPPT) control strategy is used to track the maximum power of the wind turbine at the given wind speed. Commonly used MPPT methods are optimal tip speed ratio, where the optimum rotor speed for a given wind speed is calculated based on the known optimum tip speed ratio. The turbine power feedback control measures the rotor speed at a given wind speed, and calculates the maximum power from the known power curve of the wind turbine. The optimal torque control, which uses the idea that for a given gearbox ratio, the turbine's mechanical torque and speed can be converted to the generator torque and speed from which the optimum torque can be calculated using the generator rated parameters, is presented in Equations (2)- (5).
where P m,max is the maximum power, k opt is the optimum power coefficient, ω m,opt is the optimum turbine speed, T m,max is the maximum torque. The optimum torque control (OTC) is calculated from Equation (3) and shown in Figure 5, implemented in this work. The input to the torque control presented in Figure 5 is the turbine speed, ω rpu , and the output is the electrical torque reference, T e_REF , that indicates the maximum power in the wind.

Grid Side Converter (GSC) Control
The two functions of the GSC are; to provide a reactive power support to the grid voltage at the PCC, and to control the DC link voltage to a constant reference value. The decoupled d-q current mode control is used for the GSC to allow the independent control of the DC link voltage and reactive power injected to the grid during fault events. The d axis control regulates the DC bus voltage to a constant reference voltage V DCREF , whereas the reactive power and consequently the power factor of the DFIG system is controlled by the q axis current controller. The reactive power reference Q REFG is set to zero for unity power factor. Figure 6 shows the decoupled current control implemented for the GSC.
Where V DC is the DC link voltage, V DCREF is the reference DC link voltage, ω is the angular frequency, L is the line inductance, V LD is d-axis GSC voltage, V LQ is q-axis GSC voltage. The voltage control signals mDG and mDQ are then converted back using dq/abc and firing pulses are generated for the GSC.

Rotor Side Converter (RSC) Control
The function of the RSC is to control the electrical torque and power factor of the DFIG, which respectively controls the real and reactive power exchanged between the rotor and the grid. The equations that describe the relationship between the electrical torque, T e in the d-q reference axis is given by: T e = −1.5PL m i ms i qr (6) where L m is the magnetizing inductance; i ms is the stator magnetizing current; i qr is the q axis rotor current; P is the number of poles. The rotor phase currents are transformed to the d-q axis using the slip angle θ slip which is the angle between the stator flux vector θ s and the rotor angle θ r . Figure 7 provides the RSC control. ω slip is the slip frequency; ω s , ω r are the stator and rotor angular frequencies. T e,REF is obtained using the optimum torque MPPT control shown in Figure 5. The output of the RSC current control m DR , and m QR rotor voltage references are used to create the rotor modulation waveforms to generate the switching sequence for the RSC. The details of the DFIG control can be found in [33].

Load Shedding Scheme
When the microgrid is islanded or during a fault in island mode, a frequency fluctuation arises due to the power unbalance between the load and available generation from the DERs. In order to prevent the frequency collapse, the microgrid should be equipped with a fast and automatic load shedding scheme. The two vastly used load shedding techniques are static and dynamic schemes [34,35]. However, the most common practical load shedding scheme is the static one, and hence an advanced static load shedding scheme is implemented in this work. Four main steps are involved in designing a static load shedding scheme. The first step is to calculate the amount of load to be shed, while the second step involves in determining the load shedding stages with their corresponding load size to be shed at each stage. The third step involves in setting the thresholds for the frequency and rate of change of frequency, while the last step sets the time delay. The priority of non-critical loads is assigned at the design stage, considering the loads relative importance and the normal loading. If the load needs continuous power supply, it will be assigned as a critical load. Loads assigned as critical will not be shedded, irrespective of the microgrid operation mode. In practical systems, time delayed back up relays are provided at each stage of the load shedding scheme to avoid system collapse due to slow frequency drifts.
The load shedding stages, amount of load to be shed, the frequency and rate of change of frequency limits and time duration settings are shown in Table 3. Figure 8 depicts the automatic load shedding logic implemented in RTDS, where the inputs are both frequency and rate of change of frequency (ROCOF). The load assigned the first priority will be tripped by the controller when the frequency goes below a preset value, and if the rate of change of frequency is more than a pre-set value. If the frequency drops more, the loads assigned to the next priority will be removed, and this continues until the nominal microgrid frequency is attained. Loads connected to Bus 1-4 provided in Table 1 are non-critical loads and are modeled as switched RL passive loads, which are allowed to shed if needed, while Table 2 provides the unbalanced loads located on Bus 5-7 and are modeled as non-switchable dynamic loads representing the critical loads in the network. The proposed method is economically feasible for practical implementation, as the materials required, such as relays, timers and switches are easily available in the market. The proposed control approach does not need a dedicated communication channel that is costly for power system owners to implement.

Results and Discussion
The microgrid shown in Figure 1 is implemented in RSCAD. In grid-connected mode, the main switch S 1 is closed and the microgrid frequency is determined by the grid. The loads connected to the microgrid in this mode are supplied by both the gird and DERs. The DFIG based wind and PV systems control their real and reactive power output using the control schemes described in Section 3, while the diesel generator operates in droop control to exchange real and reactive power with the grid. The diesel generator has been set to produce 3 MW and 1.74 MVar, whereas the PV and wind operate as a constant P-Q source at unity power factor and rated power of 1.74 MW and 2 MW, respectively. The DERs generated a total active power of 6.74 MW, and the total load connected to the microgrid was around 7.2 MW. Since the power generated from the DERs is insufficient for the loads, the remaining power of the loads and the transmission line losses comes from the main grid.
To demonstrate the effectiveness of the proposed controllers, the following tests have been applied.
(A) Grid-connected to islanded mode switching (B) Load shedding control during fault in islanded mode

Grid-Connected to Islanded Mode Switching
In grid connected mode, the diesel generator operates in droop control to exchange real and reactive power with the grid, and the grid controls the voltage and frequency. Opening the circuit breaker switch S 1 makes the microgrid in islanded mode of operation. In island mode, the diesel generator operates in the isochronous mode. In this mode, the generator maintains a constant speed and hence frequency, regardless of the load (from no-load to full load).
Once the grid is disconnected, both voltage and frequency deviate due to excessive loading on the DERs. Shown in Figure 9 is the frequency before and after the microgrid is islanded. The load shedding control is activated when both the frequency and rate of change of frequency fall within the specified limits and time duration. Since the microgrid frequency is regulated close to 60 Hz by the diesel generator, and the total microgrid load could be supplied by the DERs, the load shedding scheme is not activated. After islanding, the grid reactive power is lost, which causes a voltage drop in Bus 1-7, and this voltage drop in turn causes a drop in the total power consumed by the loads, as presented in Figure 10. The PV and DFIG are operated at unity power factor with constant P-Q control mode, and are not participating in regulating the bus voltages as depicted in Figure 11. The PV and the DFIG generated an active power of 1.74 MW and 2 MW, respectively. The total load dropped from 7.2 MW in grid connected scenario to 6.75 MW in island mode, because of the loss of the grid reactive power. The power generated from the diesel generator has increased in the island mode to meet the load demand, and the reactive power lost from the grid disconnection is also picked up by the diesel generator as shown in Figure 12 which presents the total reactive power of the DERs and the loads. The active powers of the constant impedance loads connected on Bus 1-4 are affected by the voltage drop as presented in Figure 13. The loads on Bus 5-7 are represented as dynamic loads, which, despite the drop in the bus voltages, keep their active power at the power set points as shown in Figure 14. The microgrid voltage at the PCC is kept at its rated value, as presented in Figure 15.

Load Shedding Control during Fault in Islanded Mode
While in the island mode, a three-phase fault of six cycles (0.1 s) has been applied at Bus 6, with a fault logic shown in Figure 16. The system response is provided from Figures 17-22. The frequency and speed of the diesel generator for the applied fault is presented in Figure 17. The frequency and rate of change of frequency now fall within the specified limit and time duration provided in Table 3, and an automatic load shedding is activated. The loads are shed in stages to restore the frequency, and consequently the stability of the microgrid network. To restore the frequency to the nominal value, loads 1 and 2 are shed automatically, as shown in Figure 18. Figure 19 presents the power generated from the DERs and the total power consumed by the loads. Once the two loads are removed, the power generated from the DERs is sufficient to supply the loads. The individual powers generated from the PV array, the wind and the diesel generator are depicted in Figure 20. Similar to the previous scenarios, the PV and the DFIG generated their corresponding powers with the proposed constant P-Q control. Figure 21 depicts the power consumed by the critical loads connected at Bus 5-7. The microgrid was able to ride through the fault with the reactive power support from the diesel generator, and the corresponding voltage for the applied fault is provided in Figure 22. Once the frequency is restored to the rated value, the disconnected loads can be connected back using a switch.

Conclusions
An efficient advanced automatic load shedding and power management control scheme of a microgrid based on PV, DFIG based wind, diesel generator and local loads is presented in this paper. The CIGRE medium voltage benchmark test system is used to demonstrate the controller's capability. The microgrid voltage and frequency is maintained at the rated values by the grid during grid connected mode and in the island mode by the diesel generator in isochronous operation. In the island mode, the diesel generator provides reactive power to regulate the voltage, and maintains a constant speed irrespective of the load to regulate the microgrid frequency. In the island mode, whenever the power generated from the DERs is insufficient to support the loads, the load shedding control is activated to restore the frequency by removing the non-critical loads. The results show that the proposed control scheme manages the microgrid in both grid connected and island modes and improves the system stability and reliability. The advantage of the proposed approach is that the microgrid is fully controlled in grid connected, island and during fault events. The proposed load shedding approach does not need a dedicated communication channel that makes it economical for practical implementation. The cons of the proposed approach are that the critical and non-critical loads have to be assigned at the design stage of load shedding.