Constant Frequency Control Strategy of Microgrids by Coordinating Energy Router and Energy Storage System

In this paper, a constant frequency control strategy of a microgrid by coordinating energy router (ER) and energy storage system is proposed to solve the frequency fluctuation problem of microgrid, in which ER is the core of the energy management system.+e interface converter of ER connected to the microgrid adopts the virtual synchronous generator (VSG) control, which adjusts the mechanical reference power in real time according to the state of charge (SOC) of the energy storage. +e energy storage system adopts constant voltage and constant frequency (V/F) control to maintain the frequency and voltage stability of microgrid. +e energy storage system with fast charge and discharge responds to the power fluctuation of the microgrid. ER maintains the stability of the energy storage capacity through bidirectional power regulation. When the energy storage system fails, the frequency and voltage droop characteristics of ER controlled by VSG will play a role in maintaining the stable operation of the microgrid. By the coordinating control strategy, themaximum efficiency of intermittent distributed energy can be guaranteed, and the stability, reliability, and grid-connection friendliness of the microgrid operation can be improved. Simulation results prove the effectiveness of the proposed control strategy.


Introduction
In recent years, due to the rapid development of distributed power generation technology, a large number of distributed new energy grid-connection requirements have emerged. However, due to the intermittent and fluctuating characteristics of new energy sources such as photovoltaics, a large number of new energy sources directly incorporated into the grid will bring severe challenges to the stability of traditional power systems. e microgrid has become one of the effective ways to dissipate distributed energy sources (DER) [1,2]. Among them, microgrids with ER as the core have been proposed successively [3][4][5].
In this kind of microgrid, DER, local loads, and battery energy storage system (BESS) are usually connected to the main grid through the low-voltage AC interface provided by the ER. e ER transmits and manages the surplus and deficit power of distributed power after local absorption and completes the functions of initiative adjustment of electric energy and adjustment of electric power quality.
To control the frequency stability of the microgrid, we need an effective control strategy. e load in the microgrid is uncontrollable. At the same time, to avoid wind and light abandonment, distributed power generation units often use maximum power point tracking (MPPT) control [6,7]. erefore, neither load nodes nor distributed generation nodes can participate in frequency regulation without the use of deloading control. To improve the operational performance of the microgrid, we used the energy storage system as an energy buffer device to suppress power fluctuations. At the same time, the energy storage system is jointly powered with ER and DER [8][9][10]. erefore, the microgrid with the ER as the core needs to control the energy storage unit node and the ER node to achieve the frequency stability of the microgrid. How to coordinate and control ER, distributed energy, and related energy storage devices has become an urgent problem to be solved.
In the current research, there are two main research approaches to ensure the stable operation of the microgrid in the complex network connected with many distributed power sources. One is to make the output voltage and frequency of each distributed network node be the same. Many scholars have proposed the edge consensus algorithms [11,12], which ensure that the network system can still maintain the consistency of output voltage and frequency of each node under various disturbances; to improve the stability of the system, many scholars put forward the global robust control algorithm of the network system [13]. e other is by coordinating the power of the units in the microgrid. e authors in [14,15] propose to combine the energy storage system with wind turbines and other DER to reduce the power fluctuation of the microgrid. is scheme can make the wind turbine and other DER output at maximum power, and the energy storage system quickly absorbs or releases the surplus and deficiency power of the microgrid, which can avoid the frequency instability of microgrid caused by the power fluctuation of DER. e authors in [16] propose a master-slave control strategy, which controls the output of the ER as a constant voltage and constant frequency voltage source and the BESS control as a current source with controllable power. Under this control strategy, the microgrid can keep the frequency constant. However, because there is no local frequency variable as the judgment index of ER and BESS outputs, power allocation can only be implemented through the upper energy management system, the control is complex and transitionally dependent on communication, and the reliability is not high. Also, to solve the problem that the network system can still achieve synchronization in the case of coupling resonance or disturbance, the authors in [17,18] propose adaptive synchronization algorithms, respectively. Lv et al. [19] introduced the VSG control technology into the control of the ER interface, which enhanced the inertial damping of the system and reduced the impact of the wind-wave output on the main grid. However, the coordinated operation of the ER and energy storage was not involved in the paper. However, the coordinated operation of the ER and the energy storage system was not involved in this paper.
Based on the above analysis, this paper proposes a constant frequency control strategy of the microgrid by coordinating the ER and the energy storage system. We can refer to the method of virtual reactance to limit fault current in [20] and introduce VSG control into the low-voltage AC output interface of ER to increase the inertia of the microgrid system and reduce the large frequency fluctuations caused by the load disturbance. e ER adjusts the SOC of the energy storage based on weak communication. e BESS adopts constant voltage and frequency (V/F) control to provide constant voltage and frequency for the microgrid. On the one hand, the proposed control strategy can solve the problem of frequency fluctuation of microgrid and, at the same time, avoid overcharging or overdischarging of the energy storage system. On the other hand, when ER or RSS fails, there is no need to switch control strategies, ensuring the smooth operation of the microgrid. Finally, the operation results of the proposed control strategy are verified by simulation.

Description of the Microgrid System
e typical microgrid structure with the ER as the core is shown in Figure 1(a).
DC loads such as charging pile need to be extracted through AC/DC converter, and AC load such as the AC motor can be directly connected with a bus. e DER such as wind power and photovoltaic power is connected to an AC bus through DC/AC and AC/DC/AC converters, respectively, and the BESS is connected to microgrid through DC/ AC converters to jointly supply power for the local loads. As an energy hub, ER connects the main grid and the microgrid, and its structure is shown in Figure 1(b). ER consists of three parts: the input stage, isolation stage, and output stage. e input stage is cascade-connected by the H-bridge AC/DC rectifier, which can realize different levels of voltage access of the main grid. e isolation stage is composed of a bidirectional active full-bridge DC/DC converter in parallel, which plays the role of bidirectional power transmission, changing voltage, and isolating the main grid and microgrid. e output stage is a three-phase bridge inverter structure that provides a low-voltage AC interface to connect to the AC bus of the microgrid.

Principle of System Coordination Operation.
In the overall control of ER, the input stage mainly controls the voltage stability of the capacitance C HN at the high voltage side, which plays a rectifying role; the isolation stage controls the voltage stability of the capacitance C L at the low-voltage side, which plays a role of voltage level exchange, bidirectional energy flow, and isolation between the input stage and the output stage [21]; the output stage inverts the direct current into three-phase AC output. As the control strategy of this paper is mainly realized by the ER output stage, the following research on the analysis of the coordinated operation principle is mainly carried out in the output stage. In the whole microgrid topology, the MPPT control is used to ensure the maximum power output of distributed generation. When both ER and BESS are working properly, the BESS is used as the balance node to provide voltage and frequency support and respond to the unbalanced power of DER and load quickly. ER, as the PQ node, adjusts the power output according to the SOC of BESS in real time to ensure that the SOC of the BESS is always in the normal range. We can take Figure 2 as an example to analyze the coordination process of ER and BESS.
Suppose there is a mismatch between DER output and load demand at some time, such as a sudden increase in load or a sudden decrease in DER output, and a power deficit P eq will occur in the microgrid: where P eq is the net load of microgrid, P Li is each load in the system, P RSi is the power output of various renewable energy sources, S L is the system load collection, and S RS is the collection of renewable energy sources within the system. If sufficient power is not replenished quickly, the frequency of the microgrid will fluctuate. When the power vacancy is too large, the frequency will drop sharply and even affect the stability of the microgrid. At this time, BESS rapidly releases the electric energy to ensure the active power balance. As the output power of BESS causes its SOC to be lower than the reference value, to maintain the stability of the energy storage capacity, ER reflects virtual inertia and slowly increases its active power output to share the power gap and charges the energy storage system. rough the adjustment of the ER, the electric energy released by BESS gradually reduces to zero and then absorbs the power to make its capacity recover. When the SOC returns to the reference value, the BESS output is zero, and the power gap is finally borne by the ER. Similarly, when DER output increases or load decreases, resulting in the power surplus of the microgrid, BESS quickly absorbs the surplus power, while ER slowly adjusts the SOC of the energy storage and finally transmits the surplus power to the main grid.
When the BESS fails and stops working, ER is naturally switched to a balance node and simulates the droop characteristics of synchronous generators to support the basic operation of the microgrid.

Control of the BESS.
e BESS is composed of a battery, interface inverter, and LC filter. e output interface is connected with the AC bus of the microgrid. e purpose of BESS control is to provide stable voltage and frequency support for the microgrid and rapidly output according to the fluctuating power of DER or load. Its interface converter adopts constant voltage and constant frequency (V/F) control based on voltage and current double closed-loop [22]. e control block diagram is shown in Figure 3.
In Figure 3, i Labc is the filtering inductance current, u oabc is the output voltage of the interface converter, and E ref and

Control of the ER.
e objective of the input stage control of the ER is to stabilize the voltage of the capacitor on the high voltage side. To improve the control accuracy, the double closed-loop control is adopted. e voltage of the measured capacitor is compared with the voltage of the given capacitor to form a voltage outer loop to stabilize the voltage of the capacitor on the high side. e current inner loop can control the AC side current waveform, realize the control of the power factor of the input stage, and at the same time, can improve the control accuracy and response speed. e isolation stage adopts phase shift control [23] to realize the two-way flow of power. e output stage of the ER adopts VSG control [19,24,25]. e VSG introduces the rotor motion equation and electromagnetic transient equation of the synchronous machine into the control of the output stage. It can make the inverter output of the output stage of ER equivalent to a voltage source with controllable power angle and voltage amplitude and make its output characteristics to simulate synchronous generator so that the inverter of the output stage of ER also has inertia, which can adjust voltage and frequency automatically. Since there are many studies on VSG at present, only the control block diagram (Figure 4) is given here, and the specific principle will not be detailed.

Coordination Control between the ER and the BESS.
e BESS provides constant voltage and frequency for the system in the whole microgrid, and its fast charging and discharging capacity can also quickly respond to the power fluctuations of DER. However, BESS can neither maintain its SOC nor provide frequency droop characteristics for the system. To overcome this problem, the coordinated operation of the ER and BESS is realized by designing the mechanical reference power in VSG control. e specific control block diagram is shown in Figure 5.
When BESS is in normal operation, the switch is connected to point a. Since BESS provides a stable frequency for the microgrid at this time, the VSG power-frequency (P − f) regulation characteristic does not work. ER outputs power according to the mechanical reference power P ref and adjusts the energy storage capacity, and the P ref expression is where P o is the base point of the running power command, which is estimated by the difference between the predicted value of the DER average output and the load and ΔP is the adjusted power that the ER needs to output to maintain the stability of the energy storage capacity.
where K p and K i are the proportional coefficients and integral coefficient of PI controller, respectively. In order to prevent the transmission power of the ER from exceeding the rated range in extreme cases, SOC ref in this paper needs to be a reference value that can be dynamically adjusted. By changing SOC ref , ER can control the active power output of BESS. For example, when faced with extreme weather without wind and light, the DER stops generating power, resulting in an imbalance between microgrid supply and demand. To prevent ER transmission power from exceeding the rated range, we can reduce the SOC ref so that BESS can release part of the electric energy and share the transmission power of the ER.
As you can see from Figure 5, you can adjust the P BESS, ref parameter to achieve the adjustment of SOC ref . SOC i is the initial value of the state of charge, which is determined by the initial state of BESS, so SOC i cannot be adjusted. Adjusting the parameter of P BESS, ref is essentially adjusting the slope of SOC ref . is can be explained by the following equation. According to the relationship between the active power output of the battery and its state of charge [26,27], Q � I dc,rate C BESS,rate P BESS,rate , where SOC i is the initial value of the state of charge, I dc is the output current of the DC side of the BESS, V dc is the DC side voltage of the BESS, P BESS is the active power output of the BESS, I dc,rate is the rated value of the output DC, C BESS,rate is the rated capacity of the BESS, and P BESS,rate is the rated active power of the BESS. Substituting equations (5) and (6) into equation (4), we can get SOC � SOC i − P BESS,rate P BESS V dc I dc,rate C BESS,rate dt.
Differentiating both sides of equation (7), we get where K c � P BESS,rate /V dc I dc,rate · C BESS , rate because the V dc is approximately constant, and K c can be equivalent to constant. It is not difficult to find from equation (8)  In this way, the active output of the ER can be adjusted to control the BESS to share the desired active power P BESS, ref .
Since the frequency of the microgrid is only supported by the BESS, the stability of the microgrid will be greatly threatened when the BESS fails. To solve this problem, the switch design is carried out in the coordinated control strategy of ER and BESS. When BESS faults, the ER will receive the fault information transmitted from BESS through weak communication, and the switch will be connected to the point b. e BESS no longer provides frequency and voltage support for the microgrid. ER based on VSG control will adjust the frequency and voltage of the microgrid according to the active power-frequency droop characteristic and the reactive power-voltage droop characteristic and provide certain inertia for the system to enhance the frequency stability of the system. From the active frequency control loop in Figure 4, the frequency droop coefficient D P can be expressed by In the above formula, Δf is the variation range of the frequency offset of the microgrid, f n is the rated value of the microgrid frequency (50 Hz), and ΔP is the active power variation of the corresponding output of the ER.

Simulation Results
To verify the correctness and effectiveness of the proposed control strategy, we built a microgrid simulation model under the MATLAB/Simulink platform and set different working conditions for simulation verification. e DER in the model includes wind turbines and photovoltaics, and the energy storage system uses currently widely used lead-acid batteries. When the rated frequency of the microgrid is 50 Hz, the rated capacity of ER is 100 kW, and the frequency variation range is ± 0.5 Hz, From equation (9), we can calculate that the frequency droop coefficient is 50.67 Nm·s/ rad. e other main parameters of the simulation are shown in Table 1.

Working Condition 1: Random Fluctuation of Wind and
Solar. As shown in Figure 6(a), the wind power fluctuation ranges from 47 kW to 83 kW, and the photovoltaic power fluctuation ranges from 18 kW to 33 kW. e total load demand is 100 kW. e output active power and SOC waveform of BESS and ER are shown in Figures 6(b)-6(d), respectively. It can be seen that when the output power of wind energy and photovoltaic light fluctuates, BESS can quickly respond to the unbalanced power of wind and light to ensure the balance of supply and demand in the microgrid, while ER reflects the virtual inertia to slowly adjust the output power according to SOC, support BESS operation, and maintain its SOC stability. Due to fluctuations in the output power of wind and photovoltaic, the SOC of BESS fluctuates. As can be seen from Figure 6(c), the frequency of the microgrid is stable at 50 Hz and hardly affected by the fluctuation of the landscape.

Working Condition 2: Sudden Change in the Load.
To avoid disturbance of operation effect, the wind and sunlight output is constant with average output. At 3 s, the load of microgrid decreases sharply from 100 kW to 90 kW. At 3 s, due to sudden load reduction, 10 kW of surplus power appeared in the microgrid. At this time, BESS quickly absorbed the 10 kW of surplus power, and ER slowly reduced the power output. Finally, the output power of both BESS and ER tends to zero, as shown in Figure 7(a). At this time, all the loads in the microgrid are provided by wind power and photovoltaic. As can be seen from Figure 7(b), the SOC is gradually higher than the reference value at 3 s as BESS begins to absorb electricity energy. e dynamic process of sudden changes in load can be seen more clearly that BESS has a fast output power, which can well suppress the frequency fluctuation caused by a sudden decrease in load, as shown in Figure 7(c). e ER output power waveform is smooth and slow, which effectively alleviates the influence of large power fluctuations on the main grid.

Working Condition 3: BESS Failure and ER Runs
Independently. To simulate the actual situation, wind energy and photovoltaic energy still fluctuate by the law in working condition 1. When set at 8 s, the operation stopped due to the failure of the BESS. In the coordinated control between ER and BESS, when the ER receives the fault information transmitted from BESS through weak communication, the switch is connected from point a to point b (as shown in Regulated power ∆P As can be seen from Figures 8(a) and 8(b), initially the BESS responded quickly to the wind and light fluctuations, and the system frequency fluctuations were small. At 8 s, the BESS fails, and its output power is zero. At this time, the ER controlled by VSG responds to the fluctuation of wind and light and adjusts the frequency of the microgrid according to the characteristics of the droop frequency. Figure 8(c) is the waveform of the SOC of BESS. Since the BESS output power is zero at 8 s, the SOC will not change after 8 s. Figure 8(d) shows the voltage waveform of the AC bus of the microgrid. We can see that the voltage waveform is smooth and the amplitude is stable during the switching process, which realizes the smooth operation of the microgrid during the BESS fault.

Conclusion
To control the frequency of the microgrid with the ER as the core, we propose a constant frequency control strategy coordinated by the ER and BESS. e principle of coordinated operation of ER and BESS under the microgrid system structure has been described and analyzed; meanwhile, the specific coordinated control strategy of ER and BESS has been given. Finally, MATLAB/Simulink was used to build a simulation model and conduct simulation verification. We can get the following conclusions: (1) BESS uses constant voltage and constant frequency control to stabilize the frequency at the rated value and can quickly respond to power fluctuations to ensure the active balance of the microgrid. (2) ER maintains the stability of energy storage capacity and controls the output power of BESS by adjusting the reference value of SOC. e virtual synchronous motor control makes the interface of the ER have the virtual inertia of the synchronous motor, which ensures the smooth exchange of power between the microgrid and the main grid. (3) When the BESS fails, the microgrid can switch smoothly to the fault operation state, which improves the reliability of the system operation.

Data Availability
e data used to support the findings of this study are included within the article.

Disclosure
is paper is an expanded version of a conference paper [28] previously published at 2 nd International Conference on

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this article.