The concern for climate change and the demand for energy have increased the demand for renewable energy considerably. For technical, economic and environmental reasons, the share of electricity generation by renewable energy resources (RES), such as solar power, wind power, tidal and wave power etc., is growing rapidly  . The increasing penetration of RES has significant advantages but there are challenges as well  . The most crucial challenge is the operating stability alongside conventional generation units   . Other technical challenges are the problems of maintaining the RES, contributing to the system voltage and frequency regulation, transients, harmonics, and control design in both connected and isolated modes   .
Carrsaco et al.  presented different control methods for harvesting an optimum amount of energy from RES and injecting the extracted power into the grid. Many studies have been conducted on distributed generation (DG) and have promoted the use of RES as a microgrid (MG) structure    . The idea of a MG was first proposed by the Consortium for Electric Reliability Technology Solutions (CERTS)  . Microgrids are generally considered to be mature and flexible interconnected systems   . The structure of MGs is an interconnection of distributed energy resources (DER)  , such as microturbines, wind turbine generator (WTG), wave energy converters (WEC), fuel cells and photovoltaics (PV) integrated with storage devices, such as batteries, ﬂywheels, superconducting magnetic energy storage (SMES) systems  , and power capacitors on low voltage distribution systems  . The RES are considered as small generating units connected with the customer load and integrated with the power grid in the form of DG. The MGs are usually placed in low voltage and medium voltage distribution networks  .
The electricity generation in a traditional power system relies on fully dispatchable power generation units including rotating SGs enabled with stored kinetic energy. The crucial property of the frequency and stability dynamics is the rotational inertia (rotating mass) which is added by the conventional SGs due to the electro-mechanical coupling  . In electricity grids, the frequency of the voltage is stabilized by a combination of the rotational inertia of the SGs in the grid and a control algorithm acting on the rotational speed of a number of major SGs  . When the rotating inertia drops, it causes a variation in the frequency that can lead to an unstable grid situation. To overcome this situation a virtual inertia can be added by introducing short-term energy storage (ES)  . Critical reviews on energy management of ES with extensive results can be found in   . The literature explores the idea of using related concepts. The operation of an inverter mimicking a virtual synchronous generator (VSG) or a virtual synchronous machine (VSM or VISMA) to support the stability of the system has been discussed widely    . The real power and the reactive power delivered by the VSG interfaced in parallel with the ES and operated as a generator can easily compensate for the voltage and frequency variations. VSGs are expected to behave as generators by adding damping and virtual inertia in a flexible way   . The concept of VISMA is proposed in  , where the phase currents of the VISMA are obtained and used as the reference currents for the inverter. However, a grid integration using the control algorithm was left the future work. A method for using an inverter as a synchronous generator (SG) was discussed in  , and named a sychronverter. VSGs are simply implemented by a DC voltage source connected to the inverter. Therefore, an energy storage system (ESS) is required to achieve a stable control    . The idea of virtual SG was proposed in   , where a short-term ESS is introduced with an inverter to add a virtual inertia to the system. The ESS, interfaced at DC-link, serves not only as a storage but also as a virtual governor, if controlled and used properly     . A hybrid ESS can also be deployed, depending on the system.
Many control algorithms have been reported for the voltage regulation using various schemes such as static var-compensation (SVC)  , the static reactive power compensator (STATCOM)  , and the power balance theory (PBT). A passivity based control (PBC) is mentioned as a suitable control strategy for an unbalanced voltage condition  . Techniques like the synchronous reference frame (SRF) theory and the instantaneous reactive power theory (IRPT)    are the most renowned techniques for the voltage regulation. The SVC-based scheme has the drawback of injecting low-frequency harmonics into the system. The STATCOM-based scheme presents good dynamics without injecting harmonics in the system. On the other hand, this scheme has the drawback of high current notching while feeding nonlinear loads as discussed in  . A current synchronous detection (CSD) scheme based on the peak estimation of the individual phase voltages is well known for its excellent performance compared to the SRF, the STATCOM, and the IRPT when the system is feeding unbalanced loads   . The CSD theory was proposed as an equal current approach and suitable for both balanced and unbalanced systems in  . The CSD-scheme exhibits many advantages over other control schemes, such as low disturbances, active following capability during the load variation and an excellent stability.
The increasing shares of inverter connected RES are causing a drop in the rotational inertia of the power system. The kinetic energy delivered/absorbed to/from the grid by a generator’s rotating mass depends to the rate of change of the frequency. Therefore, the RES are coupled with an ESS to mimic the external behavior of the SG. The DC-link represents not only the power taken from the imaginary prime mover but also from the inertia of the rotating part of the imaginary SG. Rotating inertia, i.e. the inertia constant, reduces the rate of change of frequency in a transient process. In a multi-area power system the inertia constant varies in individual grid areas depending on the inverter connected RES.
Motivation and Contribution of the Work
In the literature, various methods to emulate a virtual inertia of the VSG have been presented with a load mutation and a step change in the wind speed, in a wind energy harvesting case. Shi et al.  presented a study on the frequency response characteristics while a study on reactive power control was missing. However the results shown, barely discussed the behavior at the PCC voltage and an implementation of the control in a real life application was left for the study. Virtual inertia control applications in Solar and wind energy harvesting are well reported in the literature. However a WEC based wave energy harvesting application is missing the study on virtual inertia control in an AC-microgrid. To bridge this gap, we presented a study of an emulation of virtual inertia in a WEC interfaced system, an intermittent power source, to the microgrid as shown in Figure 1. We presented the results of the proposed control in Simulation studies and validated through the experimental results. The proposed system extracts the total electrical power, , and the reactive power, , at the loads, and generates the referenced active (real) and reactive power for the frequency and voltage regulation. The extraction of the referenced power components is estimated by the proposed dynamic control based on a CSD control scheme. The VSG algorithm controls the inverter to regulate the frequency and the voltage at the PCC.
Figure 1. Block diagram of the proposed VSG system.
In this paper, we considered a microgrid as a small single-area power system where the inertia constant (H) is highly time variant and fluctuates between 3 and 6 s due to the deployment of Wind-PV-Wave power generation. The idea of using ultra-capacitor (UC) at the DC-link to emulate a virtual inertia of the VSG is implemented while the droop control is emulated by the battery as a virtual speed governor. A hypothetical inertia coefficient is implemented in the control loop which defines a time constant of the capacitor to respond during the transient processes. Due to the inertia coefficient, the UC responds quickly to the transients and protects battery for a fast discharge. This combination of the ESS connected with the UC at the DC-link forms a DC-grid structure. The proposed scheme controls the three phase inverter connected with the ESS with a DC-DC controller in parallel and this structure operates as VSG as shown in Figure 1. A CSD-scheme control for the voltage and the frequency regulation at the point of common coupling (PCC) is presented. To regulate the PCC voltage and the frequency of the system, a dynamic control estimates the fundamental reference source active and reactive power components. The proposed scheme has a bi-directional capability of active and reactive powers ﬂow which controls the frequency and the terminal voltage at the PCC. In Figure 1, the components are shown in detail: a WEC as a RES, a battery based ESS and a power converter followed by the AC-microgrid through a harmonic filter. In this study, a WEC enables the system to harvest energy directly from a buoy or a floater by ocean waves, as discussed in detail in      . The performance of the controller is demonstrated under varying loads and RES power conditions.
2. System Configuration
2.1. Control Overview of the System Structure
Figure 1 shows the structure of VSG based inverter control interfaced with a WEC. A linear permanent magnet generator based WEC is rectified and interfaced with the DC-link as an RES. The structure of the VSG comprises an ESS with a DC-DC control at the DC-link. The ESS uses a battery for the storage along with a DC-link capacitor/ultracapacitor, where and are the flowing DC current and the inductance of the DC-DC converter. The parameters, and are the filter inductance and the capacitance, respectively. The three phase current is defined as , and denotes the PCC three phase voltages. is the equivalent line impedance.
A WEC feeds the rectified power, intermittent by nature, into the DC-link. Hence, a power smoothening and a frequency regulation is desired. The capacitor at the DC-link absorbs the extra power along with the battery storage. The DC-control regulates the DC-link voltage to a stable point and supports the frequency regulation caused by the varying WEC power. The main electrical and mechanical parameters of the linear generator used as a WEC are shown in Table 1. This is a model of WEC that has been installed at the Lysekil research site conducted by Uppsala University, Sweden. It is worth to mention that one WEC connected to the grid, represents large variations in power flow, and therefore this study investigates the behaviour of the system with one WEC connected to the microgrid as well. The DC-voltage control is implemented based on the standard control structure in  as shown in Figure 2. The controller compensates for the frequency deviation caused by the varying WEC power and by the load variations. A DC-voltage deviation, , is dynamically regulated corresponding to the measured frequency deviation, , through a gain, , and added to the DC-voltage reference. The resulting sum is processed to a PI-controller to build a reference DC-current, which is further compared with the current of the battery.
The resulting current error from the comparator is used as an input for the PI-controller, designed with proportional gain only, to amplify the error signal. The amplified signal is compared with a fixed frequency (10 kHz) triangular wave to generate pulses to control the DC-DC controller. In this way, a stable DC-link voltage is achieved according to the frequency deviation. Due to the scope of the paper, the control on the WEC side is not discussed here. However, a brief overview of the control on the WEC side is shown in Figure 1.
2.2. The Conventional Control Scheme of Virtual Inertia
The dynamic behavior of a synchronous machine can be described in Formula (1)  ,
where is the input mechanical torque, is the output electromagnetic torque, J is the rotational inertia of the SG, is the mechanical angular speed and can also be expressed in terms of the inertia constant H and power in (2),
Table 1. Generator (L9) main electrical and mechanical parameters.
Figure 2. Block diagram of the DC-voltage controller to control the bi-directional DC-DC controller.
Assuming is constant and J increases in (1) entails that the change in the magnitude of the speed will be smaller caused by the load perturbation. According to the expression of the rotor kinetic energy, , and the inertia constant are defined in (3)  with J = 1.642 kg-m2 and system rated power, ,
The variation of the rotor kinetic energy, , can be defined as in (4),
where , and are the mechanical and electrical powers, and is the change in angular speed. Formula (4) shows that the less kinetic energy is released at the same time if J increases, which results in the low release rate and conversion efficiency of the rotor kinetic energy. This phenomenon brings an unbalanced power in the MG and pulls a heavy burden to the SG or the AC-grid. Moreover, this virtual inertia control requires additional speed or de-loading control techniques, which makes it a complex control structure.
3. Control Scheme for Virtual Inertia Emulation
The VSG implementation investigated in the study is based on a conventional swing equation representing the inertia and damping of a traditional SG. A second-order model is usually applied in VSG control topology. The mathematical model of the synchronous generator is expressed as its swing equations in (5)  ,
where is the virtual mechanical input power, is the electrical power flowing into the grid, is the reactive power reference, Q is the filtered reactive power measurement, , and V are the referenced and output voltage amplitude respectively, is the electrical angle, and D, are the active and reactive damping factors, respectively.
3.1. Emulation of the Inertia of the VSG
The power converters regulated as VSGs present a similar frequency dynamic response as SGs, and are incapable of storing or releasing the kinetic energy. Therefore, they require an additional energy storage unit, called an ESS. To use the ESS with power converters as a combined unit to form a VSG, they must satisfy the condition in (6)  . Both the power variation caused by the RESs, , and the power variation by the frequency depended loads, (also known as the damping power), should meet the power exchange of the VSG,
, used for the power balancing in real time,
is the measured frequency deviation, and H is the inertia constant. Since the Ultra-capacitor (UC) at the DC-link is used to emulate the virtual inertia of the VSG in a transient process. A transient condition occurs when a load change is observed and results in a sharp deviation in the derivative of the change in frequency. The rotational inertia (J) is inversely proportional to the rate of change in the frequency (
), i.e. a transition process, and effects the frequency regulations much faster. The rotational inertia is defined in terms of inertia constant as in (3). The inertia constant quickly responds to this deviation by emulating a virtual inertia. The UC is modeled to respond quickly by implementing a time constant (inertia coefficient of the capacitor) in the control loop of the converter and defined as inertia coefficient of the capacitor in (11). Since D is inversely proportional to the frequency variations
and does not depend on
which means the damping power only can support in a steady state instead of the transient process  . Due to this fact the implementation of virtual inertia constant is more reliable in an intermittent power source, i.e. a WEC and hence the damping power term is implemented in the control loop to complete the swing equations of the SG. However the damping power contribution is quite smaller due to the low damping coefficient. The WEC is an intermittent power source and feeds a power varying with time into the DC-link. Therefore the ESS at the DC-link should absorb the excess power or release the power to keep the DC-link voltage
where is the frequency-droop coefficient acting on during the RES power variations . The VSG power contribution by the inertia emulation is defined in (9) and represents the power sharing of the capacitor. Since the emulated inertia is proportional to the energy stored in the capacitor in (10), there is a trade-off for the selection of the inertia constant and the capacitor size to reduce the frequency deviation. Since is adjusted by in relation to as defined with as shown in Figure 2,
where is the inertia coefficient of the capacitor and defined in (11) as a function of the capacitance , reference DC-link voltage , and the system rated power, ,
Therefore, the inertia coefficient of the capacitor is inversely related with the gain and can be expressed as ( ). The emulated power system inertia is considered similar to the inertia in a conventional power system, which is taken as H = 4 as obtained from (3) and a maximum value of can be obtained using (11) which is 13.3. The control parameters and the system parameters used in this study are reported in Table 2.
3.2. Active Power Droop Control
The emulation of a rotating inertia and the power-balance synchronization mechanisms of this virtual inertia is the main difference between the investigated VSG control structure and conventional control systems for the inverter. The swing equation used for the implementation is linearized with respect to the speed so the
Table 2. System and control parameter values utilized in the study.
inertia is determined by the power-balance formula in (12) as shown in Figure 3,
The mechanical speed , of the VSG is given by the integral of the power-balance formula (13) while the phase angle , of the VSG is obtained by the integral of the speed. The damping power , presenting the damping effect of the VSG, defined by the product of active-damping factor D and the difference between the VSG frequency- , and the actual grid frequency , as in (7) where . The actual grid frequency is measured by a dual second order generalized integrator-PLL (DSOGI-PLL).
The VSG speed in steady state will become equal to the grid frequency and the frequency deviation will approach zero under a stable grid connected condition. The VSG generates the frequency and the active power in steady state condition which is assumed to be the reference frequency and active power reference. However when the load changes the frequency reference values and the active power reference values are obtained by the estimation of the reference frequency and the reference source active power , through the CSD theory. The benefit of using a CSD estimation of the references is to reduce the shock currents during the load changing event and improve the stability of the system.
The active power droop control is realized by a CSD estimation of the three-phase reference active power of the source currents. The reference source active power is estimated by a dynamic droop controller (DDC). The DDC estimates the reference source active power by taking the difference of the output of the PI controller and the fundamental active power component of the loads , which is the filtered average power of the loads. The frequency error is processed to the PI controller for the estimation of in (14). To obtain , a first order low pass filter is applied with a cut-off frequency as shown in Figure 4,
Figure 3. VSG inertia emulation with power-frequency droop.
where and are the proportional and the integral constants for the PI controller, , and are the frequency errors at the nth and (n − 1)th sampling instant and and are the output of the voltage PI controller at the nth and (n − 1)th instant.
3.3. Reactive Power Droop Control
According to the mathematical model of the SG the loop-voltage equation is given in (15) shown in Figure 5,
where E is the electromotive force, U is the terminal voltage of the stator, I is stator current, R is the armature resistance of the stator, and X is the synchronous reactance. The bold letters E, U, and I represent their phasor form. The power angle, , between E and U is very small and hence , which satisfies the formula in (15). Consider the SG stator voltage equations and the excitation controller design. The structure of the excitation controller is shown in Figure 6. The reactive power controller based on a dynamic droop is similar to the one commonly applied in the MG system and reported in many studies  -  . A reactive power controller―a virtual excitation controller on the dynamic droop―is proposed and utilized in this study. A DDC for estimating the reference source reactive power and the field current deviation to build an excitation for the VSG is proposed as shown in Figure 7. The reactive current components are estimated by using the in the CSD theory. The reference of the output voltage amplitude , used for the inner loop voltage and a current control is calculated in (16). is
Figure 4. Block diagram of the DDC for the estimation of reference source active power.
Figure 5. The equivalent circuit and phasor of the VSG. (a) Equivalent circuit; (b) Phasor diagram of each vector component.
Figure 6. Structure of the VSG excitation regulator with DDC based reactive power control.
Figure 7. Control structure of reference source reactive power estimator (RPE).
the actual output voltage amplitude at the terminal, namely . In Figure 7, the reactive power reference component is estimated by the proposed reactive power estimator (RPE), and is the reactive power droop gain acting on the estimated , is the reference of the field current. An excitation force is obtained by multiplying with to the sum of and . The reference source reactive power component is estimated by the difference of the output of the voltage PI controller and the fundamental reactive power component of the loads in (17).
where and are the proportional and the integral constants for the PI controller, , and are the terminal voltage error at the nth and (n − 1)th sampling instant and and are the output of the voltage PI controller at the nth and (n − 1)th instant required for the voltage regulation.
The filtered reactive power component corresponds to the three-phase fundamental reactive power of the loads. The filter applied is a first order low pass filter with a cut-off frequency defined in (18),
4. Modeling of the Proposed Control Scheme Based on a CSD Control Scheme
4.1. Modeling of the Control Scheme
The control of the proposed VSG is realized by computing the reference source currents (RSC) through the CSD theory. The RSC are comprised of two components, 1) the in-phase component, the active power current component, for regulating the frequency, and 2) a quadrature component, the reactive power current component, for controlling the magnitude of the generated voltage (the terminal voltage). The reference source active power , is estimated by taking the difference of the output of the frequency PI controller , and the filtered average load power . The three-phase reference active-power components of the source currents are estimated using the peak amplitudes of the phase voltages , the reference source active power ( ) and the phase voltages . To regulate the terminal voltage at the PCC the VSG requires a reactive power support. The reference source reactive power component ( ) estimation is explained in the previous section. The obtained component is used to extract the three-phase reactive-power components of the reference source currents ( ) using the peak amplitudes of the phase voltages and the quadrature phase voltages (QPV), . The algebraic sum of the active-power components of the source currents ,and reactive-power components of the reference source currents ( ) yields the total reference source currents . The peaks of the phase voltages are detected using a peak detection algorithm, consisting of a sample and hold (SH) circuit, hit crossing (HC) detector and an estimated QPV. Since the QPVs are leading the phase voltages by 90˚, the HC detects the negative slope zero crossing of the quadrature voltage, i.e. the peak of the phase voltage at the same time instant. The estimated reference source currents are compared with the measured currents at the VSG. The resulting errors are processed to a proportional controller and the amplified signals are used for the pulse width modulator (PWM) to control the switches of the power converter.
4.2. Estimation of the Active Component of the Reference Source Currents
Assuming that the amplitude of the active power source currents are balanced and equal in magnitude after the compensation in (19),
where are the peak amplitude of the active current in each phase. Then,
Substituting (20), in (19) yields into (21),
The total average power is obtained by taking the sum of the reference source active power components in each phase ( ) in (22).
By rearrangement of (21) and (22) yields (23),
where , is the sum of the peak voltages. The estimation of the reference source currents is done by solving (23) and (20),
where is the terminal voltage and expressed in (25),
Using (29) based on the CSD theory estimation, the reference source active power ( ) is converted into the active power component of the three-phase source currents ( ) using the phase voltages and the peak of the phase voltages in (26).
where the total power is the reference source active power ( ) which has to be generated by the VSG. is treated as the virtual mechanical input power to the VSG to build the electrical power to meet the active power demand which justifies the formula (2).
4.3. Estimation of Reactive Component of Reference Source Currents
An assumption similar to the one in the previous section, can be applied to the fundamental reactive power source currents in that they are balanced and equal in magnitude,
The reference source reactive power ( ) is converted to the reactive power component of the three-phase source currents using quadrature phase voltages ( ) and the peak of the phase voltages in (28),
The quadrature phase voltages are estimated by using the amplitude of the PCC (terminal voltage, ) and the quadrature unit templates, and the derived expression is explained in (29),
The quadrature ( ) and the in-phase ( ) unit templates are derived and expressed in (30) and (31) at time instant, t  ,
The total reference source currents are estimated by taking the sum of the estimated active and reactive reference source currents and defined by the formulae (32),
5. Simulation and Results Analysis
To verify the proposed VSG control scheme, numerical simulations are carried out in a MATLAB/Simulink environment. The system structure shown in Figure 1 is realized in MATLAB/Simulink by using the real parameters of the WEC and VSG system similar to a real application.
5.1. Dynamic Response under Loads Perturbation and Intermittent WEC Power
To verify the effectiveness of the proposed control strategy, the simulation results are presented with the loads perturbation and a varying WEC power. The verification of the control is presented with the ESS. It is worth noting that the initial grid synchronization is achieved by using a PLL, and the VSG is smoothly synchronized with the grid. The phase synchronization between the grid and the VSG is shown in Figure 8. In Figure 9, at the beginning of the simulations, a 10 kW load, active power demand, is connected and the reactive power demand is kept to zero. The reference active power value is estimated and sent to the VSG control algorithm to meet the power demand. In Figure 9, a load perturbation is applied at t = 0.786 s, the initial active load was 10 kW and the applied active load
Figure 8. Phase angle of the grid and the VSG during the synchronization.
Figure 9. VSG and the referenced active power with the frequency regulation.
2, which is 5 kW, is connected and a drop in frequency is reported immediately just after the load perturbation occurs. At this moment the proposed control quickly takes action to restore the terminal frequency and the active power demand ( ). The proposed control strategy based on the CSD scheme, quickly estimates , compensates for the required active power demand by increasing the VSG active power with a minor overshoot. The inverter accesses the energy storage to support the active/reactive power and frequency/voltage compensation. The power output of DC/DC converter feeds a small amount of power into the DC-link and surpluses the power until the load 2 (i.e. 5 kW) is disconnected at t = 1.126 s. During the first load perturbation of 5 kW, the terminal voltage drops immediately and therefore a reactive power support is released by the VSG to restore the terminal voltage as shown in Figure 10. In Figure 9, during all the load perturbations a variation in the frequency is reported which is controlled by the proposed control by supporting the system
Figure 10. VSG and reference reactive power with the regulated terminal voltage.
with increased or decreased the active power demand. The control restores the frequency within a small deviation of ±0.05 Hz. Furthermore, to investigate the robustness of the control, a reactive load of 400 var, as load 3, is introduced at t = 1.01 s. The purpose of this investigation is to demonstrate the controller performance in a multi load perturbation. In the event at t = 1.01 s when the reactive power demand was raised, the VSG immediately supports the reactive power compensation to maintain the terminal voltage at the operating point at that event. During this event, the load 2 is disconnected at t = 1.126 s and the terminal voltage deviates from the operating point to the nominal terminal voltage.
As a result, the VSG adds a small amount of reactive power at that event and quickly returns to the previous feeding point, since the VSG voltage is detected running up at the nominal terminal voltage. The individual current components to generate the active and reactive power are shown in Figure 12. The small amount of reactive power added which can be noted in Figure 10 and Figure 12, as a small notch which disappears smoothly and the system runs at nominal terminal voltage. During the next event, load 3 (400 var) is disconnected at t = 1.20 s, and a load 4 is connected at the same time event at t = 1.20 s. The new load demand is 9 kW, as load 4, and must be supplied by the VSG in a stable
Figure 11. VSG performance output during the load perturbation: (a) terminal voltages, and (b) line-currents.
Figure 12. VSG Reference source current components: (a) the active current component for active power compensation in phase-A, and (b) the reactive current component for reactive power compensation in phase-A.
mode The drop in the terminal voltage is noticed immediately and the stored reactive power is used to regulate the terminal voltage to a stable operating point. The stored reactive power is an effect of the load 3 disconnection which supports the terminal voltage during the load 4 perturbation as shown in Figure 10. The results presented in Figures 9-14 verify the proposed control objective
Figure 13. ESS power, the load variations, WEC and VSG power output.
Figure 14. ESS, the DC-link voltage, WEC and VSG power output.
5.2. Verification of the Control with the ESS
The ESS effectively participates during each event of the load perturbation. It can be noted that the ESS not only regulates the output droop but also supports the power balance during excessive and insufficient power generation from the WEC as shown in Figure 13 and Figure 14. In Figure 13, the intermittent power (rectified power) from the WEC (in the black curve) is smoothly addressed by the ESS and the ultra-capacitor. The WEC power is increased suddenly and the ESS stores this extra amount of power, as depicted in Figure 14 roughly at t = 2.89 s.
The DC-link voltage
is well controlled within the allowed DC-ripples caused by the intermittent WEC power during the different wave elevations and the load perturbation. In Figure 14, the ESS continuously participates throughout the simulation study and helps not only to smoothen the WEC power, but also maintains the DC-link voltage at a steady point by absorbing or releasing the power. The ESS releases the power during the insufficient power generation from the WEC and absorbs the extra power when the WEC is delivering more power than the demand. Figure 14 clearly depicts the performance of the ESS control as a virtual governor. When the load perturbation is applied and the ESS supported to the VSG to regulate the active power to maintain the power demand. It is worth to notice that there is a deviation reported in the DC-link voltage,
, and the system frequency, and both of the system parameters are immediately restored to their referenced values by an active participation of the ESS acting as a virtual governor. Every time-instant when the loads increase (t = 0.786 s, 1.01 s, and t = 1.20 s) or decrease (t = 1.126 s, 1.20 s, and t = 1.92 s) the virtual governor takes the appropriate action to regulate the within the allowed fluctuations. In Figure 14, the WEC delivers an excessive amount of power at t = 2.89 s. The ESS smoothly stores this extra power while maintaining the at a stable reference point. In this way, the system operates in a stable mode and the ESS supports the power converter to maintain the and the system frequency at the stable referenced points. Consequently, the proposed CSD scheme based VSG control has less fluctuations in the DC-link by using an ESS. The results indicate that a single WEC can also be interfaced with an AC-grid by using the proposed scheme to mitigate the power fluctuations and inject a smoothened power into the grid.
6. Experimental Validation
The experiments were carried out to verify the practical feasibility of the proposed control based on diagram in Figure 1. The tests were carried out with microgrid in the test facility at University College Cork (UCC), Ireland. The experimental setup is within a microgrid setup running at 400 VAC line-line RMS voltage as shown in Figure 15. The study is carried out to demonstrate the
Figure 15. Experimental setup: the rotatory emulator connected to the microgrid at UCC, curtesy, MaREI facility  .
behavior of an intermittent power source with the AC-microgrid and to test the effectiveness of the proposed VSG control algorithm. To this end, the wave data is used to generate a torque for the emulator in the microgrid and tested with the algorithm to control the microgrid voltages and the frequency. A medium speed rotatory emulator, originally developed at UCC  , is used in the experiments to emulate as a WEC and a PTO. The emulator consists of directly coupled two electrical machines: a prime mover (acting as a WEC), and other acting as the rotatory renewable energy generator. The generator is connected to the microgrid using a back-to-back power converter topology. A real-time simulator, OP5600 from OPAL-RT, using MATLAB and Simulink software is used to interact directly with the emulator, allowing for more accurate and complex modelling. This combination is commonly known as hardware-in-the-loop (HIL) simulator. The emulator is controlled by a programmable logical controller (PLC) that communicates with the HIL and the drives controlling the motors. The data is logged using a high speed data logger based on Compact-RIOs field programming gate arrays (FPGA). The logging sampling frequency is set to 10 kHz. The control algorithms are executed in a HIL connected setup on the PC. The wave data used in the test is recorded for one of the sea states on the west coast of Sweden, i.e. the force for a wave period of 6 s ( ) and a significant wave height of 2 m ( ). The force is converted into a torque for the rotatory emulator. Figures 16-18 present the experimental results of the proposed VSG system. In practice, the reactive power compensation is achieved to maintain the terminal voltage of the microgrid using the DDC and RPE based VSG algorithm, as shown in Figure 16. The terminal voltage and reactive power of the grid are calculated and processed to the control to estimate the referenced components to build the referenced source components to compensate for the variations in the terminal voltage, as shown in Figure 16(a) and Figure 16(b). The similar event roughly at t = 183 s is considered to present the effectiveness of the control and presented in Figure 16(c) and Figure 16(d). Since the grid had excessive amount of reactive power available, therefore the reactive power from the VSG was decreased to maintain the terminal voltage to the nominal value, 400 VAC.
Figure 16. Experimental results for the reactive power compensation: (a) Terminal voltage ( ); (b) Delivered reactive power; (c) and (d) Performance of the VSG roughly at t = 183 s (zoomed).
From Figure 16, it can be observed thoroughly, that the terminal voltage ( ) was running slightly higher than the nominal value and has slight fluctuations around the nominal voltage. When the terminal voltage was fluctuating around the nominal value, the VSG contributed the reactive power accordingly, to maintain the terminal voltage around the nominal value. The black curve from Figure 16(d), indicates that at t = 179 s to t = 180 s, the reactive power delivery was decreased (as shown in the blue curve) as the terminal voltage was running slightly higher than the nominal value. Moreover, the VSG supports the system to maintain the grid voltage to the operating condition. The terminal voltage was varying between 400 V to 404 V due to the grid reactive power. The is maintained by providing a reactive power delivery in the system. Considering the event, roughly at t = 183 s when an additional load is connected and a sharp drop in the terminal voltage is observed which is, immediately compensated by the VSG to restore it to the operating terminal voltage value, as shown in Figure 16(c) and Figure 16(d). It can be seen from the observations that the reactive power droop gain, acts immediately to bring the system voltage to the normal operating point. The results presented at different time events, show that the objective of the proposed control-mechanism to compensate for the reactive power is achieved. In Figure 17(a) and Figure 17(b), the power of the VSG, the ultra-capacitor (UC) power which is defined as and the power of the
Figure 17. Experimental results for the active power compensation: (a) VSG, UC, and the battery power; (b) Performance of the VSG roughly at t = 183 s (zoomed); (c) Frequency; (d) DC-link voltage.
battery ( ) are shown in a full experimental time and in zoom for one of the load perturbation events.
The frequency dependent loads are changed at different time events as shown in Figure 17(a). The system observed a deviation in the system frequency and VSG started to respond to the deviated frequency. The rated power of the ESS is 20 kW and inverter is rated to 50 kW. It can be observed that the VSG mimics the similar inertial frequency response as conventional synchronous generators under each frequency event. Initially, a load of 25 kW is connected at the microgrid which is covered by the power from the WEC and the VSG operated system. A load perturbation is applied with a step-up change of 5% at different time events, roughly at t = 62 s, t = 123 s, t = 183 s and t = 243 s as shown in Figure 17(a). To demonstrate the effectiveness of the algorithm, an event roughly at t = 183 s, is shown in Figure 17(b). The power allocations between the UC and the battery are shown under the 5% of step-up load perturbation. It can be observed that the UC, quickly, responded to the frequency event for balancing the load power variations, as shown in the red curve. During this transition process, the UC has a higher power contribution to maintain the power balance. It is worth to notice that the power balancing is achieved within one second of the event occurred. The analysis of the results validated the realization of the swing equation of VSG in Equations (5) and (10), as discussed earlier.
Since the rotational inertia (J) is inversely proportional to the rate of change in the frequency ( ), i.e. a transition process, and effects the frequency regulations much faster. The rotational inertia is realized as an inertia constant (H) in the VSG swing equations. The inertia constant of the VSG swiftly, handles the frequency regulation in a transition process by emulating a virtual inertia. The battery is modeled to emulate the droop-control mechanism to compensate for the long-term power variations, which reduced the stress of the battery. In Figure 17(a) and Figure 17(b), the battery power has a less power fluctuation in comparison to the UC power in the transient states. The WEC power, as an RES, has a wave period of 6 s and the power variations are easily addressed by the battery power (). From the results presented in Figure 17(c), it can be observed that the frequency is running slightly higher than the nominal value, which meant that the grid has excessive real power. The frequency events occurred due to the load perturbation, roughly at t = 62 s and t = 183 s, are shown where a slight deviation is noted in the frequency at each event. During these transient processes, the virtual inertia from the VSG is released to maintain the system frequency at the referenced point. The variations in the DC-link voltage are shown in Figure 17(d), where a slight variation is observed that varies in a proportional to the system frequency. It is worth to notice that the delivery of inertial power is achieved at the DC-link. In practice, the objective is achieved by the frequency regulation with an intermittent power source connected in a microgrid structure. The in-phase unit voltage templates ( ), the quadrature unit voltage templates ( ) and the quadrature phase-voltages ( ) are the experimental results in a real-time simulator, OP5600 OPAL-RT, in HIL simulations. Figure 18(a) and Figure 18(b) present the unit templates in phase-A and the quadrature phase voltages, respectively.
The experimental results obtained from the VSG, show the AC-side three-phase
Figure 18. Experimental results for the estimated unit templates and quadrature voltages: (a) In-phase unit template, ( ) and the quadrature unit template ( ) for phase-A; (b) The quadrature phase voltages ( ); (c) VSG voltage of AC-side; (d) VSG current in phase-A.
line to neutral voltages and the current in phase-A, in Figure 18(c) and Figure 18(d). As expected, the waveforms of the VSG AC-side voltages are controlled as clean sinusoidal while the current in phase-A (similar to other phases) is the resulted action of the VSG due to the load perturbation. It can be observed that the referenced-current to support the real power demand during the transient is delivered instantly and achieved stability in less than a second. The experimental results obtained as in Figure 18, verified that the implementation of Formulae (28)-(32) has been achieved in a microgrid connected practical application.
In this paper, the concept of a VSG for controlling power converter to replicate the behavior of traditional SG is studied. A CSD-scheme based dynamic control to release the potential advantages of distributed control of power electronics is proposed and verified through simulation and experimental results in the SmartGrid context. The VSG based control is extracted from the swing equation of the traditional SG. The DC-link with the ESS is used to emulate the inertia of the VSG and represented as the inertia coefficient, the droop control and a virtual speed governor in a VSG algorithm. The proposed control scheme is designed to regulate the voltage and the frequency controller during the transient and steady state, which is verified by the simulations and the experimental results. The reference active and reactive power components are extracted using the CSD-scheme and used as input references to the VSG algorithm to regulate the voltage and the frequency.
In this study, the experimental data, recorded during the conducted experiments at Lysekil Wave Energy Park on the west coast of Sweden, are used to emulate a real WEC behavior in the time domain. The proposed control scheme effectively addresses the power fluctuations caused by the WEC, a load perturbation and maintains the DC-link voltage at a steady point. Furthermore, the frequency deviation caused by the WEC’s intermittent power, and the perturbation of the loads are well controlled under the allowed maximum frequency deviation . Since the grid had excessive real power, the delivery of the real power was slightly reduced by the VSG and the real power delivery remained stable at the loads. However, the slight variation in the real power of the VSG was not clearly visible in the long run test, which appeared to be a constant power delivery for each load perturbation. Moreover, the effectiveness of the VSG real power control could be appreciated in the zoomed results where the real power had slight fluctuations as followed by the variations in the frequency. This verified that the frequency of the system was regulated well within the allowed range by virtual inertia emulation and operated slightly higher than the nominal value (50 Hz), as shown in the results in Figure 17. The analysis of the proposed scheme verified through the Simulations and the experimental results shows that the concept of a VSG control to implement the SG swing equations including the inertia coefficient , a virtual damping coefficient D and the droop control by the ESS into the control loop of the power converter to emulate the external behavioral dynamics of SG has been achieved. The VSG control based power converter realized the power exchanges similar to a traditional SG, and stabilized the system parameters accurately. The effectiveness of the proposed control scheme is verified by the simulation results carried out on a MATLAB/Simulink platform and validated through the experimental results in a microgrid power system as a real application. The obtained simulation and experimental results verified that the proposed control could be applied to other real applications through the appropriate estimation of the parameters to be utilized in a real application. Hence, the practical feasibility of the proposed control scheme has been tested and verified on an experimental platform to validate the scheme.
Arvind Parwal thanks Swedish Research Council (VR) STandUP for Energy, MaRINET2 and Erasmus Mundus (EMINTE) Ph.D. Scholarship for the support of the work. Also, we are thankful to Ms. Kristin Bryon for an extensive English proofreading.
E Electromotive force in phasor form (V)
Capacitance of the capacitor (F)
Filter capacitance (F)
Active and reactive damping coefficients
Rotor kinetic energy (J)
fg Frequency reference (Hz)
fVSG VSG frequency (Hz)
H Inertia constant (s)
Inertia coefficient of the capacitor (s)
I Stator current in phasor form (A)
Three-phase current (A)
Excitation current (A)
The peak amplitude of the active current in each phase (A)
The peak amplitude of the reactive current in each phase (A)
Total reference source current (A)
Three-phase reference active power currents (A)
Three-phase reference reactive power currents (A)
DC-reference current (A)
J Rotational inertia (kg-m2)
K Inertia coefficient for reactive power loop
Reactive power droop gain
Proportional and Integral constants for active power control loop
Proportional and Integral constants for reactive power control loop
roportional and Integral constants for DC control loop
LB DC filter inductance (H)
Ls Filter inductance (H)
Electrical and mechanical powers (W)
Rated power of the WEC (W)
Total reference source active-power (W)
Reference source active-power in each phase (W)
Output of the voltage PI controller at the nth and (n − 1)th instant (W)
Reactive power reference (var)
Fundamental reactive power component of the loads (var)
PI controller output at the nth and (n-1)th instant (var)
R Armature resistance (Ω)
PCC three phase voltages (V)
Terminal voltage (V)
Reference terminal voltage (V)
In-phase unit templates (V)
Quadrature unit templates (V)
Quadrature phase voltages (V)
Peak amplitude of the phase voltages (V), Sum of peak amplitudes (V)
DC-reference voltage (V)
Line impedance (H)
Mechanical angular speed (rad/s)
VSG mechanical speed (rad/s)
Cut-off frequency of the filter
Electrical angle (˚)
Frequency deviation (Hz)
DC-voltage deviation (V)
Frequency-droop power for the battery (W)
RES power variation (W)
Damping power (W)
Variation of rotor kinetic energy (J)
Rate of change of the frequency (Hz/s)
 Zhong, Q.C. and Weiss, G. (2009) Static Synchronous Generators for Distributed Generation and Renewable Energy. IEEE/PES Power Systems Conference and Exposition, Seattle, WA, 15-18 March 2009, 1-6.
 Ekanayake, J. and Jenkins, N. (2004) Comparison of the Response of Doubly Fed and Fixed-Speed Induction Generator Wind Turbines to Changes in Network Frequency. IEEE Transactions on Energy Conversion, 19, 800-802.
 Farret, F.A., Palle, B. and Simoes, M.G. (2004) State Space Modeling of Parallel Self-Excited Induction Generators for Wind Farm Simulation. Conference Record of the 2004 IEEE Industry Applications Conference. 39th IAS Annual Meeting, Seattle, WA, 3-7 October 2004, 2801-2807.
 Carrasco, J.M., et al. (2006) Power-Electronic Systems for the Grid Integration of Renewable Energy Sources: A Survey. IEEE Transactions on Industrial Electronics, 53, 1002-1016.
 Li, Y., Sun, Q., Wang, D. and Lin, S. (2019) A Virtual Inertia-Based Power Feedforward Control Strategy for an Energy Router in a Direct Current Microgrid Application. Energies, 12, 517.
 Khan, B. and Singh, P. (2017) Selecting a Meta-Heuristic Technique for Smart Micro-Grid Optimization Problem: A Comprehensive Analysis. IEEE Access, 5, 13951-13977.
 Kayalvizhi, S. and Vinod K.D.M. (2017) Load Frequency Control of an Isolated Micro Grid Using Fuzzy Adaptive Model Predictive Control. IEEE Access, 5, 16241-16251.
 Kondoleon, D., Ten-Hope, L., Surles, T. and Therkelsen, R.L. (2003) The CERTS MicroGrid Concept. White Paper on Integration of Distributed Energy Resources, Prepared for Transmission Reliability Program Office of Power Technologies, US Department of Energy, Vol. 32.
 Zamora, R. and Srivastava, A.K. (2010) Controls for Microgrids with Storage: Review, Challenges, and Research Needs. Renewable & Sustainable Energy Reviews, 14, 2009-2018.
 Chen, L., et al. (2018) Coordination of SMES, SFCL and Distributed Generation Units for Micro-Grid Stability Enhancement via Wireless Communications. IEEE Access, 6, 36699-36710.
 Shi, K., Ye, H., Song, W. and Zhou, G. (2018) Virtual Inertia Control Strategy in Microgrid Based on Virtual Synchronous Generator Technology. IEEE Access, 6, 27949-27957.
 Ulbig, A., Borsche, T.S. and Andersson, G. (2014) Impact of Low Rotational Inertia on Power System Stability and Operation. IFAC Proceedings Volumes, 19, 7290-7297.
 Ma, Y., et al. (2017) Virtual Synchronous Generator Control of Full Converter Wind Turbines with Short-Term Energy Storage. IEEE Transactions on Industrial Electronics, 64, 8821-8831.
 Xiong, R., Cao, J., Yu, Q., He, H. and Sun, F. (2018) Critical Review on the Battery State of Charge Estimation Methods for Electric Vehicles. IEEE Access, 6, 1832-1843.
 Fang, J., Li, H., Tang, Y. and Blaabjerg, F. (2018) Distributed Power System Virtual Inertia Implemented by Grid-Connected Power Converters. IEEE Transactions on Power Electronics, 33, 8488-8499.
 Beck, H. and Hesse, R. (2007) Virtual Synchronous Machine. 9th International Conference on Electrical Power Quality and Utilisation, Barcelona, 9-11 October 2007, 1-6.
 D’Arco, S. and Suul, J.A. (2013) Virtual Synchronous Machines—Classification of Implementations and Analysis of Equivalence to Droop Controllers for Microgrids. IEEE Grenoble Conference, Grenoble, 16-20 June 2013, 1-7.
 Zhong, Q.C. and Weiss, G. (2011) Synchronverters: Inverters that Mimic Synchronous Generators. IEEE Transactions on Industrial Electronics, 58, 1259-1267.
 Driesen, J. and Visscher, K. (2008) Virtual Synchronous Generators. IEEE Power and Energy Society General Meeting—Conversion and Delivery of Electrical Energy in the 21st Century, Pittsburgh, PA, 20-24 July 2008, 1-3.
 Fang, J., Tang, Y., Li, H. and Li, X. (2018) A Battery/Ultracapacitor Hybrid Energy Storage System for Implementing the Power Management of Virtual Synchronous Generators. IEEE Transactions on Power Electronics, 33, 2820-2824.
 Lukic, S.M., Bansal, R.C., Rodriguez, F. and Emadi, A. (2008) Energy Storage Systems for Automotive Applications. IEEE Transactions on Industrial Electronics, 55, 2258-2267.
 Khaligh, A. and Li, Z. (2010) Battery, Ultracapacitor, Fuel Cell, and Hybrid Energy Storage Systems for Electric, Hybrid Electric, Fuel Cell, and Plug-In Hybrid Electric Vehicles: State of the Art. IEEE Transactions on Vehicular Technology, 59, 2806-2814.
 Visscher, K. and de Haan, S. (2008) Virtual Synchronous Machines for Frequency Stabilisation in Future Grids with a Significant Share of Decentralized Generation. SmartGrids for Distribution, IET-CIRED, 1-4.
 Kerdphol, T., Rahman, F.S. and Mitani, Y. (2018) Virtual Inertia Control Application to Enhance Frequency Stability of Interconnected Power Systems with High Renewable Energy Penetration. Energies, 11, 981.
 Wang, R., Sun, Q.Y., Ma, D.Z. and Liu, Z.W. (2019) The Small-Signal Stability Analysis of the Droop-Controlled Converter in Electromagnetic Timescale. IEEE Transactions on Sustainable Energy, 1-11.
 Ahmed, T., et al. (2004) Terminal Voltage Regulation Characteristics by Static Var Compensator for a Three-Phase Self-Excited Induction Generator. IEEE Transactions on Industry Applications, 40, 978-988.
 Kuo, S.C. and Wang, L. (2001) Analysis of Voltage Control for a Self-Excited Induction Generator Using a Current-Controlled Voltage Source Inverter (CC-VSI). IEE Proceedings—Generation, Transmission and Distribution, 148, 431-438.
 Leidhold, R., Garcia, G. and Valla, M.I. (2002) Induction Generator Controller Based on the Instantaneous Reactive Power Theory. IEEE Transactions on Energy Conversion, 17, 368-373.
 Chen, C.L. and Lin, C.E. (1996) An Active Filter for an Unbalanced Three-Phase System Using the Synchronous Detection Method. Electric Power Systems Research, 36, 157-161.
 Jung, Y.G., et al. (2003) The Algorithm of Expanded Current Synchronous Detection for Active Power Filters Considering Three-Phase Unbalanced Power System. IEEE Transactions on Industrial Electronics, 50, 1000-1006.
 Lejerskog, E., et al. (2015) Experimental Results on Power Absorption from a Wave Energy Converter at the Lysekil Wave Energy Research Site. Renew Energy, 77, 9-14.
 Waters, R., et al. (2011) Ocean Wave Energy Absorption in Response to Wave Period and Amplitude Offshore Experiments on a Wave Energy converter. IET Renewable Power Generation, 5, 465-469.
 Parwal, A., et al. (2018) Energy Management for a Grid-Connected Wave Energy Park through a Hybrid Energy Storage System. Applied Energy, 231, 399-411.
 Blaabjerg, F., et al. (2006) Overview of Control and Grid Synchronization for Distributed Power Generation Systems. IEEE Transactions on Industrial Electronics, 53, 1398-1409.
 Eriksson, R., Modig, N. and Elkington, K. (2018) Synthetic Inertia versus Fast Frequency Response: A Definition. IET Renewable Power Generation, 12, 507.
 Pogaku, N., Prodanović, M. and Green, T.C. (2007) Modeling, Analysis and Testing of Autonomous Operation of an Inverter-Based Microgrid. IEEE Transactions on Power Electronics, 22, 613-625.
 Vandoorn, T.L., et al. (2011) Smart Microgrids and Virtual Power Plants in a Hierarchical Control Structure. 2nd IEEE PES International Conference and Exhibition on Innovative Smart Grid Technologies, Manchester, 5-7 December 2011, 1-7.
 D’Arco, S., Suul, J.A. and Fosso, O.B. (2015) A Virtual Synchronous Machine Implementation for Distributed Control of Power Converters in SmartGrids. Electric Power Systems Research, 122, 180-197.
 Barrado, J.A., Griñó, R. and Valderrama-Blavi, H. (2010) Power-Quality Improvement of a Stand-Alone Induction Generator Using a STATCOM with Battery Energy Storage System. IEEE Transactions on Power Delivery, 25, 2734-2741.
 Kelly, J.F. and Christie, R. (2017) Applying Hardware-in-the-Loop Capabilities to an Ocean Renewable Energy Device Emulator. 12th International Conference on Ecological Vehicles and Renewable Energies (EVER), Monte Carlo, 11-13 April 2017, 1-7.