1. Introduction
In recent years, microgrids have gained attention to enhance the resilience of the power grid [
1], while also complementing conventional power systems through flexible operation and allowing off-grid electrification [
2]. Understanding that energy demand has been consistently growing worldwide, microgrids are effective solutions for boosting the integration of renewable resources into the electric power system and supporting traditional generation resources to maintain a continuous supply most times. There are two operating modes for a microgrid, (1) island configuration and (2) grid-connected structure, each with its own specific requirements. The general control scheme for the correct functioning of the system in each case is different, and this fact increases the complexity of the power system operation. In addition, in certain cases, the power electronic inverter should provide some ancillary services as one of the core components, such as (1) inertia emulation, (2) power oscillation damping, and (3) unbalance compensation [
3].
Furthermore, the number of microgrids has been continuously increasing, making the electrical power system more complex. The complexity of such infrastructures is considerable when they are interconnected, through sophisticated communication protocols required to deliver sustainable and secure renewable resources at an affordable price [
4]. In addition, modeling AC microgrids is a challenge when they are included as an asset in the analysis of an electrical power system, considering that their testing systems need to be as realistic as possible. Therefore, there are several critical aspects that the power electronics designer must consider before deploying in an actual facility. In this way, studying the behavior of the inverter-based generation resources and their controllers is crucial.
In pursuit of this, test systems are generally characterized by three essential properties: (1) test coverage, (2) fidelity, and (3) cost. Assessment of microgrids using professional software such as MATLAB R2022A, PSIM v21.1, and PSCAD V50 provides an effective tool; however, model accuracy and long simulation times can become limiting factors in several applications. True fidelity can only be attained when analytical and experimental studies are ultimately validated in the actual full-scale system. Nevertheless, test coverage remains constrained due to the risks posed to real components. In this context, the Power-Hardware-in-the-Loop (PHIL) simulations in experimental setups remains a valuable tool for the present and the near future [
4,
5,
6,
7,
8]. PHIL simulation in an experimental setup is described as an advanced closed-loop technique in which the hardware under test (HUT) is coupled with a real-time simulated model. The main parts of a PHIL simulation in an experimental setup are the HUT, the power interface (also known as the power amplifier), and the real-time simulator (RTS). The success of an analysis of a PHIL simulation in an experimental setup involves several challenges, such as the stability of the interface algorithm (IA), the accuracy, and the bandwidth.
Thus, different strategies have been adopted to analyze these challenges in the context of a PHIL simulation in an experimental setup. The authors in [
8,
9] focus on examining accurate and stable real-time simulations of integrated power electronic devices and power systems, presenting analytical stability that ensures safe operation of the whole system. It presents an in-depth dissertation of different interface algorithms for PHIL simulation emphasizing numerical stability and accuracy. The documents introduce the Multirate Partitioning (MRP) interface algorithm, which uses multiple time steps for the real-time simulated subsystems, depending on proximity to the power amplifier. Compared to single rate methods, the MRP interface proves to be a promising solution to enhance accuracy, even during transients. Unlike the switched power amplifier that is studied in this paper, the experimental setup in [
8,
9] includes multiple linear power amplifiers to validate the fidelity of the PHIL simulation waveforms, with time steps ranging between
and
.
The paper in [
10] presents a stability analysis varying the total time delay and the cutoff frequency of the low-pass filter. It shows that the cutoff frequency and the ideal transformer model (ITM) interface algorithm are crucial to preserve the stability of the PHIL simulation, considering an RL circuit as the HUT. Instead, in this paper, the experimental stability analysis is focused on variations of the short-circuit ratio and the line impedance ratio
in order to select the correct feedback-current-filter cutoff frequency when evaluating weak and stiff utility grids. Reference [
11] addresses the stability considering an open-loop VSI power amplifier without an output filter and uses a DSP for the real-time simulation modeling of a synchronous machine, with an RL load as the HUT. It studies stability boundaries with parameter variations of the RL load and the
ratio of the synchronous machine. This paper is devoted to evaluate the performance of its proposed power amplifier and the real-time digital modeling, and it does not includes power electronics in the HUT. For nonlinear behaviors, in [
12], it is recommended to integrate the ideal transformer model (ITM) and the partial circuit duplication (PCD) interface algorithms, thereby the damping impedance method (DIM) interface algorithm provides both high stability and good accuracy, as long as the damping impedance is close to the actual impedance of the HUT for a RL circuit and a diode rectifier. This paper explores the V-ITM method for evaluating actual parallel three-phase grid-following inverters, according the study presented in [
12].
The work in [
13] studies a PHIL simulation in an experimental setup that includes both linear and switched power amplifiers to test a commercial on-board charger. This configuration provides sufficient flexibility to build within an RTDS both a battery emulator (BE) for the DC side and a grid emulator (GE) for the ac side, using the RSCAD interface. The GE uses a 900 W A.E. Techron linear power amplifier to reproduce grid voltages/current at the HUT terminals. On the BE path, a bidirectional switch-mode power amplifier emulates lithium-ion battery behavior. Although the authors carried out a stability analysis for specific values of the device under test impedance (
), the proposal lacks a broader bandwidth for the equivalent grid impedance.
The proposal in [
14] develops a stability analysis considering the voltage-source ITM interface algorithm and an RTDS NovaCor platform digitally linked to the power amplifiers via the AURORA optical-fiber protocol. Two types of four-quadrant power amplifier are considered using a resistive load as the HUT in a first scenario, and a three-phase photovoltaic (PV) inverter in a second scenario. Stability analysis is addressed on the basis of the two power amplifiers, and it is demonstrated that a basic approach to guarantee stability is feedback current filtering. Based on open-loop discrete-time impedance frequency response, the method in [
15] can be used to determine (without calculating closed-loop transfer function) if a closed-loop system will be stable and to find out which factor will have a dominant effect on stability. Despite the contributions of the works in [
14,
15], the experimental boundaries of the feedback current filter are not investigated.
In general, to fulfill the requirements of PHIL simulations in experimental setups, the RTS is expected to be accurate enough to reproduce the voltages and currents of the HUT (physical system) within a predefined time step. In this context, a PHIL simulation in an experimental setup is preferably suitable for performing a large number of tests in various industrial fields. For example, one application of the real-time simulation is the realistic representation of flexible alternating current transmission systems (FACTS), which is required for the optimal tuning of the controller parameters, leading to fewer issues at the commissioning stage. An industrial practice among FACTS manufacturers is the use of RTS for dynamic performance evaluation and factory acceptance tests (FAT) [
5]. A specific application in the field of AC microgrids is the PHIL simulation in an experimental setup described in [
1], where this concept was used to develop several projects, including grid-forming inverters.
The design of a PHIL simulation in an experimental setup lies in the IA, which is selected according to the software and hardware setup. IAs have been extensively examined in the past; some commonly used methods include: (1) the ideal transformer model (ITM), (2) partial circuit duplication (PCD), and (3) the damping impedance method (DIM) [
16]. Different techniques emerge in the literature to maximize the accuracy of a PHIL simulation, such as (1) feedback control, (2) feedback current filtering, (3) phase compensation, and (4) impedance matching [
17]. However, when designing an optimal interface algorithm for an AC microgrid test bench, it is also important to consider the operating mode of the inverters, i.e., grid-following or grid-forming modes; therefore, it is recommended to identify the components of the PHIL simulation in the experimental setup and establish the strategy to ensure stability.
The grid-following inverter tends to achieve better performance when using the voltage-source version of the ITM [
18,
19]. The source version ITM is based on the variable to be controlled. Therefore, in the grid-following mode, the main variable to be controlled is the output current, and the active and reactive powers are only used to build the reference signals in the dq frame. Through this technique, the inverter behaves as a current source that is independent on the voltage applied at the PCC, which is controlled by the power amplifier when using the voltage-source ITM interface algorithm. Unlike the grid-following inverter, the grid-forming inverter is intended to track the voltage at the PCC, and under this scenario the power amplifier should be modeled as a current type interface algorithm. Another method for the grid-forming inverters is considered in [
20], where the PCD is used as the IA with a real-time simulated model of the physical devices. Thus, the HUT modeling represents one of the more critical issues. Recently, in [
21], a new PHIL interface strategy was adopted to enhance the stability of the closed-loop system in the context of a grid-forming inverter for a microgrid setup.
In our laboratory, a PHIL simulation in an experimental setup has been commissioned to study the operation of modern electric power systems with power electronic devices. In this particular case, the performance of an AC microgrid test bench with two parallel grid-following inverters is evaluated. The success of the PHIL simulation in an experimental setup depends on the right selection of the interface algorithm for the interconnection between the software and hardware involved in the PHIL simulation and the right real-time simulation modeling. The study focuses on exploring the stability region of the AC microgrid while taking into account the necessary accuracy and bandwidth to ensure a safe PHIL simulation. This paper demonstrates that the stability of the entire AC microgrid can be compromised by uncontrolled changes in the utility grid and that stability is sensitive to the bandwidth of the feedback current filter. Thus, the main contributions of this paper are:
Through experimental testing, the stability boundaries for the PHIL simulation in the experimental setup for an AC microgrid is determined, demonstrating a direct relationship between the utility-grid short-circuit ratio and the feedback-current-filter cutoff frequency.
As well, this paper provides a thorough discussion of the correct design of the three real-time simulation subsystems for running secure and reliable PHIL simulations in an experimental setup involving power electronic devices.
Then, some guidelines for modeling and real-time simulation using a Opal-RT platform are established to guarantee a successful PHIL simulation in an experimental AC microgrid setup.
The paper is structured as follows.
Section 2 describes the AC microgrid under study and specifies the real-time simulation modeling for the utility grid.
Section 3 presents the real-time simulation modeling related to the interconnection process.
Section 4 describes the three subsystems involved in the real-time simulation modeling and the parameters necessary to run the PHIL simulation in an experimental setup.
Section 5 is dedicated to exploring the stability region by varying three parameters of the AC microgrid. Two case studies are developed to obtain crucial guidelines to ensure a successful PHIL simulation in an experimental setup.
Section 6 focuses on the findings about the real-time simulation modeling and stability boundary of the PHIL simulation in the experimental setup of the AC microgrid, and a selection of state-of-the-art articles is shown in a table that includes the main issues addressed in this paper to achieve successful experiments. Finally, the conclusions are given in
Section 7.
2. AC Microgrid Test Bench Description
Figure 1 describes the AC microgrid under study, which consists of two parallel three-phase grid-following inverters connected to the utility grid through LCL filters at the point of common coupling (PCC). The test bench consists of two sections, hardware and software. The first one involves the hardware under test and three blocks for the interconnection process. The other section consists of two simulation model blocks, the Utility-Grid model and the SS_Control block. The hardware consists of the following elements: (1) Imperix PEB8024 power (Imperix ltd., Sion, Switzerland) electronics modules to build the two inverters, (2) a set of breakers
for the interconnection process, with
, and (3) a DC power source 62050H-600 (Chroma ATE Inc., Taoyuan, Taiwan) to provide
and
. The DC voltage
represents a renewable source provided by a photovoltaic system, and the DC voltage
is considered to be a battery energy storage system. The operation of the inverters in grid-following mode requires the following analog signals: three voltages
and six currents
sensed by the Imperix DIN-800V and DIN-50A modules (Imperix ltd., Sion, Switzerland), respectively; and two voltages
measured by the sensors hosted in the PEB8024 modules driven by fiber-optic signals, where
and
. The Interface (Imperix) block is designed to receive analog signals from sensors. This interface can handle up to 16 analog inputs and 16 digital input/output channels. The OP8110 (OPAL-RT Technologies, Inc., Montreal, Quebec, Canada) power amplifier is used to interconnect power signals between the HUT and the real-time simulated model of the utility grid. The Host PC block is used to prepare the interconnection process. The simulation model section is in the RTS OP4510 (OPAL-RT Technologies, Inc., Montreal, Quebec, Canada). The real-time simulated model of the utility grid is hosted in Core 1, and the control system for power electronic devices (SS_Control) in Core 2.
Given that the utility grid can be represented by an equivalent Thévenin model, the simplified structure is defined by the source
, with
, and the same impedance
in the three phases, calculated using the short-circuit ratio (
) and the line impedance ratio
:
where
is the line-to-line rms voltage at PCC, and
is the nominal power in VA at PCC. In addition, the ideal voltage transformer method (V-ITM) is proposed to link the two subsystems. Through this method, the power amplifier is set to function as a voltage-controlled source, where the reference setpoint,
, is measured at the terminals of
. The SFP (Small Form Factor Pluggable) transceivers are used for the generic Aurora protocol developed by Xilinx (Corporate Headquarters. Xilinx, Inc., San Jose, CA USA), and are required to send the reference and collect the feedback signals from the power amplifier OP8110 to the real-time simulator OP4510.
3. Real-Time Simulation Modeling Overview
The AC microgrid setup includes physical and simulation components.
Figure 2 describes a simplified version of the system to address the modeling of the test bench and the V-ITM. The schematic shows only one phase of the system, and the HUT is reduced to an equivalent Thévenin model. The voltage source
and the impedance
represent the equivalent electric circuit of the utility grid, defined by specific
and
values. This representation is suitable for stability analysis, which is required to establish the operating limits of the AC microgrid. The resistance
is the element where the voltage
is sensed, which is the setpoint to be reproduced by the OP8110 power amplifier. The value of
is sufficiently high that its current can be considered zero. Because of this, the current
, supplied by the grid, slightly deviates from the feedback current
. Additionally, a feedback current filter
is added to the feedback loop to preserve the stability of the whole system, given by
where
, with
a parameter to be determined. Defining the transfer function
involves the mismatch between the current
, with
, flowing through the HUT and the simulated one
. Thus, an important consideration when configuring a PHIL simulation in an experimental setup includes the inherent error introduced by the IA, and minimizing this error improves its precision. The power amplifier is modeled through the transfer function
:
where
, with
. The parameter
represents the real-time simulation time step, and
corresponds to the inherent delay of the OP8110 power amplifier.
captures the dynamic of this component, which is required to apply the voltage
to the HUT. The impedance
along with
models the HUT.
One of the key aspects of the experimental setup is to determine the appropriate constant
to ensure stable operation of the AC microgrid. Thus, the stability of the PHIL simulation in the experimental setup is addressed through an experimental perspective. In
Figure 3 is shown the block diagram of the one-line circuit of the AC microgrid. As illustrated, identifying the equivalent HUT model
is crucial to address stability analysis. From
Figure 3, the open loop transfer function is obtained as
Thus, modifying the parameters of
directly impacts the frequency response of
. To determine
, a frequency sweep from
to
is proposed, which is a decade below bandwidth of the power amplifier, which is 10 kHz. This performance evaluation of the AC microgrid is of great importance, since a slight variation in one of its parameters could lead to large oscillations if it is not well characterized. As an example,
Figure 4 shows the behavior of Inverter 2 when increasing the parameter
of the control system presented in
Figure 5 by 33% over its nominal value, with a feedback current filter
adjusted to a cutoff frequency of
. This parameter
corresponds to the sum of inductances
and
, presented in
Figure 1. As seen in
Figure 4a, the output power reaches the reference command of
as expected, which confirms the correct controller tuning in the PHIL simulation in the experiment setup with the chosen feedback current filter. In contrast,
Figure 4b shows active power oscillations, which are significantly higher compared to the previous case. Note that this signal is collected in real time using the RT-LAB model, with a decimation factor of 100 and a nominal time step of
.
6. Findings About the Real-Time Simulation Modeling and Stability Boundary
The experimental results provide valuable information on the stability limits of the PHIL simulation in the experimental AC microgrid setup using an OP8110 power amplifier under different operating conditions. In Experiment 1, the tracking of both active and reactive power references highlights the effectiveness of the control system in handling smooth transitions through several generation dispatches. The smooth transitions confirm that the current control strategy adopted ensures the reliable performance of the grid-following inverters when operating under stiff grid conditions. Although this condition demonstrates the capability of the PHIL simulation in the experimental setup to operate as expected with a feedback current filter of 1 kHz, it does not provide further information on the limits for the same scenarios. However, it is worth highlighting that these results are consistent with previous findings in the literature, where voltage-source ITM has been reported as a preferable interface method for grid-following converters.
In Experiment 2, the stability boundaries reveal a strong dependence on the feedback-current-filter cutoff frequency and the short-circuit ratio of the equivalent electric circuit of the utility grid. For low values, the system preserves stability only at relatively low cutoff frequencies, whereas higher values allow for broader bandwidths without compromising stability. This behavior aligns with expectations from the literature, since weak grids exacerbate the equivalent impedance of the utility grid, requiring ratios above unity and therefore imposing tighter control bandwidth limitations. Even in the presence of uncertainty in the impedance value of , a relevant observation is that the lower the grid impedance, the higher the value of should be. Within the scope of this work, the calculation of this parameter is not addressed; instead, a practical stability margin analysis is performed. The observed difference between ratios of 7 and 10 further confirms that inductive grids impose stricter stability constraints, which should be carefully considered during the design stage.
Overall, the findings highlight the importance of selecting an appropriate cutoff frequency for the feedback current filter according to the specific characteristics of the utility grid. Beyond validating the accuracy of the real-time simulated model, the results provide practical design guidelines for deploying PHIL simulations when inverter-based resources are considered as the HUT. Additionally, the results allow us to determine the stability boundaries of the PHIL simulation in the experimental AC microgrid setup with the OP8110 power amplifier. Of particular interest is the fact that parameter variations of the AC microgrid directly affect the stability regions. The experimental setup successfully replicates real operating conditions, which provides a reliable basis for future research on AC microgrid control.
Table 3 presents a selection of state-of-the-art articles on PHIL simulation in experimental setups, given some important characteristics such as the HUT, if a parametric variation was considered, the power level, the real-time digital simulator, the power amplifier and its interface algorithm, and the last column is about stability analysis. The last row incorporates the characteristics of the PHIL simulation in the experimental AC microgrid setup that address this paper to analyze the stability boundaries before parametric variations.
Although this article presents an analysis to determine the stability boundaries to parametric variations via experiments, the next step would be to consider an analytical study. Then, it becomes crucial to determine the equivalent electrical circuits of both the real-time simulated power systems and the HUT, specially when power electronic devices are involved. The switching, the bilinearity and the delay associated to the converters are behaviors that should be considered in these equivalent circuits.