Virtual Synchronous Generator Based Current Synchronous Detection Scheme for a Virtual Inertia Emulation in SmartGrids

Renewable energy sources, such as photovoltaic wind turbines, and wave power converters, use power converters to connect to the grid which causes a loss in rotational inertia. The attempt to meet the increasing energy demand means that the interest for the integration of renewable energy sources in the existing power system is growing, but such integration poses challenges to the operating stability. Power converters play a major role in the evolution of power system towards SmartGrids, by regulating as virtual synchronous generators. The concept of virtual synchronous generators requires an energy storage system with power converters to emulate virtual inertia similar to the dynamics of traditional synchronous generators. In this paper, a dynamic droop control for the estimation of fundamental reference sources is implemented in the control loop of the converter, including active and reactive power components acting as a mechanical input to the virtual synchronous generator and the virtual excitation controller. An inertia coefficient and a droop coefficient are implemented in the control loop. The proposed controller uses a current synchronous detection scheme to emulate a virtual inertia from the virtual synchronous generators. In this study, a wave energy converter as the power source is used and a power management of virtual synchronous generators to control the frequency deviation and the terminal voltage is implemented. The dynamic control scheme based on a current synchronous detection scheme is presented in detail with a power management control. Finally, we carried out numerical simulations and verified the scheme through the experimental results in a microgrid structure. How to cite this paper: Parwal, A., Fregelius, M., Silva, D.C., Potapenko, T., Hjalmarsson, J., Kelly, J., Temiz, I., de Oliveira, J.G., Boström, C. and Leijon, M. (2019) Virtual Synchronous Generator Based Current Synchronous Detection Scheme for a Virtual Inertia Emulation in SmartGrids. Energy and Power Engineering, 11, 99-131. https://doi.org/10.4236/epe.2019.113007 Received: February 6, 2019 Accepted: March 10, 2019 Published: March 13, 2019 Copyright © 2019 by author(s) and Scientific Research Publishing Inc. This work is licensed under the Creative Commons Attribution International License (CC BY 4.0). http://creativecommons.org/licenses/by/4.0/ Open Access


Introduction
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 [1].The increasing penetration of RES has significant advantages but there are challenges as well [2].The most crucial challenge is the operating stability alongside conventional generation units [3] [4].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 [5] [6].
Carrsaco et al. [7] 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 [8] [9] [10].The idea of a MG was first proposed by the Consortium for Electric Reliability Technology Solutions (CERTS) [11].Microgrids are generally considered to be mature and flexible interconnected systems [12] [13].The structure of MGs is an interconnection of distributed energy resources (DER) [14], such as microturbines, wind turbine generator (WTG), wave energy converters (WEC), fuel cells and photovoltaics (PV) integrated with storage devices, such as batteries, flywheels, superconducting magnetic energy storage (SMES) systems [15], and power capacitors on low voltage distribution systems [16].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 [17].
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 [18].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 [19].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) [17].
Critical reviews on energy management of ES with extensive results can be found A. Parwal [21].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 [22] [23] [24].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 [25] [26].The concept of VISMA is proposed in [23], 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 [25], 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 [27] [28] [29].The idea of virtual SG was proposed in [26] [30], 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 [31] [32] [33] [34].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) [35], the static reactive power compensator (STATCOM) [36], and the power balance theory (PBT).A passivity based control (PBC) is mentioned as a suitable control strategy for an unbalanced voltage condition [37].Techniques like the synchronous reference frame (SRF) theory and the instantaneous reactive power theory (IRPT) [38] [39] [40] are the most renowned techniques for the voltage regulation.The SVCbased 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 [41].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 [42] [43].The CSD theory was proposed as an equal current approach and suitable for both balanced and unbalanced systems in [42].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.

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. [17] 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, e P , and the reactive power, l Q , at the loads,  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 flow 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 [44] [45] [46] [47] [48].The performance of the controller is demonstrated under varying loads and RES power conditions.A WEC feeds the rectified power, intermittent by nature, into the DC-link.

Control Overview of the System Structure
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 [49] 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, dc v ∆ , is dynamically regulated corresponding to the measured frequency deviation, f ∆ , through a gain, c K , 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.

The Conventional Control Scheme of Virtual Inertia
The dynamic behavior of a synchronous machine can be described in Formula (1) [50], where m T is the input mechanical torque, e T 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), T 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, R E , and the inertia constant are defined in (3) [18] with J = 1.642 kg-m 2 and system rated power, 40 kW The variation of the rotor kinetic energy, R E ∆ , can be defined as in (4), ( ) where m P , and e P 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.

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) [17], ( ) where * r P is the virtual mechanical input power, e P is the electrical power flowing into the grid, * r Q is the reactive power reference, Q is the filtered reactive power measurement, * V , and V are the referenced and output voltage amplitude respectively, θ is the electrical angle, and D, q D are the active and reactive damping factors, respectively.

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) [27].Both the power variation caused by the RESs, RES p ∆ , and the power variation by the frequency depended loads, l p ∆ (also known as the damping power), should meet the power exchange of the VSG, , used for the power balancing in real time, where f ∆ 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 iner- where d r is the frequency-droop coefficient acting on f ∆ during the RES power variations wec P .The VSG power contribution by the inertia emulation cap p ∆ 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 where is the inertia coefficient of the capacitor and defined in (11) as a function of the capacitance dc C , reference DC-link voltage ref dc v , and the system rated power, rated p , ( ) Therefore, the inertia coefficient of the capacitor cap H is inversely related with the gain c K and can be expressed as ( cap c

H H K =
).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 c K 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.

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 The mechanical speed VSG ω , of the VSG is given by the integral of the pow- er-balance formula (13) while the phase angle VSG θ , of the VSG is obtained by the integral of the speed.The damping power l p ∆ , presenting the damping ef- fect of the VSG, defined by the product of active-damping factor D and the difference between the VSG frequency-VSG f , and the actual grid frequency g f , as in (7) where 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 * ref P , through the CSD theory.The bene- fit 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 f P and the fundamental active power component of the loads fl P , which is the filtered average power of the loads.The frequency error is processed to the PI controller for the estimation of f P in (14).To obtain fl P , a first order low pass filter is applied with a cut-off frequency f ω as shown in Figure 4, Figure 3. VSG inertia emulation with power-frequency droop. where

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 [52]- [57].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 *

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), Substituting (20), in (19) The total average power is obtained by taking the sum of the reference source active power components in each phase ( 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 t U is the terminal voltage and expressed in (25), Using ( 29 where the total power is the reference source active power (

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, qa qb qc The reference source reactive power ( * ref Q ) is converted to the reactive power component of the three-phase source currents using quadrature phase voltages ( , , aq bq cq U U U ) and the peak of the phase voltages in (28), The quadrature phase voltages are estimated by using the amplitude of the PCC

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 Fig- ure 1 is realized in MATLAB/Simulink by using the real parameters of the WEC and VSG system similar to a real application.

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 * ref P 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   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

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 dc v 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, dc v , 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 dc v 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 dc v 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 dc v 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.

Experimental Validation
The experiments were carried out to verify the practical feasibility of the pro-  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 [59], 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 ( 6 s  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.

Conclusions
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 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, wec P and the per- turbation of the loads l P are well controlled under the allowed maximum fre- quency deviation max f ∆ .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 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 DOI: 10.4236/epe.2019.113007102 Energy and Power Engineering 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.
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 .
Figure 1.Block diagram of the proposed VSG system.

Figure 1 C
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 B I and Batt L are the flowing DC current and the inductance of the DC-DC converter.The parameters, s L and 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 ( d d f t ∆ ), 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 f ∆ and does not depend on d d f t ∆ which means the damping power only can support in a steady state instead of the transient process [51].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   , stable with a margin of allowed voltage fluctuation dc v ∆ in the DC-link.The power management effectively controls the deviations in the frequency and the DC-link voltage.The battery power b p ∆ should follow the power referenced from the frequency-droop droop p ∆ to meet the power demand at the DC-link for the slowly varying fluctuations.The frequency-droop power for the battery is expressed in (8),

Figure 7 .Figure 4 .
Figure 7.The reactive current components ( ) , , r q a b c i are estimated by using the

Figure 5 .
Figure 5.The equivalent circuit and phasor of the VSG.(a) Equivalent circuit; (b) Phasor diagram of each vector component.

Figure 6 .
Figure 6.Structure of the VSG excitation regulator with DDC based reactive power control.

Figure 7 .
Figure 7.Control structure of reference source reactive power estimator (RPE).

) 4 .
Modeling of the Proposed Control Scheme Based on a CSD Control Scheme4.1.Modeling of the Control SchemeThe 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, frequency, and 2) a quadrature component, the reactive power current component, ( ) magnitude of the generated voltage (the terminal voltage).The reference source active power * ref P , is estimated by taking the difference of the output of the frequency PI controller f P , and the filtered average load power fl P .The three-phase reference active-power components of the source currents ( ) .To regulate the terminal voltage at the PCC the VSG requires a reactive power support.The reference source reactive power component ( * ref Q ) 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 ( ( ) and the quadrature phase voltages (QPV), , , aq bq cq U U U .The algebraic sum of the active-power components of the source currents ( ) reactive-power components of the reference source currents ( 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.
are the peak amplitude of the active current in each phase.
) based on the CSD theory estimation, the reference source active power ( * ref P ) is converted into the active power component of the three-phase source currents ( ( ) phase voltages and the peak of the phase voltages in(26).

Figure 8 .
Figure 8. Phase angle of the grid and the VSG during the synchronization.

Figure 9 .Figure 9 ,
Figure 9. VSG and the referenced active power with the frequency regulation.

Figure 10 .
Figure 10.VSG and reference reactive power with the regulated terminal voltage.

Figure 12 .
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.

Figure 13 .
Figure 13.ESS power, the load variations, WEC and VSG power output.

posed 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 A. Parwal et al.DOI: 10.4236/epe.2019.113007119 Energy and Power Engineering
force is converted into a torque for the rotatory emulator.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 Figure16.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 Figure16(a) and Figure16(b).The similar event roughly at t = 183 s is considered to present the effectiveness of the control and presented in Figure16(c) and Figure16(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.
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.

capH
scheme has been tested and verified on an experimental platform to validate the scheme.
et al.

Table 2 .
System and control parameter values utilized in the study.
(12)K pi, Energy and Power Engineering inertia is determined by the power-balance formula in(12)as shown in Figure3, The actual grid frequency is measured by a dual second order generalized integrator-PLL (DSOGI-PLL).