Abstract

This paper presents a performance comparison between switching and reduced-order models of grid-following inverters. Different models have been developed to study the inverter’s operation using MATLAB and PSIM simulation tools. These models offer a tradeoff between accuracy and computational burden. The switching model fully represents the discontinuities in the inverter due to switching, but such a model demands high computational resources. The inverter representation is simplified using reduced-order models, which is common in the literature. However, the fidelity of these simplified models might not be adequate for some applications. Therefore, it is essential to investigate the performance of such models closely to ensure their suitability depending on the purpose of the analysis. Hence, a comparative study between switching and reduced-order models is presented here by simulating different scenarios and operation conditions. The results have validated the efficacy of the reduced-order model in representing the grid-following inverter’s operation in both steady state and response to a step change resulting from active or reactive power variation. Unlike the switching model, the findings illustrate that the reduced-order modeling fails to represent harmonics and losses. After simulating different scenarios, this work highlights the main differences between the switching and reduced-order models to facilitate the choice of the proper modeling method for researchers.

1. Introduction

The increase in global energy demand, accompanied by increased environmental awareness, has led to a rise in renewable energy penetration. Many of these newly explored renewable sources come as distributed generation (DG) that generates power as a DC source and hence requires an interface to the power grid. Grid-connected inverters facilitate energy conversion from the DC source to the grid side. A microgrid can be formed by clustering multiple DG units, loads, and energy storage systems. These small-scale grids can operate in a grid-connected mode where reliable grid access is available or in autonomous mode where grid accessibility is limited [1].

With critical grid requirements and the renewable source’s intermittent and stochastic behavior, DG systems should have high controllability and operability levels to better integrate into the grid while maintaining network functionality and stability. Grid-connected inverters play different roles depending on the microgrid operational mode. Grid-following inverters are controlled to deliver active or reactive power to the grid. However, in the autonomous microgrid, the inverter is operated in a grid-forming mode to set the grid voltage and frequency accurately [2]. Different models have been developed to study the inverter’s operation and assess grid stability. These models should adequately describe the inverter behavior during the studied phenomena. In a practical case, neglecting the dynamics of the phase-locked loop (PLL) and the DG’s DC bus voltage led to a misrepresentation of PV generation, which misled the operator to disconnect PV generation and eventually led to a blackout [3].

Switching models, although computationally heavy, represent the inverter accurately. Models for the semiconductor power devices used in the power stage can include devices’ characteristics such as on-state resistance and parasitic capacitances. These devices’ gate control is performed via a specific pulse-width modulation (PWM) scheme. Switching models established using commercial simulation tools such as PSIM, EMTP, and MATLAB/Simscape provide insight into the inverter’s dynamics and its interaction with the grid [4]. These models allow for various studies, including (i) efficiency assessment and power loss calculations [5], (ii) evaluation of dead-time effect on inverter performance [68], (iii) investigating harmonic content for facilitating filter design [9] or verifying harmonic compensation techniques [10], (iv) examination of DC bus utilization [11], and (v) investigation into the impact of PWM scheme on inverter operation [12]. The advantage of such switching models is to represent faithfully the inverter behavior in real practice. However, some studies considering the system level of grid-connected inverters do not require detailed modeling of the power converter.

To avoid the complexity arising from the discontinuity inherent in the switching model, averaging techniques are employed [1315]. The averaging yields reduced-order models that preserve the inverter dynamics while requiring fewer computational resources. Both frequency domain [16, 17] and time domain analyses [18, 19] are facilitated by reduced-order models. In these models, the switching poles of the inverters are replaced by controllable ideal voltage sources. Such reduced-order models were used to investigate microgrid stability neglecting the line dynamics [20]. Those dynamics are neglected, assuming a timescale separation between the network dynamics and inverter inner controller [21]. The work in [22, 23] has pointed out the importance of network dynamics in microgrid stability assessment. The impact of network impedance on the credibility of stability studies made using reduced-order models is presented in [24]. Techniques to improve reduced-order model accuracy, such as singular perturbation [23, 25] and dynamic phasor-based modeling [2629], are employed for microgrid simulations.

Reduced-order models simplify the inverter representation to decrease simulation time and complexity, risking some crucial aspects being disregarded. On the other hand, a highly detailed switching model may be unnecessary for the specific study’s objectives. Depending on the study’s nature, it might be feasible to achieve the desired outcomes without exploring additional insights into the inverter’s operation.

A comparison between reduced-order models is presented in [30]. The work focuses on the stability assessment of microgrids at different regimes. In [31], an efficient reduced-order model of the inverter that allows for inner current loop simplification is developed. After investigating several models, the work concluded that no single reduced-order model suits all scenarios. A model order reduction algorithm is developed in [32]. The proposed reduced-order model uses a state space method in an attempt to improve the model’s accuracy compared to the existing models.

Based on the above, a literature gap exists in the performance comparison between the switching and reduced-order modeling of the well-known grid-following inverter. Therefore, there is a need for a comparative study between the reduced-order and switching models of the grid-following inverter under steady-state and dynamic conditions. By comparing the inverter operation and dynamics while connected to a microgrid, researchers can select the most appropriate inverter representation for various studies. This will enable proper model selection by finding a balance between accuracy and computational efficiency.

This study is aimed at establishing a thorough comparative study between the reduced-order model and the switching model of grid-following inverters. Firstly, the steady-state operation is investigated, and the main differences are highlighted. Various operation modes where real and reactive power is being injected into the grid are studied to highlight the dynamic performances. The harmonic content of the grid current and its total harmonic distortion are also compared. Furthermore, the inverter’s dynamics are also studied in the presence of grid disturbance. A case where the grid’s frequency witnesses a change is presented. This work also addresses the accuracy of the models under varying line impedance ratios (). Finally, the main findings are discussed and critical comparisons between the models are made.

This paper is arranged as follows: Section 2 presents the grid-following inverter models. Section 3 describes the system structure and the implemented controller. The main results of the simulated scenarios are displayed in Section 4. Section 5 discusses the main findings, and Section 6 provides the paper’s conclusions.

2. Grid-Following Inverter Model

2.1. Reduced-Order Model of Grid-Following Inverter

In the reduced-order model, all the discontinuities in voltage and current waveforms are eliminated by averaging. This allows for neglecting the inverter’s internal states while preserving the terminal states, i.e., voltage, current, and frequency. The inverter is modeled by a controllable voltage source with a frequency that matches the grid frequency. Figure 1 shows the structure of the described model. The voltage at the point of common coupling (PCC), which represents the inverter’s terminal voltage in phasor form, is expressed as ° considering it a reference node while the voltage at the grid side °. The per-phase complex power delivered by the inverter to the grid can be expressed as where and are the network resistance and inductance, respectively, as shown in Figure 1. Using (1), expressions for active and reactive power can be established in terms of the inverter’s voltage and current.

Here, the grid-following inverter is represented by an ideal controlled voltage source to operate in grid-connected mode. The active and reactive control is implemented in the synchronous reference frame, where the voltage and current are measured and converted to DC values to facilitate controlling them using a PI controller. Power and current control loops are used to deliver a control signal for the grid-following inverter. This is achieved by adjusting the inverter terminal current based on a reference set point for active and reactive power. Then, the controller adjusts the voltage sources inside the model by controlling values (, , and ).

2.2. Switching Model of Grid-Following Inverter

An accurate representation of the inverter’s states is possible by representing the switching state of the inverter’s switches. However, creating such a model required full knowledge of the inverter topology and switching scheme. Figure 2 shows a three-phase, two-level grid-following inverter with a DC source representing the distributed generation unit. In order to create balanced three-phase voltages at the terminals of the inverter, proper gate control signals for switches () are required. These signals are generated by a pulse-width modulation (PWM) circuit where control signals (, , and ) are modulated with a high-frequency carrier. Various PWM schemes like sine-PWM and space vector PWM can be used; however, this work implements a simple sine-PWM scheme, as demonstrated in Figure 2.

3. The System Description

A current control strategy for grid-following is utilized [33]. Converting the voltage and current waveforms to a synchronous -frame enables the use of a simple PI controller to eliminate any steady-state error. All time-dependent variables () are converted to -frame () by combining Clarke’s and Park’s transformation to obtain [34] where the transformation matrix is expressed by

The reference phase angle is deduced from the line voltages at the point of common coupling (PCC) using a phase-locked loop (PLL). Figure 3 depicts the -frame rotating at a synchronous speed and its relationship to the -frame coordinate system.

To control active and reactive power, the measured oscillatory currents () are converted to a rotating -frame using . A low-pass filter is used in the case of the switching model to eliminate high-order harmonics, as the control target is to adjust the fundamental value only.

Using phasor notation for voltage and current , the instantaneous active and reactive power can be expressed as

Considering the grid voltages to be a balanced three-phase system, the zero term in -frame is dropped. Assuming a zero phase shift between the - and -frame coordinate (shown in Figure 3), the voltage and current phasors are given by

The instantaneous active and reactive power in (5) and (6) can be rewritten in terms of -frame variables as

The controller objective here is to provide a certain combination of active and reactive power at the PCC. For reference active power () and reactive power () values and known grid voltage , it is viable to formulate the -frame reference current values () in terms of reference power quantities using (5)–(9) as follows:

Expressing the voltage and current in -frame as in ((7a) and (7b)), one can generate the required reference current values:

The complete structure of the grid-following inverter, including the current controller, is shown in Figure 4. A block diagram of the reference current generation expressed by ((11a) and (11b)) is also depicted. Using the proposed control strategy, active and reactive power control is possible using a simple PI controller. This is achieved by comparing the measured and transformed grid currents in the -frame with the generated values from the current reference generator. The PI controller generates voltage controller signals (, , and ) while ensuring zero steady-state error in active and reactive power. These control signals are given to the pule-width modulation (PWM) circuit to generate the gate signals for switches in the case of the switching model. On the other hand, the reduced-order model directly uses signals (, , and ) to control the voltage sources, as shown earlier in Figure 1.

4. Simulation Results

To draw a comparison between the reduced-order and switching models, the two models are evaluated at various operational conditions, including steady state and transient. A lumped impedance between the inverter output and PCC is assumed. The impedance value and other inverter and network parameters used in the two cases are listed in Table 1. Different case scenarios are investigated to highlight the main differences between the reduced-order and switching models. The reduced-order model is implemented in MATLAB/Simulink, while the switching model is simulated in PSIM [35]. It is worth noting that the simulated period is significantly shorter in the switching model case due to the high computation resources needed.

4.1. Steady-State and Dynamic Performance

This section presents a steady-state operation of the reduced-order and switching models during two scenarios. The first scenario involves introducing a reactive power step change while maintaining a constant output active power. In contrast, the second case demonstrates the model’s performance during a step change in active power while maintaining a fixed reactive power level. The inverter power is injected directly into the grid during the simulations, and no load is used. A secondary controller not included in this study initiates the active and reactive power reference change and ensures it is within the inverter’s rated power.

4.1.1. Step Change in Reactive Power

In this case, the inverter delivers a contact active power of 10 kW and 2 kVAR of reactive power before an increase in the reactive power to 5 kVAR is introduced at  s. Figure 5 shows the grid current and voltage for the switching model. The top part of the figures shows phase (a) current and the filtered current before - transformation. The phase angle between the voltage and fundamental component of the line current is measured before and after the step change to verify the controller performance meeting the new reactive power reference. The regions A and B of Figure 5 are magnified in Figure 6 for closer examination. The measured phase shift in region A is μs which corresponds to a power factor angle of °. The phase shift in region B is  ms which corresponds to a power factor angle of °. Based on reference value and values, the power factor angle should be ° and °, in regions A and B, respectively.

In contrast to the switching model result, the line current in the simulated reduced-order model is pure sinusoidal. Figure 7 shows the same step in reactive power at  s. No apparent disturbance at the instant of step change appears on the current waveform. The measured active and reactive power resulting from the two models at the PCC is compared in Figure 8. It is worth noting that the reduced-order model exhibits a higher overshoot in active power when a change in reactive power is introduced.

4.1.2. Step Change in Active Power

In this case, the inverter delivers a contact reactive power of 2 kVAR and 10 kW of active power before increasing the active power to 20 kW. The current and voltage at PCC using the switching model are shown in Figure 9. The step change here is introduced at  s.

The current and voltage waveform appear without any distortion when simulating the same scenario using the reduced-order model, as Figure 10 depicts. This is due to using an ideal voltage source instead of the switching model of the inverter. Note here that the change is introduced at  s.

The measured active and reactive power at the PCC is depicted in Figure 11. In both models, the measured output real and reactive power matches the target. However, the dynamic is slightly different. It is worth noting that reactive power measured by the switching model experiences minimal error due to the reactive power consumed by the filter inductance.

4.2. Harmonic Content

The current injected into the grid by the inverter contains a distortion current in addition to the fundamental component. The degree of this distortion is measured by the total harmonic distortion (THD) index, which is the percentage of distortion current to the fundamental component. The THD varies with the inverter’s real power output and operation point [36]. The current waveform resulting from the reduced-order model contains no distortion and thus has zero THD value. This results from using voltage sources to represent the inverter terminal voltages.

Contrary to the reduced-order model, the switching model provides a detailed overview of the harmonic components generated by the inverter. Furthermore, the switching model can estimate THD value at different power levels. Figure 12 compares the inverter’s current generated by the two models when 10 kW of real power is delivered to the grid. The higher frequency order harmonics can be seen in the switching model results. The frequency spectrum in Figure 13 reveals the harmonic content of the current. Besides the fundamental component at the grid frequency (i.e., 50 Hz), harmonics at the switching frequency and its multiple appear.

The THD varies with output power and can be improved by increasing the filter size or improving the current controller [37, 38]. To further test the switching model’s ability to capture the harmonic content correctly, the THD of the output current is measured at different output power percentages. The percentage THD results are shown in Figure 14, along with the 5% limit that is considered for many engineering standards of grid-connected inverters. The simulations show a similar trend of measurements reported in the literature.

4.3. Grid Disturbances and Line Impedance Effect

This section presents the main performance differences between the reduced-order and switching model in the case of grid disturbance. Here, two cases are investigated: grid frequency change and line impedance effect. A momentary drop in the grid frequency from 50 to 48 Hz is considered here. Figure 15 shows the grid current and voltage as the frequency changes produced by the switching model. The figure also depicts the measured output power. The reference power is kept constant during the period of disturbance. Similar simulation results using the reduced-order model are presented in Figure 16, where the voltage is not displayed for clarity.

Examining Figures 15 and 16 reveals the difference between the two models in estimating the grid current dynamics. The reduced-order model predicts an unrealistically high current level, while the current in the switching model is within the rated current of the switches. Nevertheless, the two models can still track the power reference correctly during the period of frequency change. This is expected because the derived current controller is valid for any frequency.

A step in real power from 10 to 20 kW is introduced while using different line ratios to highlight the impact of line impedance. Three distinct cases are reported here, namely, , , and . Figure 17 depicts the grid current produced by the switching model when the step in active power is introduced at  s. The marginal increase in the current as the ratio decreases is due to the rise of the voltage at PCC. Similar results of those produced by the reduced-order model are depicted in Figure 18; note here that the step in real power occurs at  s. A similar trend in the current waveform is observed when comparing the detailed and reduced-order models in the first cycle following the step change. However, for the reduced-order model case, the current values for the different cases match after that, indicating a higher error if the voltage rise phenomenon is to be studied in highly resistive networks using this model.

5. Discussion

Selecting the most effective modeling method for a grid-following inverter depends on the application and the associated phenomena of interest. Switching models encompass every inverter element and require detailed knowledge about the devices’ characteristics, converter topology, and modulation scheme. If properly established, switching models can accurately reproduce exact inverter behavior. This precise presentation allows for a detailed analysis of the inverter operation. Studies such as efficiency optimization, dead-time effect, and assessing controller performance are examples where switching models excel. Despite offering accurate results, switching models require high computational resources and a longer time to converge, making them more suitable for small systems. With the improvement in real-time digital simulation techniques [39], switching models might be considered for larger systems.

The reduced-order model uses an averaging technique to reduce the model complexity and eliminate its discontinuities. These models are simple to implement and require fewer computational resources than the switching model. The reduced-order model of the grid-following inverter represents the inverter behavior with reasonable accuracy under large but slow disturbances such as reference power step change and grid disturbances. These models fail to account for harmonic and power losses generated by the inverter’s switching since the inverter is represented by an ideal voltage source that delivers a pure sinusoidal signal. While the switching model reacts faster to grid disturbances and provides higher accuracy, it requires higher computational resources. On the other hand, the analytical and computational advantages of reduced-order models are favorable, particularly when studying large-scale networks. Although this model may scarify some accuracy, it can still be used if computational efficiency is a priority. An example illustrating this tradeoff is presented in [40].

Further attempts to improve the reduced-order models for better inverter/grid interaction continue [41, 42]. For example, the stability and control of interconnected microgrids using a reduced-order model are presented in [43]. Table 2 compares the types of modeling for grid-following inverters and lists the most suitable studies that can be performed using each model. The simulation’s elapsed time to complete one 50 Hz cycle (i.e., 20 ms) listed in the table reflects the high computational resource the switching model needs. This time is expected to be longer for a real-world microgrid as the model should include more components. The precise harmonic representation in the switching model allows for harmonic-related studies such as filter design. Additionally, the switching model can evaluate the impact of these harmonics on the control loop dynamics. Furthermore, the switching model can study the PWM schemes’ effect on the inverter operation since a detailed PWM circuitry is implemented in the model. In comparison, the reduced-order model contains no PWM circuitry.

6. Conclusions

This paper presented a comparison between switching and reduced-order models of grid-following inverters. Key performance differences between the two models are compared by simulating a grid-following inverter in a microgrid system. Despite the accuracy of the switching model, it requires full detailed knowledge of the inverter’s parameters and demands high computational resources. On the other hand, the reduced-order model is simple to implement and adequate for testing grid-following inverter operation in steady-state or under slow disturbances. The reduced-order model fails to capture harmonics or switching transients due to the averaging that eliminates discontinuities. Moreover, the model accuracy degraded as the line increases. So, the results of the reduced-order model for highly resistive networks should be treated carefully. On the contrary, the results show that the switching model can be used regardless of the network. Furthermore, THD and harmonic analyses reveal an accurate representation of harmonics generated by the inverter. This makes the switching model suitable for harmonic studies, including filter design, and yields accurate power loss calculations that are useful for efficiency optimization. Switching models are also suitable for studying control loop dynamics and testing PWM schemes as they give access to control signals and represent PWM circuitry. As a continuation of this study, future work may include (i) incorporating a secondary controller stage during the comparison, (ii) expanding the comparison aspects to incorporate fault tolerance and model robustness, (iii) investigating microgrids with the presence of grid-forming inverters and energy storage systems, and (iv) performing a similar comparative study for grid-forming inverters.

Data Availability

Data is available on request.

Conflicts of Interest

The authors declare no conflicts of interest.