Emulation of grid-forming inverters using real-time PC and 4-quadrant voltage amplifier

A test bed for the evaluation of novel control methods of inverters for renewable power generation is presented. The behavior of grid-following and grid-forming control in a test scenario is studied and compared. Using a real-time capable control platform with a cycle time of 50 µs, control methods developed with Matlab/Simulink can be implemented. For simplicity, a three-phase 4‑quadrant voltage amplifier is used instead of an inverter. Thus, the use of modulation and switched power semiconductors can be avoided. In order to show a realistic behavior of a grid-side filter, passive components can be automatically connected as L‑, LC- or LCL-filter. The test bed has a nominal active power of 43.6 kW and a nominal voltage of 400 V. As state-of-the-art grid-following control method, a current control in the d/q-system is implemented in the test bed. A virtual synchronous machine, the Synchronverter, is used as grid-forming control method. In combination with a frequency-variable grid emulation, the behavior of both control methods is studied in the event of a load connection in an island grid environment.


Introduction
Due to the increasing share of renewable electricity generation, the share of power electronic generation plants is increasing in numerous grids. Furthermore, the number of conventional power plants consisting of turbine-driven synchronous generators is decreasing. Due to the accompanying reduction of inertia, previously unknown stability prob-K grid emulation inverter to test ~~= SG Fig. 1 Island grid environment to test inverters (simplified) lems occur once power electronic equipment has reached a certain level of penetration [1]. The Irish transmission system operator, for example, limits the share of non-synchronous generation (SNSP) to 65% at any time in the Irish grid area. Since January 18, 2021, a test phase with an SNSP of 70% began [2]. This can lead to wind power plants being curtailed at windy times. In 2020, 2.1% of the available energy from wind power plants in the Irish grid area was curtailed due to the SNSP limitation [3].
Unlike synchronous generators, conventionally grid-following controlled inverters behave like a current source. Grid-side inverters in regenerative power generation plants feed in an active power specified by their plant control, thus attempting to enable maximum yield from the limited available energy supply [4]. By using grid-forming control methods, inverters are able to provide inertia like synchronous generators. For example, grid-forming inverters can support the grid instantaneously with additionally injected active power in case of a power plant failure in contrast to grid-following inverters [5].
In addition to simulative testing of new control methods, the authors consider it useful to also conduct experimental investigations. These can be used to validate control methods and their implementation. Since many gridforming control methods differ from grid-following control even in the innermost control loop, a commercially available grid-following inverter, as used in regenerative power generation plants, cannot be used for such studies.
In order to accelerate the development process of gridforming control methods, a test bench for inverter emulation was developed, which is presented in this paper. Instead of an inverter with modulation and power semiconductors, three 4-quadrant linear amplifiers are used here. However, switch-mode amplifiers could also be used. Advantageous by using linear voltage amplifiers is that the control can be tested with a real grid independently of inverter topologies as well as their modulation. The setup is thus less complex and allows simple testing of control methods. The authors are aware that grid-forming control methods are operated with PWM-based inverters in their later application.
The control is performed by means of a real-time PCbased control platform, which is also used in industrial environments such as wind power plants [6]. shows an exemplary application of the PC-based control platform for controlling a modular multilevel converter. In contrast to real-time simulators, a later implementation of a control system tested in this way in real plants is possible without significant additional costs. Unlike Power Hardware-in-the-Loop, however, no physical system is simulated in real time [7]. Only the control is performed on the real-time system.
To evaluate the behavior of a grid-forming control method in case of a frequency dip, it is not sufficient to connect the inverter emulation to the mains. Therefore, the inverter emulation is operated with the already developed grid emulation. The synchronous generator-based grid emulation is described in detail in [8]. In an island grid environment, a load is fed by a synchronous generator as well as by the inverter or its emulation, see Fig. 1. By connecting an additional load, a frequency dip can be generated, as it occurs in grids in case of the failure of a large power plant.

Inverters in wind power plants
To achieve a high efficiency at varying wind speeds, modern wind power plants are variable speed systems. This enables the generator rotational speed to be adapted to the wind speed over a wide range, independent of the grid frequency. A converter is required for this purpose. The most common design for current wind power plants is the decoupling via a full-scale converter. In this design, the ACvoltage generated by the generator is rectified and the power is fed to a DC-link. A self-commutated inverter generates a three-phase current from the DC-link, which is fed into the medium-voltage grid via a grid-side filter and a transformer [9].

Grid-following control
In order to achieve the highest possible yield, inverters of power electronic generation systems classically feed the  Fig. 3 Synchronverter control according to [10] power into the grid that is available at the time. For that purpose, a grid-following control strategy is suitable. A classical grid-following control strategy consists of a cascaded control which is based on the Park transform. For the Park transform the extraction of the grid phase from the measured grid voltage is necessary, this is done typically by a phase-locked loop (PLL). The inner control is a current control. The current reference values are obtained from a superimposed DC-link voltage or AC power control. Fig. 2 shows a current control with superimposed power control. With this system, active and reactive power can be quickly and precisely controlled in a sufficiently strong grid [4].

Grid-forming control
In contrast to a grid-following control, a grid-forming control shows the behavior of a voltage source. Thus it is possible to operate in a weak grid or even in islanding mode. The power flow results from the difference between the voltage provided by the inverter and the grid voltage over the grid impedance. This means that if the grid voltage changes with respect to frequency, phase or amplitude, as for example in the case of a power plant failure, a grid-forming controlled inverter is able to immediately increase its power in-feed [10]. One class of grid-forming control methods are the virtual synchronous generators. They emulate the behavior of synchronous generators as used in conventional power plants.
There are many different implementations of virtual synchronous generators [11]. For this paper, the self-synchronized Synchronverter was chosen [12].
In Fig. 3, the control structure of the Synchronverter is shown. In the upper part of the figure, the swing equation is visible. The active power setpoint is converted into a virtual mechanical driving torque. The sum of the torques is integrated and leads to the virtual mechanical angular frequency. A further integration results in the virtual rotor angle. The reactive power is controlled by the excitation flux. From mechanical angular frequency, rotor angle, excitation flux and the measured currents, the electrical countertorque, reactive power and the voltage reference values are calculated. The voltage reference values can now be transferred to the modulation of an inverter, which impresses these voltages in the time average value [10].
The synchronization process is carried out using a virtual impedance. This means that a PLL can be dispensed with in all operating states. For the sake of clarity, the synchronization device is not shown in Fig. 3. [12].

Emulating inverters
From the point of view of the AC side, the converter legs of a three-phase inverter can be emulated by three controlled ideal voltage sources. Due to the high attenuation of a grid-side LC or LCL filter of an inverter in combination with a high switching frequency, the modulation can be neglected in approximation when considering measured quantities on the grid side of the filter. When neglecting the modulation these voltage sources output a sinusoidal voltage. This allows various inverter topologies to be emulated. Nevertheless, a dead time of the modulation can be considered. Before the test bed was set up, it was designed simulatively using Matlab Simulink. This also demonstrated the approximate validity of the simplification.
As voltage sources three APS10000 4-quadrant linear amplifiers from Spitzenberger & Spies are used. Each amplifier thus replicates a converter leg. The APS10000 is equipped with internal protection circuits, which make a destruction of the device, e.g. by an overcurrent, almost impossible. This allows the investigation of necessary oversizing of inverters as well as current limitation for gridforming control methods.
Due to the lack of modulation, a filter would not be necessary, but it determines the behavior of the control. To achieve the behavior of an inverter, additional chokes, capacitors and low inductive power resistors enable the setup of a variable hardware grid-side filter. The filter can be configured as L, LC or LCL filter. The LC and LCL filter can also be damped. This allows maximum flexibility when emulating various inverters. The complete setup is shown in Fig. 4.
At the point of common coupling (PCC), the inverter emulation is protected by a circuit breaker. The tripping threshold of the circuit breaker is set to 63 A. This results in a nominal power of the converter emulation of 43.6 kW. The mains, a grid emulation based on another 4-quadrant voltage amplifier or a grid emulation based on a synchronous generator can be connected at the PCC [8].

Automation and control
The inverter emulation is controlled and monitored by a Beckhoff Embedded PC. The Embedded PC is characterized by a cycle time of 50 µs and real-time capability.
All measured values are hereby acquired. At the PCC, currents and voltages are measured for each phase. Furthermore, the internal current and voltage measurements of the APS10000 are used. The three-phase reference output voltage in the range of ±10 V is transferred directly to the APS10000 via analog output terminals. Control methods can be developed simulatively using Simulink on the basis of a physical Simscape model of the test bed. After this, a code of the control can be created by means of compilation, which can then be executed on the Embedded PC in real time. Manual generation of the code is thus not necessary.
A TwinCAT HMI is used to control the test bed. The contactors for filter selection and grid connection can be controlled. The switching states of the contactors as well as the voltages, currents, power and frequencies at the two measuring points shown are displayed. Maximum current and voltage peak values can be set for an integrated emergency stop. In addition to the software implementation, there is a hardware emergency stop circuit, which can safely shut down the complete test bed including the APS10000.

Experimental results
In this section, the functionality of the inverter emulation and the difference between a grid-following and a gridforming control strategy is demonstrated and compared with a case without inverter emulation.
To achieve frequency dip, the inverter emulation is not connected to the grid, but to the synchronous generatorbased grid emulation [8]. The symmetric resistive base load in the island grid is 12 kW. By switching on an additional symmetric resistive load of 3 kW, a load step is generated which represents the failure of a power plant. The mea- Fig. 6 Active power fed in, measured at the PCC during 3 kW load step K surement at the PCC is used to calculate the power and frequency using a PLL.
In the first test, the grid contactor is open. This means that the load is completely fed by the synchronous generator. As a reference, the frequency response in the island grid generated by the load step is measured at the PCC without connected inverter emulation. In the second experiment the grid-following control strategy is tested. For this, the inverter emulation is connected to the grid. The active power setpoint of the inverter emulation is 6 kW which are fed into the grid. As third test the grid-forming control strategy self-synchronized Synchronverter is implemented. The grid-forming inverter also feeds an active power of 6 kW into the island grid according to its setpoint. Fig. 5 shows the three measured frequency responses. The load step occurs at 0 s. The reference frequency and the grid frequency with the grid-following controlled inverter emulation are very similar. The frequency nadir is about 49.54 Hz. Fig. 6 shows that the active power fed in is almost constant at 6 kW regardless of the load step. Consequently, the inverter emulation controlled in this way has no gridsupporting influence.
In contrast, the frequency dip of the grid-forming control strategy is approximately 49.64 Hz and hence less significant, see Fig. 5. It is also noticeable that the most extreme frequency gradient (RoCoF) is lower. The instantaneously injected additional active power of about 2 kW shown in Fig. 6 demonstrates, that a grid-forming control method is able to provide inertia comparable to a synchronous generator.

Conclusion and outlook
In this paper, a test-bed was presented to test control methods developed in Simulink for gird-connected inverters easily. The Embedded PC with a cycle time of only 50 µs and direct control of 4-quadrant linear amplifiers allows the use of all possible control methods. An integrated safety concept ensures that even in the event of high currents or voltages, the system is not damaged. This also allows the validation of new grid-forming control methods and their current limitation.
The choice of the nominal voltage and the nominal power allows the connection to the mains supply, to other threephase 4-quadrant voltage amplifiers or to the previously developed frequency-variable grid emulation [8]. With a load step in the frequency-variable island grid, it was shown experimentally that in contrast to grid-following control methods, grid-forming control methods are able to provide inertia.
In the future, grid-forming control methods with current limitation will be tested and developed with the help of this test bed. In order to be able to investigate the influence of modulation, a self-commutated converter will be set up in a further step, which will also be controlled by a similar Embedded PC. This converter will be operated using the Simulink control methods already validated on the inverter emulation.