Improving Microgrid Frequency Regulation Based on the Virtual Inertia Concept while Considering Communication System Delay

Frequency stability is an important issue for the operation of islanded microgrids. Since the upstream grid does not support the islanded microgrids, the power control and frequency regulation encounter serious problems. By increasing the penetration of the renewable energy sources in microgrids, optimizing the parameters of the load frequency controller plays a great role in frequency stability, which is currently being investigated by researchers. The status of loads and generation sources are received by the control center of a microgrid via a communication system and the control center can regulate the output power of renewable energy sources and/or power storage devices. An inherent delay in the communication system or other parts like sensors sampling rates may lead microgrids to have unstable operation states. Reducing the delay in the communication system, as one of the main delay origins, can play an important role in improving fluctuation mitigation, which on the other hand increases the cost of communication system operation. In addition, application of ultra-capacitor banks, as a virtual inertial tool, can be considered as an effective solution to damp frequency oscillations. However, when the ultra-capacitor size is increased, the virtual inertia also increases, which in turn increases the costs. Therefore, it is essential to use a suitable optimization algorithm to determine the optimum parameters. In this paper, the communication system delay and ultra-capacitor size along with the parameters of the secondary controller are obtained by using a Non-dominated Sorting Genetic Algorithm II (NSGA-II) algorithm as well as by considering the costs. To cover frequency oscillations and the cost of microgrid operation, two fitness functions are defined. The frequency oscillations of the case study are investigated considering the stochastic behavior of the load and the output of the renewable energy sources.


Introduction
Microgrids are small power networks that are composed of loads, distributed generations, energy storage resources, telecommunication facilities and other infrastructure [1,2]. These networks are protected from damages resulting from the faults of the upstream network. The stochastic variations of generation units and load profiles [3,4] are common issues in these networks. The availability of different forms of energy storage in microgrids as well as their contribution to electricity markets at To enhance the frequency behavior of the microgrid, communicational infrastructure with minimum delays is required to update information quickly.
With considering the challenges that discussed above, this paper aim is determining optimal virtual inertia, comunication delay time and frequency control parameters simultaneously that are not investigated in privious papers. The proposed strategy guarantees frequency stability and decreases the cost of the microgrid's infrastructure. A Minimum ultra-capacitor size and communication delay value are selected in the proposed approach to decrease the cost of the microgrid's infrastructure. Also, the stable and unstable regions for different time delay and virtual inertia values are derived.
Multi-objective optimization methods are used to determine the parameters used in the load-frequency strategies to optimize the several objectives discussed previously [30]. The NSGA-II algorithm is a popular and justified optimizing algorithm [31,32]. Therefore, The NSGA-II algorithm is used in this paper to address the ultra-capacitor size as virtual inertia and the delay of the telecommunications system.

Case Study
Here, a microgrid system, which is isolated from the main grid, is considered for this case study. The islanded system consists of power generation, storage units, and telecommunication configurations. Diesel Generator Unit, Fuel Cell Unit, Solar Unit, and Wind Unit are responsible for power generation. The electrolyze unit is also use to absorb extra power. Ultra-capacitors are additionally used to generate and/or absorb power quickly in order to increase the virtual inertia of the network.
The central controller needs frequency information to appropriately order the microgrid power generation and absorption units. As discussed in reference [33], frequency and power information are to be sent or received with a specific time delay by a telecommunications platform, which is very effective for the stability of the microgrid. The communication delay with other delay sources are defined as a measurement delay in reference [34] and applied for primary and secondary controllers. The microgrid mentioned before is shown in Figure 1. ∆f is the frequency deviation and input signal of the controller, and the changes in the power generation and storage units as the output of this system. M represents the total inertia of a microgrid. When a difference between the generation and consumption occurs because of the load along with power generation increasing/decreasing, the frequency deviation of the microgrid depends on the inertia value and the load demand. It is assumed that the solar unit has variable and uncontrollable power. The central controller block sets a PI controller output for each power unit. The central controller unit block receives the network frequency information with a delay. The power and frequency information are passed through with a telecommunication system delay. The Diesel Generator Unit, Fuel Cell Unit, and electrolyze unit are equipped with primary and secondary frequency controllers. The Ultra-Capacitor unit participates in primary frequency control using a frequency signal. The parameters of this microgrid and power units are given in Table 1.   The diesel generators are used to compensate the power required by the microgrid by using a governor and a speed drop system. The governor controls the fuel input of the fuel engine by adjusting the fuel throttle mechanism. The gasoline or gas engine acts as a turbine and moves a synchronous generator. The diesel generator governor can be modeled by a first-order conversion function that is described in Equation (1).
Similarly, the turbine of this generator is also modeled by the first order conversion function.
Due to the series performance of the mechanical and electrical unit of the diesel generator, the general conversion function is as follows.

Modeling the Power Source of Diesel Generator
The diesel generators are used to compensate the power required by the microgrid by using a governor and a speed drop system. The governor controls the fuel input of the fuel engine by adjusting the fuel throttle mechanism. The gasoline or gas engine acts as a turbine and moves a synchronous generator. The diesel generator governor can be modeled by a first-order conversion function that is described in Equation (1).
Similarly, the turbine of this generator is also modeled by the first order conversion function.
Due to the series performance of the mechanical and electrical unit of the diesel generator, the general conversion function is as follows.
The control commend to the diesel generator cannot be transferred to its output immediately because of the inherent delay of mechanical systems and generation rate constraint (GRCs). Therefore, these limitations are also applied to the Diesel Dynamic Model. The complete dynamic model of the diesel generator is shown in Figure 2. The control commend to the diesel generator cannot be transferred to its output immediately because of the inherent delay of mechanical systems and generation rate constraint (GRCs). Therefore, these limitations are also applied to the Diesel Dynamic Model. The complete dynamic model of the diesel generator is shown in Figure 2.

Fuel Cell
The fuel cell is one of the static power generation equipment that converts the chemical energy stored in hydrogen into DC electrical energy. When the generated power of the renewable energy source is less than the power required for electric loads or the consumption of loads at their peak, the fuel cell begins to generate power by injecting hydrogen stored in its hydrogen tank. Since the ultimate performance of this system is similar to the voltage source inverter, the transfer function of this power source will be in the form of the first-order model as follows: The generated power and its increase rate limit are also applied for the fuel cell. The dynamic model of a fuel cell is illustrated in Figure 3.

Electrolyze Unit
An electrolyze unit is a form of equipment that stores the extra energy of renewable energy sources. Water is decomposed into hydrogen and oxygen by passing the current between two separated electrodes. The hydrogen produced in the chemical reaction is stored in a tank and used as fuel for a fuel cell to meet load demand.
The water electrolyzes unit acts as a DC voltage source and requires a VSC inverter to be connected to a microgrid. Consequently, the transfer function will be as follows:

Fuel Cell
The fuel cell is one of the static power generation equipment that converts the chemical energy stored in hydrogen into DC electrical energy. When the generated power of the renewable energy source is less than the power required for electric loads or the consumption of loads at their peak, the fuel cell begins to generate power by injecting hydrogen stored in its hydrogen tank. Since the ultimate performance of this system is similar to the voltage source inverter, the transfer function of this power source will be in the form of the first-order model as follows: The generated power and its increase rate limit are also applied for the fuel cell. The dynamic model of a fuel cell is illustrated in Figure 3.
because of the inherent delay of mechanical systems and generation rate constraint (GRCs). Therefore, these limitations are also applied to the Diesel Dynamic Model. The complete dynamic model of the diesel generator is shown in Figure 2.

Fuel Cell
The fuel cell is one of the static power generation equipment that converts the chemical energy stored in hydrogen into DC electrical energy. When the generated power of the renewable energy source is less than the power required for electric loads or the consumption of loads at their peak, the fuel cell begins to generate power by injecting hydrogen stored in its hydrogen tank. Since the ultimate performance of this system is similar to the voltage source inverter, the transfer function of this power source will be in the form of the first-order model as follows: The generated power and its increase rate limit are also applied for the fuel cell. The dynamic model of a fuel cell is illustrated in Figure 3.

Electrolyze Unit
An electrolyze unit is a form of equipment that stores the extra energy of renewable energy sources. Water is decomposed into hydrogen and oxygen by passing the current between two separated electrodes. The hydrogen produced in the chemical reaction is stored in a tank and used as fuel for a fuel cell to meet load demand.
The water electrolyzes unit acts as a DC voltage source and requires a VSC inverter to be connected to a microgrid. Consequently, the transfer function will be as follows:

Electrolyze Unit
An electrolyze unit is a form of equipment that stores the extra energy of renewable energy sources. Water is decomposed into hydrogen and oxygen by passing the current between two separated electrodes. The hydrogen produced in the chemical reaction is stored in a tank and used as fuel for a fuel cell to meet load demand.
The water electrolyzes unit acts as a DC voltage source and requires a VSC inverter to be connected to a microgrid. Consequently, the transfer function will be as follows: The power generation rate limits are also considered in the water electrolyze model. Figure 4 shows the dynamic model of the electrolyze unit.
The power generation rate limits are also considered in the water electrolyze model. Figure 4 shows the dynamic model of the electrolyze unit.

Model of Renewable Energy Sources
In case of renewable energies, the MPPT strategy is implemented, so controllability will not be possible for wind/PV power generation [6,7]. These systems are not participating in frequency control.

2.5.Ultra-capacitor
The Ultra-capacitors plays an important role in increasing the virtual inertia of the network, either by power injection or by absorption. The network exchange power of the Ultra-capacitor is directly related to the derivation of frequency fluctuations. These units have very little delay in response to frequency oscillations. Thus, the dynamic model of ultra-capacitors can be illustrated in Figure 5 [27].

Telecommunication System Delay
The telecommunication system is used to transfer microgrid information to the central controller. In reference [34], a first order transfer function is considered for measurement of a delay that covers the communication delay. Therefore, for the simplification of analyses, all delays in communication units modeled as the first-order function in this paper, which is expressed in Equation (6). It should be noted that any other time delay model can be used and the optimizing algorithm can determine the optimum parameters of the selected model.

Model of Renewable Energy Sources
In case of renewable energies, the MPPT strategy is implemented, so controllability will not be possible for wind/PV power generation [6,7]. These systems are not participating in frequency control.

Ultra-Capacitor
The Ultra-capacitors plays an important role in increasing the virtual inertia of the network, either by power injection or by absorption. The network exchange power of the Ultra-capacitor is directly related to the derivation of frequency fluctuations. These units have very little delay in response to frequency oscillations. Thus, the dynamic model of ultra-capacitors can be illustrated in Figure 5 [27].
The power generation rate limits are also considered in the water electrolyze model. Figure 4 shows the dynamic model of the electrolyze unit.

Model of Renewable Energy Sources
In case of renewable energies, the MPPT strategy is implemented, so controllability will not be possible for wind/PV power generation [6,7]. These systems are not participating in frequency control.

2.5.Ultra-capacitor
The Ultra-capacitors plays an important role in increasing the virtual inertia of the network, either by power injection or by absorption. The network exchange power of the Ultra-capacitor is directly related to the derivation of frequency fluctuations. These units have very little delay in response to frequency oscillations. Thus, the dynamic model of ultra-capacitors can be illustrated in Figure 5 [27].

Telecommunication System Delay
The telecommunication system is used to transfer microgrid information to the central controller. In reference [34], a first order transfer function is considered for measurement of a delay that covers the communication delay. Therefore, for the simplification of analyses, all delays in communication units modeled as the first-order function in this paper, which is expressed in Equation (6). It should be noted that any other time delay model can be used and the optimizing algorithm can determine the optimum parameters of the selected model.

Telecommunication System Delay
The telecommunication system is used to transfer microgrid information to the central controller. In reference [34], a first order transfer function is considered for measurement of a delay that covers the communication delay. Therefore, for the simplification of analyses, all delays in communication units modeled as the first-order function in this paper, which is expressed in Equation (6). It should be noted that any other time delay model can be used and the optimizing algorithm can determine the optimum parameters of the selected model.

Optimization Algorithm
The NSGA-II algorithm is used in this paper. The first goal is reducing the frequency fluctuations of the microgrid. Equation (7) is considered for this aim. The algorithm attempts to minimize (7) so the frequency oscillation will be in a minimum state. In addition, the second goal is determining the minimum ultra-capacitor size and the delay value of telecommunication systems to reduce the microgrid infrastructure cost. For a low ultra-capacitor size and the high delay value of telecommunication systems, the operation cost will be low. These two goals are expressed in two separate objective functions as below: In the above Equations, i.e., (7) and (8), ∆ f stands for frequency fluctuations, H Vir is the virtual inertia, T d is the delay of telecommunication systems, T d_avarge is an average delay of telecommunication systems, and N is the number of samples in the simulation process.
The accuracy of resources and microgrid frequency response models has been investigated in the previous literature. These models have been used for the optimization process. The upper and lower limits of the decision variables of the optimization problem are listed in Table 2. The NSGA-II algorithm, like the conventional genetic algorithm, uses mutation and crossover operators at each stage. The algorithm uses repetitive loops to obtain the optimum population. The set of solutions for the right choice must first be ranked and each solution with fewer ratings is a better solution. This algorithm also begins its operation with the initial population, based on the values of the fitness functions. The solutions are ranked with the use of the mechanism of crowding distance and dominance, and based on this, a new population is generated with crossover and mutation functions [35]. As long as the two objective functions reach convergence, the algorithm should be continued. Figure 6 shows the convergence of these two conflicting functions in the the optimization algorithm steps.The multi-objective optimization is implemented in MATLAB/SIMULINK software To get better solutions To get better solutions

Simulation Results
The frequency control system implemented in the MATLAB / SIMULINK software. The system parameters are obtained using the NSGA-II algorithm. The NSGA-II algorithm is used to optimize two conflict objectives, i.e. operation cost reduction and frequency oscillation reduction. The optimizing processes are showed as Pareto curves. The final Pareto curve is shown in Figure 7. The selected solution presented in the Pareto curve is considered an equally good solution. Low

Simulation Results
The frequency control system implemented in the MATLAB / SIMULINK software. The system parameters are obtained using the NSGA-II algorithm. The NSGA-II algorithm is used to optimize two conflict objectives, i.e. operation cost reduction and frequency oscillation reduction. The optimizing processes are showed as Pareto curves. The final Pareto curve is shown in Figure 7. The selected solution presented in the Pareto curve is considered an equally good solution. Low frequency oscillation with low operation costs can be derived in the selected point. The parameters values for the selected solution listed in Table 3. The optimum and non-optimum values are listed in Table 3. The non-optimum parameters were obtained by the trial and error method, reducing the infrastructure costs. The system was simulated in three scenarios: Scenario I: In the first scenario, the performance of the microgrid was simulated through the application of a telecommunication networks delay with non-optimum parameter values. Scenario II: In the second scenario, the performance of the microgrid with the optimum control parameters, virtual inertia and telecommunication systems delay values is verified through simulation setups. Scenario III: In the third scenario, the delay of the telecommunication system is not considered while the optimum parameters are applied in the simulated system.    These scenarios show the effectiveness of the selected solution in overcoming frequency oscillation. In all the scenarios, the load and renewable energy source step changes are considered in the same profile. The magnitude of the load demand is equal to 1/1 per unit. When the simulation time reaches 1500 (s), it will reach 0.9 per unit. In contrast, the generation of renewable energy units is equal to one per unit. The frequency behavior of the microgrid in this section is shown in Figure 8. The microgrid frequency fluctuation has decreased with the application of optimum parameters and can be clearly seen in Figure 8. Meanwhile, the telecommunication system delay increases the undershoot and settling time of the frequency fluctuation. Up to t = 1500 s, diesel generator and fuel cell are expected to generate power, and after this instance the electrolysis unit is expected to absorb unbalanced power. The dynamic responses of the power sources and the electrolyze unit, while applying the optimum parameters, can be investigated using simulation results. Output powers of the source for the diesel generator, the fuel cell, and the electrolyze unit are shown in Figures 9-11, respectively. As can be seen from these figures, the electrolysis unit and diesel generator have the fastest and the slowest dynamic behavior responses, respectively. In the initial simulation time, the fuel cell injects power to grid with a high rate to compensate frequency drooping. Up to t = 1500 s, in steady state condition, the diesel generator and fuel cell contribute in power balancing and frequency stability.
Due to the high penetration of renewable energy sources, the actual inertia of the microgrid systems is small. This phenomenon shows its effect on steady frequency oscillation and high overshoot and undershoots in microgrid frequency responses. By increasing the communication delay, the stability margin of the microgrid can be improved. By increasing the microgrid inertia by increasing the virtual inertia value, the microgrid frequency is made less sensitive to the increasing commendation time delay. The studied microgrid behavior, for a different time delay value, is stable under the special condition that is shown in Figure 12. Two areas are distinguished in this figure. For a given H vir value, if the time delay value is in the blue area, the system will be stable. The maximum virtual inertia margin that guarantees the stability is shown in Figure 13. To derive Figures 10 and 11, the conventional repetition process is used. The virtual inertia and time delay step changes are considered as being 0.5 Hz and 0.025 s, respectively.
With respect to general load and power generation profile, shown in Figure 14, the frequency behaviour of the grid while applying the variable profiles of the load power and power generated by renewable energy sources is shown in Figure 14. The frequency behavior of the grid with optimum parameters (Figure 15) shows that the proposed strategy is more effective than the non-optimum based controller in damping frequency oscillation.
under the special condition that is shown in Figure 12. Two areas are distinguished in this figure. For a given Hvir value, if the time delay value is in the blue area, the system will be stable. The maximum virtual inertia margin that guarantees the stability is shown in Figure 13. To derive Figure 10 and 11, the conventional repetition process is used. The virtual inertia and time delay step changes are considered as being 0.5Hz and 0.025s, respectively.
With respect to general load and power generation profile, shown in Figure 14, the frequency behaviour of the grid while applying the variable profiles of the load power and power generated by renewable energy sources is shown in Figure 14. The frequency behavior of the grid with optimum parameters (Figure 15) shows that the proposed strategy is more effective than the non-optimum based controller in damping frequency oscillation.            In real grids, the output power of the renewable energy sources and load power consumption   In real grids, the output power of the renewable energy sources and load power consumption are stochastic. In this paper, the Gaussian distributions are assumed for the random output of the renewable energy sources and load profile, which expressed mathematically in Equations (9) and (10), respectively.
The frequency behavior of a microgrid while applying the specific uncertainties, optimum and non-optimum parameters is simulated and the results of these simulations are shown in Figure 16. The optimum-based controller can overcome power-unbalancing events and stabilize the frequency. In real grids, the output power of the renewable energy sources and load power consumption are stochastic. In this paper, the Gaussian distributions are assumed for the random output of the renewable energy sources and load profile, which expressed mathematically in Equations (9) and (10), respectively.
The frequency behavior of a microgrid while applying the specific uncertainties, optimum and non-optimum parameters is simulated and the results of these simulations are shown in Figure 16. The optimum-based controller can overcome power-unbalancing events and stabilize the frequency.

Conclusion
A microgrid with controllable and uncontrollable sources, including solar, wind, a diesel generator, fuel cell, and an electrolyze unit, was investigated in this paper. The frequency stability of the grid was investigated while considering the ultra-capacitor unit and time delay of communication systems. The communication delay decreases the system function's ability to control the frequency. In this paper, tuning the virtual inertia constant and the time delay value in the communication together with the parameters of the load-frequency controllers of the power sources was considered to improve the frequency stability of low inertia microgrids with the presence of the time delay in the communication network. In fact, the best way to tune these unknown parameters has been determined as a multi-objective optimization problem (NSGA-II algorithm), which considers both frequency stability and economic concerns. Reducing delay in telecommunication

Conclusions
A microgrid with controllable and uncontrollable sources, including solar, wind, a diesel generator, fuel cell, and an electrolyze unit, was investigated in this paper. The frequency stability of the grid was investigated while considering the ultra-capacitor unit and time delay of communication systems. The communication delay decreases the system function's ability to control the frequency. In this paper, tuning the virtual inertia constant and the time delay value in the communication together with the parameters of the load-frequency controllers of the power sources was considered to improve the frequency stability of low inertia microgrids with the presence of the time delay in the communication network. In fact, the best way to tune these unknown parameters has been determined as a multi-objective optimization problem (NSGA-II algorithm), which considers both frequency stability and economic concerns. Reducing delay in telecommunication systems and increasing virtual inertia values, while applying the ultra-capacitor, can improve the damping of frequency fluctuations; however, it also increases the cost of grid operation. With the tuning of the control system parameters, time delay value and the virtual inertia value, the aforementioned challenges are solved. In the studied microgrid, the simulation was performed in MATLAB/Simulink numerical software. Investigation results prove the effectiveness of this network strategy to overcome frequency fluctuations.