## DOI:

https://doi.org/10.14483/23448393.21303## Published:

2024-01-17## Issue:

Vol. 29 No. 1 (2024): January-April## Section:

Electrical, Electronic and Telecommunications Engineering# Deduction and Application of the Average Switch Model in Power Electronic Devices for Simulation Time Reduction

## Deducción y aplicación de modelo promedio del interruptor en dispositivos de electrónica de potencia para reducción del tiempo de simulación

## Keywords:

Microgrids, Average Model, Power electronics, Inverter, Converter (en).## Keywords:

electrónica de potencia, microrredes, modelo promedio, inversor, convertidor (es).## Downloads

## References

R. R. Pearson, “Photovoltaic power converter modeling in Modelica,” Master’s thesis, National Distance Education University, 2017.

R. W. Erickson and D. Maksimovic, Fundamentals of power electronics. Berlin, Germany: Springer Science & Business Media, 2007.

N. Barhoumi, H. Marzougui, F. Slah, and F. BACHA, “Modelling and control of floating interleaved boost converter for electric vehicle,” in 2019 Int. Conf. Signal, Control Comm. (SCC), 2019, pp. 314–319. http://doi.org/10.1109/SCC47175.2019.9116157 DOI: https://doi.org/10.1109/SCC47175.2019.9116157

S. Surya and S. Williamson, “Generalized circuit averaging technique for two-switch PWM DC-DC converters in CCM,” Energies, vol. 10, p. 392, 2021. https://doi.org/10.3390/electronics10040392 DOI: https://doi.org/10.3390/electronics10040392

N. E. Zakzouk, A. K. Khamisand, A. K. Abdelsalam, and B. W. Williams, “Continuous-input continuous-output current Buck-Boost DC/DC converters for renewable energy applications: Modelling and performance assessment,” Energies, vol. 12, p. 2208, 2019. https://doi.org/10.3390/en12112208 DOI: https://doi.org/10.3390/en12112208

R. Ali, K. Khan, M. Khalid, and A. Khan, “Multi-input boost converter for parallel connected renewable energy systems,” Renew. Energy Power Qual. J, vol. 18, pp. 403–408, 2020. https://doi.org/10.24084/repqj18.361 DOI: https://doi.org/10.24084/repqj18.361

A. Chadha and M. K. Kazimierczuk, “Small-signal modeling of open-loop PWM tapped-inductor Buck DC–DC converter in CCM,” IEEE Tran. Ind. Electronics, vol. 68, no. 7, pp. 5765–5775, 2021. https://doi.org/10.1109/TIE.2020.2996157 DOI: https://doi.org/10.1109/TIE.2020.2996157

N. Kianpoor, M. Yousefi, N. Bayati, A. Hajizadeh, and M. Soltani, “Fractional order modelling of DC-DC Boost converters,” in 2019 IEEE 28th Int. Symp. Ind. Electronics (ISIE), 2019, pp. 864–869. https://doi.org/10.1109/ISIE.2019.8781387 DOI: https://doi.org/10.1109/ISIE.2019.8781387

J. Bayona, N. Gelvez, and H. Espitia, “Design, analysis, and implementation of an equalizer circuit for the elimination of voltage imbalance in a half-bridge Boost converter with power factor correction,” Electronics, vol. 9, p. 2171, 2020. https://doi.org/10.3390/electronics9122171 DOI: https://doi.org/10.3390/electronics9122171

M. A. M. Noh, M. R. Sahid, T. K. Fei, and R. Lakshmanan, “Small-signal analysis of a single-stage bridgeless boost half-bridge AC/DC converter with bidirectional switch,” Int. J. Power Electronics and Drive Systems (IJPEDS), vol. 12, no. 4, pp. 2358–2371, 2021. https://doi.org/10.11591/ijpeds.v12.i4.pp2358-2371 DOI: https://doi.org/10.11591/ijpeds.v12.i4.pp2358-2371

D. K. Saini and M. K. Kazimierczuk, “Open-loop transfer functions of Buck–Boost converter by circuit-averaging technique,” IET Power Electronics, vol. 12, no. 11, pp. 2858–2864, 2019. https://doi.org/10.1049/iet-pel.2018.5514 DOI: https://doi.org/10.1049/iet-pel.2018.5514

Z. Liang, S. Hu, H. Yang, and X. He, “Synthesis and design of the AC current controller and impedance network for the quasi-Z-source converter,” IEEE Trans. Ind. Electronics, vol. 65, no. 10, pp. 8287–8296, 2018. https://doi.org/10.1109/TIE.2018.2808928 DOI: https://doi.org/10.1109/TIE.2018.2808928

D. Tannir, Y. Wang, and P. Li, “Accurate modeling of nonideal low-power PWM DC-DC converters operating in CCM and DCM using enhanced circuit-averaging techniques,” ACM Trans, Design Autom. Electronic Syst., vol. 21, pp. 1–15, 2016. https://doi.org/10.1145/2890500 DOI: https://doi.org/10.1145/2890500

D. Jayachandran, V. Krishnaswamy, A. Lavanya, and K. Dhandapani, “Modelling and analysis of voltage mode controlled Luo converter,” American J. App. Sci., vol. 12, no. 10, pp. 766–774, 2015. https://doi.org/10.3844/ajassp.2015.766.774 DOI: https://doi.org/10.3844/ajassp.2015.766.774

L. Schmitz, D. C. Martins, and R. F. Coelho, “A simple, accurate small-signal model of a coupled-inductor-based DC-DC converter including the leakage inductance effect,” IEEE Trans. Circ. Syst. II: Express Briefs, vol. 68, no. 7, pp. 2533–2537, 2021. https://doi.org/10.1109/TCSII.2021.3061942 DOI: https://doi.org/10.1109/TCSII.2021.3061942

R. Reddivari and D. Jena, “Analysis of RCD snubber based non-ideal Z-source inverter using average modelling approaches,” Int. J. Electronics, vol. 107, no. 5, pp. 755–777, 2020. https://doi.org/10.1080/00207217.2019.1672811 DOI: https://doi.org/10.1080/00207217.2019.1672811

F. Ghizzawi and D. Tannir, “Circuit-averaged modeling of non-ideal low-power DC-AC inverters,” in 2020 IEEE Texas Power Energy Conf. (TPEC), 2020, pp. 1–6. https://doi.org/10.1109/TPEC48276.2020.9042503 DOI: https://doi.org/10.1109/TPEC48276.2020.9042503

N. Salehi, H. Martinez-Garcia, G. Velasco-Quesada, and E. Garcia-Vilchez, “Inverter control analysis in a microgrid community based on droop control strategy,” Renew. Energy Power Qual. J., vol. 19, pp. 166–170, 2021. https://doi.org/10.24084/repqj19.247 DOI: https://doi.org/10.24084/repqj19.247

M. Hamida, A. Fekik, A. Azar, N. Kamal, A. Ardjal, and H. Denoun, “Fuzzy logic cyclic reports modulation control for a five-Cell inverter,” 2022, pp. 154–159. https://doi.org/10.1109/SMARTTECH54121.2022.00043 DOI: https://doi.org/10.1109/SMARTTECH54121.2022.00043

J.-H. Cho, N.-J. Ku, R.-Y. Kim, and D.-S. Hyun, “Small-signal modeling and control of three-phase grid-connected three-level neutral-point-clamped inverter with a LCL filter,” in 2013 IEEE Energy Conv. Cong. Expo., 2013, pp. 4076–4081. https://doi.org/10.1109/ECCE.2013.6647242 DOI: https://doi.org/10.1109/ECCE.2013.6647242

P. Moraes, A. Reis, and A. Filho, “Novel time-domain average model for harmonic current prediction in photovoltaic and wind power units,” Int. Trans. Electrical Energy Syst., vol. 31, 2021. https://doi.org/10.1002/2050-7038.13253 DOI: https://doi.org/10.1002/2050-7038.13253

T. Itkonen, J. Luukko, A. Sankala, T. Laakkonen, and R. Pollanen, “Modeling and analysis of the dead-time effects in parallel PWM two-level three-phase voltage-source inverters,” IEEE Trans. Power Electronics, vol. 24, no. 11, pp. 2446–2455, 2009. https://doi.org/10.1109/TPEL.2009.2033064 DOI: https://doi.org/10.1109/TPEL.2009.2033064

J. H. Urrea-Quintero, N. Munoz-Galeano, and D. A. Cuervo-Sanchez, “A procedure for power electronic converters design with controllability verification based on the nonlinear dynamical model,” pp. 1–6, 2017. https://doi.org/10.1109/PEPQA.2017.7981688 DOI: https://doi.org/10.1109/PEPQA.2017.7981688

L. E. Torres-Acevedo, J. H. Urrea-Quintero, and N. Munoz-Galeano, “Control de tension en el bus DC para compensadores activos de potencia conectados en paralelo,” vol. 28, 2017. https://doi.org/10.4067/S0718-07642017000600013 DOI: https://doi.org/10.4067/S0718-07642017000600013

## How to Cite

### APA

*Ingeniería*,

*29*(1), e21303. https://doi.org/10.14483/23448393.21303

### ACM

*Ingeniería*. 29, 1 (Jan. 2024), e21303. DOI:https://doi.org/10.14483/23448393.21303.

### ACS

*Ing.*

**2024**,

*29*, e21303.

### ABNT

**Ingeniería**,

*[S. l.]*, v. 29, n. 1, p. e21303, 2024. DOI: 10.14483/23448393.21303. Disponível em: https://revistas.udistrital.edu.co/index.php/reving/article/view/21303. Acesso em: 18 sep. 2024.

### Chicago

*Ingeniería*29 (1):e21303. https://doi.org/10.14483/23448393.21303.

### Harvard

*Ingeniería*, 29(1), p. e21303. doi: 10.14483/23448393.21303.

### IEEE

*Ing.*, vol. 29, no. 1, p. e21303, Jan. 2024.

### MLA

*Ingeniería*, vol. 29, no. 1, Jan. 2024, p. e21303, doi:10.14483/23448393.21303.

### Turabian

*Ingeniería*29, no. 1 (January 17, 2024): e21303. Accessed September 18, 2024. https://revistas.udistrital.edu.co/index.php/reving/article/view/21303.

### Vancouver

### Download Citation

## Abstract

### Context:

Time is a crucial issue in the simulation of power electronics (PE) devices, even more when these elements are integrated into microgrids.

### Method:

This paper deals with the deduction of the average switch model for PE devices with the purpose of reducing simulation times. For doing this, the average model is only applied over the power switches of PE devices, not being applied over the complete topology as traditionally done. The proposed average model switch permits eliminating the ripple of voltage and currents but keeping the transient of the signals. The average model switch is derived for Boost and Buck converter switches and then generalized to power inverter switches. The proposed approach is validated using OpenModelica software.

### Results:

A system featuring a battery, a DC/DC converter, and an inverter connected to the power grid was simulated. A comparison was performed between a simulation that considers the power switches and a simulation that uses the proposed average model switch, the time simulation was reduced up to 99.788 %, which validates the proposed approach. **Conclusions:** The proposed average switch model significantly reduces simulation times. This method offers a promising way to streamline power electronics device simulations, particularly in the context of microgrids and other applications where time efficiency is critical.

## Keywords:

Power electronics, Microgrids, Average model, Inverter, Converter.## Resumen

### Contexto:

El tiempo es un factor crucial en la simulación de dispositivos de electrónica potencia (EP), especialmente cuando estos elementos se integran en microredes.

### Método:

Este artículo deduce el modelo de interruptor promedio para dispositivos de EP con el propósito de reducir los tiempos de simulación. Para lograr esto, el modelo promedio se aplica únicamente a los interruptores de potencia de los dispositivos de EP, sin aplicarse a toda la topología como se hace tradicionalmente. El modelo promedio propuesto permite eliminar la oscilación de voltaje y corriente, pero conserva el comportamiento transitorio de las señales. El modelo promedio del interruptor se deriva para interruptores convertidores Boost y Buck y luego se generaliza a interruptores de inversores de potencia. El enfoque propuesto se valida utilizando el software OpenModelica.

### Resultados:

Se simuló un sistema que incluye una batería, un convertidor DC/DC y un inversor conectado a la red eléctrica. Se realizó una comparación entre una simulación que considera los interruptores de potencia y una simulación que utiliza el modelo promedio del interruptor propuesto, lo que redujo el tiempo de simulación hasta en un 99,788 %, validando así el modelo propuesto.

### Conclusiones:

El modelo de interruptor promedio propuesto reduce significativamente los tiempos de simulación. Este método ofrece una forma prometedora de agilizar las simulaciones de dispositivos de electrónica de potencia, especialmente en el contexto de microredes y otras aplicaciones donde la eficiencia en el tiempo es fundamental.

## Palabras clave:

Electrónica de potencia, Microrredes, Modelo promedio, inversor, convertidor.## Introduction

Power electronics (PE) devices are switched systems used for the exchange or conversion of energy. Their switched nature causes ripples in voltage and current signals. Such ripples are commonly reduced by using large inductors and capacitors; however, they are not completely eliminated in the final result. In view of the unavoidable presence of ripples, PE these devices are modeled using the average value of the signal (average model), ignoring the ripple ^{1}^{,}^{2}. However, applying the average model not only eliminates the ripple but also the transient of voltages and currents. The transient is fundamental since it allows to determine the extreme operating conditions of the system. Therefore, simulations must be performed to find the transient, including the dynamics of the switches and diodes which leads to a high computational burden and long simulation times.

Several applications of the average converter model are found in the specialized literature of PE converters. In ^{3}, the modeling and control of a Floating Interleaved Boost converter (FIBC) is developed to meet the requirements of a Fuel Cell (FC) battery for vehicular applications. The average model allows reaching adequate control of the converter to improve the voltage gain and minimize the input current ripple and thus ensure the sustainability of the FC. The authors in ^{4} analyze the average models of nonlinear fourth-order converters operating in continuous conduction mode (CCM) to predict the frequency response. This method is based on the average model and is simpler and easier to implement than other conventional models. A detailed comparison of the CUK, D1 and D2 converters is presented in ^{5}; using the average model, the performance of the converters is evaluated by carrying out simulations in a PV system. The authors in ^{6} proposed a multi-input Boost converter for renewable energy sources (RES) connected in parallel. In this case, the converter performance is maximized to maintain a constant output voltage; basically, starting from the average model, a small-signal CCM model is developed and the line-output and control-output transfer functions are derived. In ^{7}, a PWM tapped-inductor Buck DC/DC converter is presented that aims to substantially reduce the output voltage by working with a comfortable duty cycle range and using a single-stage power converter; the average model is the basis for deriving the small-signal model to obtain the line-to-output and control-to-output transfer functions. The authors in ^{8} proposed a fractional order model for a Boost converter in discontinuous conduction mode (DCM), the modeling starts applying the average model of the fractional order Boost converter, and then the transfer function that relates the duty cycle with the output voltage in DCM is obtained. In ^{9}, an equalizing converter circuit for a Half-Bridge Boost Converter operating in DCM is developed to solve the voltage unbalance that reduces the power factor. The average model is used to analyze in detail how the equalizer eliminates the voltage unbalance. The authors in ^{10} develop a small-signal average model of a single-stage bridgeless Boost half-bridge (AC/DC) converter with bidirectional switches using the average model. The mathematical model obtained is used to design a PI controller that proves to be stable. In ^{11}, the transfer functions of a Buck-Boost converter are obtained using the average model of the converter. The authors in ^{12} present small-signal modeling for a bidirectional quasi-Z-source converter from the average model technique and provide a design guide for an AC controller for improving the stability of the converter. The authors in ^{13} develop modeling techniques using the average model of DC/DC converters, taking into account the non-ideal characteristics of the switching devices and improving the performance of the converters under analysis. In ^{14}, a Luo DC-DC converter is proposed for hybrid electric vehicles. The authors perform the modeling of the converter with the state space averaging method and the average model. The authors in ^{15} develop a method to dynamically model the coupled-inductor Double-Boost converter. The average model of the converter is deduced to obtain the impact of the leakage inductance by using equivalent resistors.

The average model has also been widely used in PE inverters. The authors in ^{16} present a detailed mathematical model of a non-ideal Z-Source inverter (ZSIs) with non-minimum pase behavior to analyze the influence of the snubber capacitance using average model approaches. In ^{17}, a multi-harmonic modeling technique for PWM-driven DC-AC inverters not ideal for low-power applications is introduced. The average model is used to anticipate the AC signal response along with the average values of the DC signal taking into account higher-order harmonic effects.

In microgrid (MG) applications, the authors in ^{18} discuss the droop control strategy for a voltage source inverter (VSI) in the power exchange mode with MGs or the main grid; for this, they analyze the average model of the three-phase VSI and obtain the voltage and current transfer functions. The results show that the system maintains nominal frequency and voltage. The authors in ^{19} develop a fuzzy logic-cyclic reports modulation control based on the average model to improve the output power quality of the single-phase series five-cell inverter. Simulation results show that the proposed control offers high performance. The authors in ^{20} derive the small-signal model of a three-level neutral-point-clamped inverter connected to the grid with LCL filter. The process starts with the circuit equations and the average model; finally, a control for the grid current is designed using the average model. In ^{21}, a time domain model called harmonic average model (HM) is presented to estimate the harmonic currents generated by the inverters, In HM the superposition principle is applied to include the dead time and switching effects provided by the average model. Also, the HM is validated in wind and a photovoltaic generation. The results indicate that HM follows the references and accurately estimates the harmonic spectra. The authors in ^{22} develop a circulating current model based on the average model that takes into account the effects of dead time for Parallel Two-Level Three-Phase Voltage-Source Inverters.

The specialized literature extensively uses the average model in PE devices for obtaining the small signal model, which allows obtaining the stationary state of the electrical variables. Furthermore, this permits to establish control strategies and find the nominal values of PE devices in the design stage. The stationary state permits defining set points of the variables that PE devices must follow. Although the average model has multiple applications, the simulations that must be carried out to verify the dynamic behavior must include the transient in order to verify adequate stabilization times and wave overshoots; in this case, it is not possible to use the average model as it has been conventionally used since transient information is lost.

MG simulations based on power electronics devices require the transient of the signals to be captured in order to determine how the connected devices interact. In order to obtain the transient, the differential equations or the circuit implementation of the devices must be used, which leads to high computation times. In these simulations, slow and fast dynamics are obtained. The slow dynamics correspond to the transient that is given by the resistive, inductive, and capacitive values as well as the operating point, while the fast dynamics are given by the ripple of the signals that is produced by the switches and diodes. The main contribution of this paper is the application of the average model to the system consisting of the switch and diode in order to eliminate the fast dynamics (ripple) from the simulation but keep the slow dynamics. After eliminating the fast dynamics it is possible to obtain the transient of the signals using few computational resources and achieving low simulation times.

This paper is organized as follows: Section 2 presents the deduction of the average model for the Boost and Buck converter switches along with the average model of inverter switches. Section 3 compares simulations applied on a power electronics application that includes an inverter, a converter and a battery, using the proposed approach and the conventional simulation that uses power electronics switches. Section 4 concludes and highlights the most relevant aspects of the paper.

## Deduction of average model for power electronics switches

The objective of this section is to derive the average model for switches and diodes of power electronics based devices. The switch model will be derived for the DC/DC Buck and Boost converters; subsequently the model will be generalized for the DC/AC inverter.

### Deduction of average model for Buck converter switch

Figure **1**corresponds to the Buck converter, inside the box is defined the converter switching system composed by a diode (*D*), and an IGBT switch (*SW*). The average model deduction will only be performed for the switching system, without including the passive elements (inductors or capacitors), the source, and the load. This is to eliminate the high-frequency ripple inherent to the commutation of switches and diodes but to preserve the slow dynamics inherent to the other elements of the system. In order to deduce the average model of the switching system it is necessary to define for *D* and *SW* the following: 1) the polarities of *D* and *SW* labeled as *v*
_{
SW
} and *v*
_{
D
} , respectively; 2) the current senses of *D* and *SW*, labeled as *i*
_{
d
} and *i*
_{
SW
} , respectively; 3) the input voltage (*v*
_{
i
} ) of the switching system; and 4) the output current (*i*
_{
o
} ) of the switching system. The polarities and current directions of *D* and *SW* are defined when the element is directly polarized and conducting.

For the modeling of the switching system it is assumed that the input voltage (*v*
_{
i
} ) and the output current (*i*
_{
o
} ) are constant for each switching cycle. The switching function *u* is also defined such that when *u* = 1 the IGBT closes and the diode is reverse polarized; on the other hand, when *u* = 0 the IGBT opens and the diode is directly polarized.

Figure **
2
** a shows the switching system when

*u*= 1. The diode is reverse polarized obtaining a voltage

*v*

_{ D }=

*−v*

_{ i }and a current

*i*

_{ d }= 0 while the switch being closed obtains a voltage

*v*

_{ SW }= 0 and the current through it is

*i*

_{ SW }=

*i*

_{ o }. Figure

**b shows the switching system when**

*2**u*= 0. The diode when directly polarized obtains a voltage

*v*

_{ D }= 0 and the current flowing through it will be

*i*

_{ d }=

*i*

_{ o }; on the other hand, the switch opens obtaining a voltage

*v*

_{ SW }=

*v*

_{ i }and a current

*i*

_{ SW }= 0.

Figure **3**illustrates the diode and switch voltage and current waveforms. Perfect alternation between their conduction states is assumed, *i.e.*, no simultaneous conduction or simultaneous non-conduction is possible. The average value (in a switching cycle) of the signals is defined as follows: the average diode voltage (*< V*
_{
d
}
*>*), the average IGBT voltage (*< V*
_{
SW
}
*>*), the average diode current (*< I*
_{
d
}
*>*), the average switch current (*< I*
_{
SW
}
*>*), and the average value of the function *u* (*D*, 0 *< D <* 1)) corresponding to the duty cycle.

According to the above, it follows that:

Equations (5) and (6) are obtained from the division of Equation (1) with Equation (2) and from the division of Equation (3) with Equation (4).

According to Equations (5) and (6), the Buck converter switching system can be modeled with voltage and current dependent sources. Figure **4**a shows the Buck converter switching system where the switch has been replaced by a voltage-dependent source and the diode by a current-dependent source. Figure **4**bshows the Buck converter switching system where the switch has been replaced by a current-dependent source and the diode by a voltage-dependent source.

Note that the equivalent circuits proposed in Figure **4** allow solving the converter by means of conventional circuit analysis techniques without resorting to switching functions and neglecting the voltage and current ripple. In this way, it is possible to obtain the average transient and stationary behavior for each variable of the converter.

However, it is worth noting the assumptions that must be met for its use: a) the input voltage and output current must be constant during each switching cycle and b) there must be perfect alternation between the switch and the diode. In this case, the input voltage is related to the power supply whose value is constant (or slowly changing) in most applications. The output current is influenced by the inductor *L* which prevents it from changing abruptly as a result of switching. The alternating operation of the diode and switch limits the application of this model to converters operating under the continuous conduction mode.

### Deduction of average model for Boost converter switch

Figure **5** corresponds to the Boost converter. The converter switching system is depicted inside the box in dashed red, which is composed by a diode (*D*), and a switch (*SW*). The deduction of the average model will only be performed for the switching system, without including the passive elements (inductors or capacitors), the source, and the load. This is done to eliminate the high-frequency ripple inherent to the switching of these elements, and to preserve the slow dynamics inherent to the other elements of the system. In order to derive the average model of the switching system, it is necessary to define for *D* and *SW* the following: 1) the polarities of *D* and *SW*, labeled as *v*
_{
D
} and *v*
_{
SW
} , respectively; 2) the current direction of *D* and *SW*, labeled as *v*
_{
D
} and *i*
_{
SW
} , respectively; 3) the input current (*i*
_{
i
} ) of the switching system, and 4) the output voltage (*v*
_{
o
} ) of the switching system. The polarities and current directions of *D* and *SW* are defined when the element is directly polarized and conducting.

For the modeling of the switching system it is assumed that the input current (*i*
_{
i
} ) and the output voltage (*v*
_{
o
} ) are constant for each switching cycle. The switching function *u* is also defined such that when *u* = 1 the IGBT closes and the diode is reversely polarized; conversely when *u* = 0 the IGBT opens and the diode is direct biased.

Figure **6**a) shows the switching section when *u* = 1. The diode is reversely polarized obtaining a voltage *v*
_{
D
} = *−v*
_{
o
} and a current *i*
_{
d
} = 0 while the IGBT being closed obtains a voltage *V*
_{
SW
} = 0 and a current *i*
_{
SW
} = *i*
_{
i
} . Figure **6**b) depicts the switching section when *u* = 0. When the diode is directly polarized its voltage is *v*
_{
D
} = 0 and the current flowing through it is *i*
_{
d
} = *i*
_{
i
} ; in this case, the IGBT opens obtaining a voltage *v*
_{
SW
} = *v*
_{
o
} and a current *i*
_{
SW
} = 0.

Perfect alternation between the diode and switch conduction states is assumed, i.e., no simultaneous conduction or simultaneous non-conduction is possible. The average value (in a switching cycle) of the signals is defined as follows: the average diode voltage (*< V*
_{
d
}
*>*), the average IGBT voltage (*< V*
_{
SW
}
*>*), the average diode current (*< I*
_{
d
}
*>*), the average switch current (*< I*
_{
SW
}
*>*), and the average value of the function *u* (*D*, 0 *< D <* 1)) corresponding to the duty cycle. From the above, Equations (7), (8), (9), (10) are obtained.

Equations (11) and (12) are obtained from the division of Equation (7) with Equation (8) and from the division of Equation (9) with Equation (10).

According to Equations (11) and (12), the Boost converter switching system can be modeled with voltage and current-dependent sources. Figure **7**a shows the Boost converter switching system where the switch has been replaced by a voltage-dependent source and the diode by a current-dependent source. Figure **7**b shows the switching system of the Boost converter where the switch has been replaced by a current-dependent source and the diode by a voltage-dependent source.

Note the similarity to the deduction of the average model for the Buck converter. In this case, the constraints regarding abrupt changes are related to both, the input current and output voltage of the switching system. Sudden changes in the input current are limited by the inductor *L* and sudden changes of the output voltage are limited by the capacitor *C*.

### Deduction of average model for power inverters

Figure **8** presents a bidirectional DC/AC inverter which is composed of a DC voltage source (*v*
_{
dc
} ), an AC voltage source (*v*
_{
ac
} ), two capacitors (*C*
_{1}) and (*C*2), an inductor (*L*), two switches (*SW*
_{1}) and (*SW*
_{2}) and two diodes (*D*
_{1}) and (*D*
_{2}).

The inverter has two operating modes: 1) In operating mode 1, the source and DC bus deliver power to the AC power system, in this operating mode the inverter delivers at the AC terminals a lower voltage with respect to the DC bus voltage. 2) In operating mode 2, the power system delivers power to the DC bus, in this operating mode the inverter increases the voltage at the DC terminals with respect to the inverter’s AC voltage. The modes of operation are described below.

### Mode 1: Power inverter working as DC-AC converter

In this mode of operation, the power flows from the DC bus to the power system. The inverter operates using the same semiconductors or topology of the Buck converter. The switches to be activated in this mode are *SW*
_{1} and *D*
_{2}. Note that Figure **9**a, corresponds to the same topology of the Buck converter in Figure **1**. Figure **9**b results after replacing the controlled voltage and current sources in Figure **4**a.

Using Equations (5) and (6) and being it follows that:

2.5. Mode 2: Power inverter working as AC-DC converter

In this operating mode, the power flows from the power system to the DC bus. The inverter operates using the same semiconductors or topology of the Boost converter. The switches to be activated in this mode are *SW*
_{2} and *D*
_{1}. Note that Figure **10**a, corresponds to the same topology of the Boost converter in Figure **5**. Figure **10**b results after replacing the controlled voltage and current sources in Figure **7**b.

Using Equations (11) and (12) and being it follows that:

/

Note that the circuit model of controlled voltage and current sources at terminals a,b, and c for operating mode 1 (Figure **9**b) and operating mode 2 (Figure **10**b) have the same structure. Note also that the model Equations governing the controlled sources for operating mode 1 (Equations (13) and (14)) and for operating mode 2 (Equations (15) and (16)) are the same. Observing the circuit model together with the equations model for both operating modes it can be seen that both models are equivalent; therefore, it is possible to simplify the two modes of operation into a single one and therefore model the inverter switch with a single controlled current source and a single controlled voltage source.

## Simulation results

Figure **11** shows the system under study which is composed of a battery, a bidirectional DC/DC converter and a three-phase DC/AC bidirectional inverter connected to the power grid. The battery has a nominal voltage of 48V. Next is the DC/DC converter which is composed of an inductance *L* = 30*mH* two pulse width modulated (PWM) switches and a capacitor *C* = 20*µF*. Next is the inverter which is made up of two balancing resistors *R*
_{1} = *R*
_{2} = 1000Ω, two capacitors that make up a DC bus *C*
_{1} = *C*
_{2} = 2200*µF*, six sinusoidal PWM (SPWM) and the inductances *L*
_{
a
} = *L*
_{
b
} = *L*
_{
c
} = 30*mH* and resistors *R*
_{
a
} = *R*
_{
b
} = *R*
_{
c
} = 1Ω that connect to the electrical network considered as *V*
_{
a
} = *V*
_{
b
} = *V*
_{
c
} = 120 V AC at 50*Hz*.

The battery current control is carried out by the closed-loop control illustrated in Figure **12**. The difference between the reference current *I*
_{
Re f
} and the battery current *I*
_{
Bat
} is fed to the *PI*
_{
I
}
*L* controller which has an integral time of *Ts* = 0,5*s* and a gain *K* = 0,01. In this way, the control signal *D* is obtained. Finally, the *D*signal is compared with a triangular signal using the *SwitchingPWM* block to obtain the periodic signal that is applied to the converter switches. To avoid the two converter switches to be closed at the same time, the dead time given by the *PWM*
_{
SW
} block is used. The value of the reference current at *t* = 0*s* is *I*
_{
Re f
} = 30*A* and at *t* = 2*s* is *I*
_{
Re f
} = *−*50*A*.

Since the three-phase DC/AC inverter has non-minimum phase, it is necessary to use a cascade controller to control the DC bus voltage made up of *C*
_{1} and *C*
_{2}. Figure **13** shows the implemented control strategy which uses the *dqz* transform to the inductor currents *L*
_{
a
} , *L*
_{
b
} and *L*
_{
c
} through the *SW*
_{
con
} block. This gives the current *I*
_{
d
} which guarantees the active power flow and *I*
_{
q
} which guarantees the reactive power flow. Thus, current *I*
_{
d
} is needed to control the DC voltage of capacitor *C* and current *I*
_{
q
} d to control the reactive compensation of the system.

The DC bus voltage control consists initially in obtaining the difference between the reference voltage *V*
_{
Re f
} and the DC bus voltage *V*
_{
DC
} measured by the *Vdc*
_{
Sensor
} sensor in Figure **11**. Then, this difference is taken to the *PI*
_{
Vdc
} controller which has an integral time *Ts* = 0,019*s* and a gain *K* = 0,335. The resulting control signal is compared to the current *I*
_{
d
} and the difference is taken to the *PI*
_{
d
} controller which has a time integral *Ts* = 0,00012 and a gain *K* = *−*1,8054. The result is the control signal for the capacitor voltage *C* at *dqz*. The reference voltage value at *t* = 0*s* is *V*
_{
Re f
} = 610*V* and at *t* = 1,3*s V*
_{
Re f
} = 615*V*.

To compensate the reactive current of the system, the difference between the reference current *Iq*
_{
Re f
} and *I*
_{
q
} is made. This information is given to the controller *PI*
_{
q
} which has an integral time of *Ts* = 0,00011*s* and a gain *K* = *−*1,68069. This provides the control with the signal for reactive current compensation at *dqz*.

The control signals obtained are transformed with the inverse transform of *dqz* and the signals *A*, *B*, *C* are obtained. These sinusoidal signals are normalized and an offset is added in the blocks *Da*, *Db*, *Dc*; this to obtain positive signals that can be compared by the *SwitchingPWM* blocks and subsequently introduce dead time for each pair of switches of the three branches of the inverter.

Figure **14**shows the system under study applying the proposed average switch model. Note that the switches have been replaced by voltage and current-dependent sources and the equations of these sources correspond to the equations of the average switch model.

The battery current control of the system under study using the proposed model is illustrated in Figure **15**. The control is performed in the same way as developed for the system with switches but differs in that the control signal obtained from the controller *PI*
_{
IL
} is used directly in the equations of the dependent sources of the DC/DC converter as the duty.

Figure **16** illustrates the control strategy for the DC bus voltage and reactive current compensation. The control is performed in the same way as developed for the system with switches but differs in that the signals *D*
_{
a
} , *D*
_{
b
} and *D*
_{
c
} are used as the duty in the equations of the controlled sources of the invertir switches.

The two simulations were performed in OpenModelica version 3.2.3 on an OPTIPLEX 5090 Intel Core i7-10700 @2.9GHz with 16GB RAM and 64 bit operating system. The simulation times are presented in Table **I**. The switched simulation takes 473.3 times longer than the average model simulation. That is to say, the proposed approach allows a 99.78 % of simulation time reduction.

### Subsection

Figure **17**shows the time dynamics of the battery voltage. The continuous blue signal
is the voltage obtained from the switched model and the dotted pink signal
is the voltage obtained from the proposed average model. It is observed that initially the battery has 48*V* at *t* = 0*s*, then the battery starts to deliver power to the grid and the first transient occurs where there is a small difference between
and
. On the other hand, at *t* = 2*s* the battery starts to absorb energy from the grid, it presents a second transient where there is no much difference between
and
compared to the first transient. Finally, a steady state is shown where both
and
converge to the same value.

Figure **18** shows the time dynamics of the current in the battery. The solid green signal *I*
_{
REF
} is the reference current, the solid blue signal
is the current obtained from the switched model and the dotted pink signal
is the current obtained from the proposed average model. Initially, at *t* = 0*s*, *I*
_{
REF
} indicates a positive current of 30*A* meaning that current is flowing from the battery to the grid; then at *t* = 2*s*, *I*
_{
REF
} changes to a negative current of *−*50*A* indicating that it is flowing from the grid to the battery. In the first transient state illustrated it can be observed the difference between the
and
signals while in the second transient state the difference between these signals is considerably less. Both
and
signals converge to the reference value *I*
_{
REF
} in the steady states.

Figure **19** shows the time response of the controlled voltage on the DC bus of the system under study. The green continuous signal *V*
_{
REF
} represents the reference voltage, the blue continuous signal
represents the voltage obtained using the switched model and the pink dotted signal
represents the voltage obtained using the average model. At *t* = 0*s* the *V*
_{
REF
} signal indicates a DC bus voltage of 610*V*, then at *t* = 1,3*s* the *V*
_{
REF
} signal changes to 615*v* on the DC bus. The first two transients (*t* = 0*s*, *t* = 1,3*s*) observed occur due to the change in the *V*
_{
REF
} signal, while the third transient *t* = 2*s* occurs due to the change in the *I*
_{
REF
} signal at the battery (see Figure **18**). It can be observed that in the first transient there is a difference between the
and
signals; on the other hand, in the following transients no comparable difference is seen between these signals. Before the different changes, the
and
signals reach the reference value in the steady states and present a similar settling time.

Figure **20** shows the three-phase grid currents provided by the inverter of the proposed system. Shown in blue, pink and green solid line are the
currents obtained under the switched model and in yellow, purple and red dotted line are the
currents obtained under the average model. Three disturbances can be observed; the first one is due to the change in voltage *V*
_{
REF
} = 610*V* of the DC bus and the change *I*
_{
REF
} = 30*A* of the battery at *t* = 0*s*. The second disturbance is caused by the voltage change *V*
_{
REF
} = 615*V* of the DC bus at *t* = 1,3*s*, the three-phase current presents a transient and stabilizes again without changing its amplitude. And finally, the third disturbance is due to the change in *I*
_{
REF
} = *−*50*A* at *t* = 2*s*, this time as the battery is absorbing energy, the amplitude of the three-phase currents increases considerably. Before the different changes, the three-phase currents obtained by the switched model and the average model reach the steady state maintaining the 120*º* phase difference between them.

## Conclusions

This paper presents the deduction of the average switch model for PE devices in order to reduce simulation times. Ripple was eliminated from the simulation; nonetheless, voltage and current transients are preserved which allows determining the low behavior dynamics of PE devices. Several simulations using both the conventional switch-based model and the proposed average switch model were performed using OpenModelica software. In this case, a system consisting of a battery, a DC/DC converter and a grid-connected inverter was used for validating the applicability and effectiveness of the proposed average switch model.

By comparing the switch-based model with the proposed average switch model, it is observed that voltage and current for both models match quite well, the signals of the average model correspond to the signals of switch-based model conserving the transient behavior but eliminating the ripple. It is very important to point out that the simulated system is composed of AC and DC power interfaces such as inverters and converters but also batteries that introduce other types of non-linearities in the system. In other words, a wide range of PE devices was included in the simulation.

Simulation times were substantially reduced. The simulation using the switch-based model took 386.284 seconds, while the simulation using the proposed average model took 0.816 seconds. This represents a reduction time of 99.788 %. It can be concluded that applying the average model to the switch in PE devices is an alternative that allows to simulate while preserving the low dynamics of the system, with an important reduction of the simulation time, which opens the possibility to simulate more complex systems such as microgrids or other complex PE systems using home or office computers

## References

## License

Copyright (c) 2024 Santiago Benavides-Córdoba, Anamaría Romero-Carvajal, Nicolas Muñoz-Galeano, Juan Bernardo Cano-Quintero, Jesús María López-Lezama

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

From the edition of the V23N3 of year 2018 forward, the Creative Commons License "Attribution-Non-Commercial - No Derivative Works " is changed to the following:

**Attribution - Non-Commercial - Share the same**: this license allows others to distribute, remix, retouch, and create from your work in a non-commercial way, as long as they give you credit and license their new creations under the same conditions.