Performance Analysis of a Dq Power Flow-Based Energy Storage Control System for Microgrid Applications

This paper presents a dq power flow based energy storage control system for reliable and stable operation of a renewable power generation based microgrid system. The control objectives are storing the excess energy from the microgrid into the storage unit or supplying energy deficit from the storage unit to the microgrid to achieve power equity between the generation and load, and regulation of voltage and frequency during stand-alone microgrid operation. Whereas during grid-connected microgrid operation, the control objective is to ensure storing energy in the storage unit and exchange power between the microgrid and the utility grid. The proposed controller is developed for inverter interface energy storages using dq power flow. The dq power flow is formulated using bus voltage components and the bus admittance matrix in dq frame. The dq power flow in the developed controller generates command (reference) active and reactive powers for the inverter interfaced storage unit connected to the microgrid buses. In addition, the implemented current controller of the inverter assures such command powers exchange between the storage unit and the microgrid. The developed dq power flow based storage unit (DQPFSU) control system is tested under various operating conditions for both in grid-connected and stand-alone microgrid operation. The test results of the developed DQPFSU controller illustrates satisfactory performance in generating fast control actions to ensure reliable and stable microgrid operation under various changing conditions. Moreover, the validity of such control actions has examined from the frequency response and bus voltages of the case study microgrid under various tested operational conditions.


I. INTRODUCTION
With the ever-increasing demand for electricity consumption worldwide, technological advancement, and consistent effort towards building a carbon-free future ecosystem, the global deployment of renewable power integration is gradually rising. The Global Energy and CO 2 status report 2019 reveals that renewables raised by over 4% and it is about one-fourth of the surge in the total global primary energy demand [1]. However, the intermittency of renewable power sources, such as solar and wind, pose challenges in case of integrating them in large-scale or in increasing their penetration level into the existing power network [2]- [6]. Co-siting of energy storages and such intermittent energy sources has become The associate editor coordinating the review of this manuscript and approving it for publication was Sanjeevikumar Padmanaban . an attractive solution that can enhance the reliability and stability of renewable power generation and supply to meet the load demand [7], [8]. Energy storages can support renewable resources amalgamation in numerous means, such as reducing energy spillage by storing surplus power generated by the renewable sources, mitigating intermittency effect by their coordinated control and operation [9]- [11], drifting, smoothing and firming of renewable power [12], [13]. Some other applications of energy storage include energy arbitrage, peak shaving, power quality and reliability, spinning reserve, voltage and frequency support [14]- [18], black start, deferral of upgrading transmission and distribution network, isolated service, electrical vehicles, uninterrupted power supply, and load-following [19]- [23].
Likewise, energy storage has become an indispensable subsystem for reliable and stable operation of modern power  networks, such as microgrids and smart grids [24]- [26]. Microgrid (MG) is a locally available source dominant flexible modern power system network that characterizes as a low or medium voltage-power system comprising of controllable distributed generations, energy storages and loads [24]. Some of the example MGs around the world are Illinois Institute Technology MG, Revelstoke of Canada, Hamilton, Charlottetown, Winnipeg, Bronzeville Community MG [27]- [29], Higashida of Japan [30], [32], Santa Ana of USA [31], Wild-poldsried, Woking Borough Council of UK [33], and Sonnen Community of Germany [34]. A comprehensive review on MG testbeds and research set-ups has been presented in [35]- [37]. Control of distributed generations (DGs) both in grid-connected and isolated mode was the focus of these presented microgrid systems [36]. Figure 1 illustrates a generalized microgrid architecture, where Distributed Generation (DG) represents renewable power generations, such as wind, hydro and solar power, Generator (G) represents power generation using fossil fuel, Storage Unit (SU) represents energy storage devices or systems, and TS represents as Thermal Storage.
Energy storages in MG domain require great attention on various aspects, such as type (material and size) and cost of energy storage devices, efficient energy management strategies, power conditioning sub-systems, charging-discharging cycle, power conversion mechanism, and control for stable operation, protection, reliability, and environment friendly [11], [38], [39]. By virtue, MG should be capable of operating in both grid-connected and isolated mode, where MG isolated mode of operation is challenging because of a power imbalance between generations and load that result in voltage and frequency instability [38], [40], [41]. Energy storages can provide ample solution to overcome such issues and to attain reliable and stable operation of the MG during grid-disconnection and in a subsequent operation. The available energy storage technologies for MG applications are batteries, compressed air energy storage (CAES), flywheel energy storage (FES), supercapacitor (SC), super magnetic energy storage (SMES), fuel cell (FC), and pumped hydro energy storage (PHES) [40]- [43]. However, the consideration of suitable energy storages for a particular MG configuration depends upon power and energy density of the storage technologies and their economic performance.
Controllability is the essence of reliable and stable operation of MGs, which can ensure reliable and quality power supply to the loads. The controllability referred here as the control of energy storage systems and the other generations within the microgrid domain to accomplish fast and proper power equity between the generation and the load. An ac MG requires controlling voltage and frequency, whereas a dc MG requires controlling voltage magnitude. However, if an MG either ac or dc requires supplying uninterruptable power to the MG loads, energy storages and their control become indispensable [44], [45]. In general, energy storage control strategies applied for MG applications are droop control, PQ control, and V/f control. The droop control determines the reference voltage and frequency by the locally measured and processed voltages and currents. Thus, this strategy does not require the communication medium, and it is suitable for multiple energy storages or microsources control [46], [47]. In PQ control, the reference active and reactive power comes from the tertiary controller, which is modulated by the classical (i.e. proportional-integral) or advanced (i.e. fuzzy) controllers developed in the dq frame [48]- [52].
In V/f control, the reference voltage and frequency obtained from the secondary controller, which is maintained by the classical (i.e. proportional-integral) or advanced (i.e. fuzzy) controllers implemented in the dq frame [51], [52]. The PQ control ensures power exchange between the grid-connected microgrid and the inverter interfaced energy storages. In contrast, the V/f control ensures power exchange between the isolated microgrid and the inverter-based energy storages. Energy storages in MG applications can be utilized in distributed, centralized, and hybrid configurations, where all the three control methods (droop control, PQ control, and V/f control) have been reviewed for the study of the MG stability issue [53], [54].
State of Charge (SoC) based energy management system for battery storages has been proposed for MG operation in [55], where PQ control works for the grid-connected mode and V/f control acts during the isolated mode of MG operation. Battery based frequency control using adaptive droop characteristics for an isolated microgrid was examined in [56]. A PQ control for supercapacitor energy storages that applied to wind farm in order to smooth frequency fluctuation due to wind speed variation was discussed in [57]. A modified SoC-based droop control for distributed energy storages has been studied for an isolated AC power system in [58], where the slope of the power-frequency curve dynamically changes depending upon the SoC of the battery. Many researches have also examined droop based microsource and energy storage control for ac and dc MGs [59]- [63]. Authors in [64] have presented a decoupled droop controller for distributed energy storage controls in an ac-dc MG system, where the controller performs satisfactorily to share power and maintain voltage and frequency within the defined limit. The idea of virtual resistance droop and the virtual capacitance droop for hybrid energy storages controller design has been proposed in [65]. This modified droop controller inherently works as low or high pass filter, which refrains from using the proportional controller with the low or high pass filter to generate current references.
The controllers, as mentioned earlier, demonstrated good performance in terms of energy management in MGs with satisfactory voltage and frequency stability. However, these controllers have been developed from the view of controlling the traditional power system, which opposes the concept of operational and architectural characteristics of MGs. Such discrepancies require optimized system operation, accurate and fast control to maintain stability and power balance, especially during grid-disconnection and subsequent operation of the MGs [66]- [68]. A dq power flow based MG control has been proposed to tackle the aforementioned issues, where the controller initiates quick feedback to operate the primary controllers of the inverter interfaced distributed generation units [69]. The main features of this controller are the utilization of dq voltage and current signals from the output of the inverter that interfaces the distributed generators. The energy storages applied to MGs are mostly inverter interfaced, and their controls are based on the signals in dq reference frame. Thus, the dq power flow based energy storage controller (ESC) can be a good candidate for controlling energy storages either in aggregated or in distributed or in a hybrid configuration. This paper presents a control system for inverter interfaced energy storages for MG applications. The developed controller is employed with dq power flow that can regulate the power needed from the energy storages to maintain accurate power equity between the loads and generation in an MG. The developed energy storage controller can commence quick response to operating the primary controls in the energy storage units in order to reinstate of the MG frequency and voltage due to any disturbance in generating units, load requirement, as well as grid-disconnection and in the subsequent operation of the MGs.
The rest of the paper is organized as follows. Section II presents an overview of the studied MG system. Section III explain the dq power flow based energy storage control that includes dq power flow modelling, and its systematic implementation for energy storage control. This section also describes the command powers generation and their control through the storage interfaced inverter current control. Section IV illustrates and validates the developed controller performance based on results obtained through simulation. Section V concludes the paper.

FIGURE 2.
A case study MG system located in Fermeuse, NL, Canada. HPU is the hydropower unit, WPU is the wind power unit, SU is the storage unit, WT is the wind turbine, PCC is the point of common coupling, S L1 and S L2 are the loads, T1, T2, T3, T4 and T w are the transformers, TL1, TL2, TLd and TLWT represent the lines. Figure 2 shows the one-line electrical diagram of the case study MG that is located in Fermeuse, Newfoundland, Canada. A hydropower unit (HPU) and a wind power unit (WPU) are the two primary power generation systems within the case study MG, which are connected to the point of common coupling (PCC) of the utility grid. The WPU is a combined generation unit that consists of nine wind turbines. A storage unit is additionally connected to the MG to investigate the proposed controller performance in managing power flow and balance between the generations and the loads during stand-alone MG operation. The storage unit refers to any storages that are inverter interfaced to the MG.

II. MICROGRID SYSTEM OVERVIEW
The active and reactive power balance for the case study MG system can be expressed as (1) where P HPU and P WPU are the active powers generated by the HPU and the WPU, respectively, P SU is the active power of the energy storage unit, P L1 and P L2 are the load active power demands, respectively. In utility-connected MG operation, the surplus powers, (i.e. if P B > 0 and Q B > 0), are supplied to the utility grid or can be stored in the SU, whereas the lacking powers, (i.e. if P B < 0 and Q B < 0), are delivered from the utility grid. In stand-alone MG operation, the surplus powers, (i.e. if P B > 0 and Q B > 0), are supplied to the SU, whereas the lacking powers, (i.e. if P B < 0 and Q B < 0), are delivered from the SU. A 10 MVA synchronous generator is used as the HPU, and its specifications are given in [69], [70]. The WPU consists of nine wind turbines with a rated capacity of 3 MW each. However, two wind turbines are required operating during stand-alone operation. The detailed parameters of the wind turbine are obtained from [70]. The capacity of the SU unit is assumed to be 7 MVA to ensure enough energy to serve during the stand-alone operation. Table 1 shows bus data, such as voltage level, real and reactive powers, and load real and reactive power demand, whereas Table 2 reveals detailed transformers and transmission lines data for the case study MG system.

III. PROPOSED CONTROL SCHEME A. DQ POWER FLOW
The formulation of dq power flow is based on the nodal equations that are expressed in terms of bus voltages and admittances in dq frame. Firstly, the bus admittance matrices (Y d and Y q ) in dq frame requires transform of impedances of lines, generators and transformers into the dq components. The Y d and Y q are utilized to express nodal equations in dq frame for any bus i in an N bus power network. The detailed of bus admittance matrices development can be found in [69].
The real and reactive powers for the bus i can be computed as given in [68]. (4) Equations (3) and (4) can be solved using the iterative numerical method because they are non-linear. The commonly applied numerical method, Newton, has been used to calculate v d and v q for every bus. With the dq voltage components and bus admittances matrices, the basis of solving (3) and (4) using Newton's method can be sated as given in [69].
where m is the vector of power imbalances, J dq is the Jacobian matrix, and λ is the voltage vector of dq components of voltage, and they are calculated as If n = i, the Jacobian matrix, J dq elements are determined as given in [69].
If n = i, the Jacobian matrix, J dq elements are determined as given in [69].

B. PV BUSES INCLUSION IN DQ POWER FLOW
The reactive power imbalance Q is not known, whereas the magnitude of the voltage V is known for any PV buses. The voltage for any PV bus k is expressed in terms of the dq components as provided in [68]: The reactive power imbalance, Q k for the PV bus k can be included into the power mismatch vector m as: Thus, the completion of dq power flow formulation that includes PV buses has been settled using the equation presented in Appendix (A1), as shown at the top of the page 13, [68].

C. STORAGE CONTROL IMPLEMENTATION USING DQ POWER FLOW
The objective of employing the dq power flow into the proposed controller is to generate command values of real and reactive powers, such as P C and Q C for every PV bus. Figure 3 illustrates dq power flow based storage unit (DQPFSU) control for the case study MG system. The developed controller acquires measured values of real and reactive powers (P mes and Q mes ) from every bus (except swing bus). These measured powers allow the controller to decide the grid status. In addition, with some of the initialize parameters and the measured powers, the controller initiates to solve the power flow problem using (3) and (4). The power flow calculates real and reactive powers for the PV buses for a number of iterations. The power flow problem convergences to a solution once the set tolerance (ε ≥ max m (j) ) is satisfied.  Figure 4 demonstrates the detailed of implementing the DQPFSU control for the case study MG system. Nevertheless, the SUs are commonly interfaced using inverters for MG applications, and the developed controller has been applied and tested for the inverter interface SU in general. The inverter control is intended to maintain the command values of powers and voltages generated by the DQPFSU controller. Figure 5 shows the schematic diagram of an inverter interfaced SU. The power available at the storage primary source that would be an input to the MG side inverter is approximated as a DC source [48]. It is because this paper focuses on controlling the MG side inverter to ensure power flow from the SU as per the command or reference powers coming from the DQPFSU. The inverter current controller receives command powers and voltages from the DQPFSU controller and senses the voltages and currents from the output of the storage-interfaced inverter. Figure 6(a) illustrates the inverter control structure that ensures the smooth power exchange between the MG and the SU as per the command signals from the DQPFSU.
The three-phase voltages and currents obtained from the MG are converted to the α-β reference frame, which is further transformed into dq axis components [72], [73]. The command powers, P C and Q C , is utilized to calculate the dq current components (Equation (19) and (20)), which are treated as the reference currents for the inverter controller [74]. The reference dq currents components are compared with the corresponding components of the measured current from the inverter output. The proportional-integral current control loop regulates any discrepancies between the reference and the measured currents. The output filter coupling effect is treated using the cross coupling of current components in dq frame [72], [75]. The output of the current regulator is combined with the filter effect and dq components of command voltages to determine the reference voltage components in dq frame. The dq components of reference voltages are utilized to generate α-β components of the reference voltages for space vector modulation that accomplish pulse generation for the SU inverter switches.
A phase-locked loop (PLL) based synchronization between the voltages of the MG and the inverter output is employed in the developed controller. Figure 6(b) illustrates the block diagram of the microgrid synchronization procedure. The  MG voltage angle φ is calculated from the α-β components of the MG voltage and is expressed as given in [72], [73].
The PLL based synchronization approach is realized based on the fact sin (φ − θ), which can be reduced to a value that grants synchronization. Here φ and θ are the voltage angles of the MG and the inverter output, respectively. The difference in voltage phases θ that grants synchronization is achieved with a proportional-integral controller and the fact as follows:

IV. SIMULATION AND RESULT A. SIMULATION
The MG architecture presented in Figure 2 is utilized to investigate the developed dq power flow based storage unit (DQPFSU) controller's performances. The Matlab/ Simulink software tool has been utilized to develop the microgrid components model and the associated inverter-interfaced storage controller. The systematic plan for realizing the dq power flow has been achieved using Matlab code. Simultaneously, the SU control has been established using the Simulink model constructed with the components obtained from the Simulink library. The DQPFSU controller has been tested under the different dynamic conditions of the MG operation, and the controller effectively adjusts the command powers in the system to control the system frequency and voltage in their operational limit. The tested conditions are as follows: Case I: Stand-alone microgrid with wind power variation Case II: Microgrid with grid disconnection-connection and subsequent operation Case III: Stand-alone microgrid operation with a loss of wind generation unit Case IV: Stand-alone microgrid operation with a step load disturbance Case V: Grid-connected microgrid operation with unbalanced load introduction.

Case I: Stand-alone microgrid with wind power variation
The microgrid operates as a stand-alone system where the wind generation unit operates under variable wind speed conditions. Figure 7(a) shows test results for the simulated and calculated per-unit real and reactive powers that are laid on the identical axis. Figure 7(b) presents simulated per-unit dq bus voltages components for this test case. The test results of Figure 7(a) illustrates a close relationship between calculated and simulated real and reactive powers for all MG buses of the stand-alone micro-grid system. This close relationship indicates the ability of the developed control scheme in proper regulation of power balance in microgrid buses. Moreover, the close matches between the calculated and the simulated powers on bus 3 indicate the ability of the developed controller to accommodate changes in the generated power due to the variation in wind speeds. In addition, Figure 7(b) reveals the close-to-unity V d and close-to-zero V q quantities of the bus voltage components that ensure the stability of powers production and delivery for all buses of the microgrid system. In addition, the MG frequency under this operational condition, as presented in Figure 7(b), affirms power equity between the MG generation and load without any significant changes.

Case II: Microgrid with grid disconnection-connection and subsequent operation
In case II, the microgrid operation initiates as a gridconnected system, where at t = 2 seconds, the microgrid becomes isolated due to grid disconnection. Also, at t = 4 seconds, the isolated microgrid becomes gridconnected. Figures 8(a) and 8(b) demonstrate the performance results of the developed power flow based controller for the presented MG. During this test case, the wind power generation operates under changing wind speed condition. The test results for this case are presented in terms of calculated and simulated real and reactive powers, and dq components of voltages for entire buses. The performance results of Figure 8(a) reveal that the storage unit stores real power during grid-connected MG operation. In contrast, the storage unit supplies real power to the isolated MG for t = 2 to t = 4 seconds because of the grid absence. Subsequently, the storage unit stores real power while the microgrid is connected back to the grid. This figure also reveals that the power generated at bus 1 remains unchanged after grid disconnection because of an increase in power generated by the hydro generation unit connected to the same bus. These changes result from the fact that the grid, HPU, and WPU, supplies the MG power requirement. The storage unit accumulates power because of the surplus power available in the MG during this operating condition. However, the storage unit supplies the offset power to the VOLUME 8, 2020 microgrid that is not available from the HPU and WPU during stand-alone operation. The fast adjustment of real and reactive powers on buses 1 and 3 after the grid disconnection at time t = 2 seconds and t = 4 seconds, is attained due to initiating fast and reliable command powers control actions by the developed DQPFSU controller. Moreover, the closeto-unity V d and close-to-zero V q quantities for all bus voltage components are maintained satisfactorily by the controller. The MG frequency remaining in the operational range under dynamic changes during the grid disconnection and connection is an indication of the satisfactory performance of the developed controller.
Case III: Stand-alone microgrid operation with a loss of wind generation unit Case III describes the stand-alone MG operation with the wind generation unit disconnection because of low wind speed. With the disconnection of the wind generation unit at t = 2.5 seconds, the stand-alone MG operates with a power deficit that is supplied by the storage unit. The developed controller supports fast and accurate power delivered from the storage during this scenario. Figures 9(a) and 9(b) reveals performance results of the developed controller in terms of calculated and simulated per-unit real and reactive powers, and bus voltages in terms of dq components.
The test results are shown in Figure 9(a) indicates that the real power produced by the HPU increases. In contrast, the hydro produced reactive power has decreased in response to the wind generation unit disconnection at t =2.5 seconds. The performance results reveal a close match between simulation and calculated values of bus real and reactive powers. In response to the wind generation disconnection, the storage unit delivers active power to the microgrid loads instead of storing power. The active and reactive power changes in bus 1 (slack bus) are started to assure that the VOLUME 8, 2020 HPU and SU supply the MG load demand. After the wind generation unit disconnection at t = 2.5 seconds, the real and reactive power changes at bus 1 are observed with small overshoots and nearly zero steady-state errors that can be seen from Figure 9(a). In addition, these adjustments in bus 1 reactive powers facilitated in managing close-to-unity per-unit values of bus voltages. The effects of reactive power adjustment are evident from the closeto-unity V d and close-to-zero V q values of all bus voltages that is seen from Figure 9(b). The microgrid system frequency remains within the standard limit after a small dip during the wind generation disconnection. Such frequency behavior also ensures accurate and fast real power balance in the microgrid system.

Case IV: Stand-alone microgrid operation with a step load disturbance
This case defines stand-alone microgrid operation with a step increase in the load on bus 4. With an increase (from 2.82 to 3.82 MW) in load real power on bus 4 at t = 3 seconds, the DQPFSU control performances are examined for a stand-alone MG under changing wind speed conditions. Figures 10(a) and 10(b) present per-unit simulated and calculated values of real and reactive powers and bus voltage components in dq axis for all buses of the case study MG system, respectively. Figure 10(a) illustrates that there is an increase in generated active power at bus 1 (slack bus) in order to meet the sudden increase in active power demand on bus 4, at t = 3 seconds. This figure also reveals that the additional load requirement is supplied by the storage unit, which results in a decrease in storing power to the storage. The real and reactive powers for the other buses shows slight changes as per the command signals comes from the DQPFSU control. However, most of the power demand due to the step increase in load is met by the storage unit, which indicates the satisfactory performance of the developed controller in marinating power equity. With the changing condition of the load, the frequency response of the MG, shown in Figure 10(b), has confirmed such power equity during stand-alone MG operation. The bus voltage components V d and V q in their values of close-to-unity and close-to-zero is the other implication of MG stable operation. Therefore, the satisfactory performance results of the DQPFSU control, in this case, confirms stable equity between power generation and consumption in case of a change in power requirements within the microgrid domain.

Case V: Grid-connected microgrid operation with unbalanced load introduction
With the varying wind speed condition and a step increase in real and reactive powers in phase B, the performances of the developed DQPFSU controller is tested in this case. The increase in real and reactive powers are 3.95 to 4.95 MW, and 1.32 to 1.76 MVAR, respectively during the period between t = 2 and t = 4 seconds. Figures 11(a) and 11(b) reveal the test results that include per-unit simulated and calculated real and reactive powers and dq components of voltage for each bus in the presented MG.
The developed DQPFSU control exhibits satisfactory performance in responding to the increasing demand of real and reactive powers on a specific phase in the MG. It is observed that the increased power demand is supplied by the HPU connected in bus 1, which results in an increase in power in this bus for the period between t = 2 and t = 4 seconds. Simultaneously, in this test case, the power supplying to the SU that is connected in bus 1 remains unchanged. It indicates that the SU is storing power instead of supplying to the load. It is important to note that the possible variations in active and reactive powers at bus 3 (due to wind speed variations) are tackled efficiently, indicating stable power generation and delivery by the wind generation unit under bus power changes.
The test results show close compliance between the calculated and simulated values of real and reactive powers, which is a clear indication of the controller ability to initiate accurate commands values of powers that maintain stable MG operation under unbalanced load variations. The bus voltage components V d and V q in their values of closeto-unity and close-to-zero is the other implication of MG stable operation. The MG system frequency response is shown in Figure 11(b) reveals small over and undershoot during the load changes, which demonstrates the satisfactory performance of the developed controller under a step increase in load demand in a particular phase.

V. CONCLUSION
This paper has presented a DQPFSU controller for microgrid operations that ensures active and reactive powers equity between the generation and load under different changing conditions. The inclusion of dq power flow in control process commences accurate command or reference active and reactive powers for the inverter current controller. The changes in the microgrid operational modes have been accommodated in dq power flow using the bus type conversion feature. Moreover, the command powers controller (or the inverter current controller) has shown its ability in the fast adjustment of the command currents because of a simple and more effective way of generating the dq command currents for the inverter. The other feature of the developed controller is the generation of the command powers, that can be included in the primary controller, and as a result, an accurate and fast dynamic response has been attained. Through all performance tests, the DQPFSU controller successfully generates detailed and fast control actions to accommodate the power production and supply in responding to changes in either power production or load demand. Moreover, the closeness of the initiated control actions has been examined using the performance results of the MG frequency and bus voltages for all tested operational conditions. Microgrid power management and renewable power intermittency mitigation using the proposed control strategy are currently under investigation.

APPENDIX
The inclusion of bus type conversion is employed using (A1).