# Improving the Stability and Accuracy of Power Hardware-in-the-Loop Simulation Using Virtual Impedance Method

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Modeling of a PHIL System

#### 2.1. PHIL System Model

_{s}(s) is placed in series with a grid impedance Z

_{s}(s) on the OPS side. The load Z

_{l}(s) is the equivalent load on the HUT side. To facilitate the simulation, a voltage amplifier reproduces the simulated voltage U

_{in}(s) as a physical voltage U

_{out}(s) and imposes it on the load resistor. The actual current i

_{out}(s) drawn by the resistor is measured, and the measured signal is fed back into the simulated circuit by a current source producing a current i

_{in}(s). The main procedures for a PHIL simulation is described as follows.

_{c}(s) based on the Proportion Integration (PI) controller is proposed. G

_{c}(s) can be formulated as

_{c}for the PA inverter is added to the system. The digital controller of the PA is subject to a computation delay, a pulse-width modulation (PWM) delay and other delay components, which can be represented by G

_{d}(s). K

_{PWM}represents the transfer function of the inverter. Thus, the transfer function of the PA can be formulated as

_{DA}(s) includes a small time delay T

_{d}, and it can be formulated as

_{IE}(s) represents the combination of G

_{DA}(s) and G

_{PA}(s):

_{in}(s) can be amplified into output voltage U

_{out}(s) through the IE. The output voltage U

_{out}(s) imposes on the HUT, which is formulated as

_{l}(s) can be converted into a combined impedance Z

_{lc}(s) that includes G

_{IE}(s). Thus, the impedance model illustrated in Figure 6 is obtained. The stability and accuracy analysis based on this model are described as followings.

#### 2.2. Stability Analysis

_{s}(s) and 1/Z

_{s}(s) are stable; therefore, the stability of the current depends on the stability of the second term on the right-hand side of Equation (10). The stability of the system can be estimated from the following equation:

_{lc}(s) and Z

_{s}(s) determine the stability of the PHIL system. According to [42], if the frequency responses of Z

_{s}(s) and Z

_{lc}(s) intersect at f

_{i}, then the phase margin (PM) must be positive (PM > 0°). Thus, PM is formulated as

_{lc}(s). To this end, the magnitude and phase margin of the combined impedance Z

_{lc}(s) are increased near the intersection frequency.

#### 2.3. Accuracy Evaluation

_{lc}(s) to the actual impedance Z

_{l}(s). Because most of the errors in such a system arise from the IE, the impedance error is calculated based on the HUT subsystem, where the combined impedance Z

_{lc}(s) is the most important component in terms of accuracy. The impedance error E(s) can be evaluated as follows:

## 3. Proposal to Improve the Stability and Accuracy of PHIL Simulations

_{lc}(s) can be shaped by means of the VI. Thus, the accuracy of a PHIL simulation can be enhanced by introducing a paralleling impedance to shape the combined impedance Z

_{lc}(s).

_{cp}(s).

_{eq}(s) becomes

_{lc}(s), it is necessary to make the impedance Z

_{eq}(s) equal to the impedance Z

_{l}(s). Thus, the impedance Z

_{cp}(s) can be derived as follows:

_{EP}(s) does not alter the PHIL system topology, it simply requires the insertion of a function block in the path of the feedback current signal to compensate for the error in the PHIL system. The equivalent transfer function can be calculated as follows:

_{cp}(s) may still intersect with impedance Z

_{s}(s) in the high-frequency range. Thus, an additional series virtual impedance is proposed. Figure 10 shows the structure of the PHIL system with the addition of a series impedance Z

_{cs}(s).

## 4. Experimental Verification

#### 4.1. Description of the PHIL Platform

_{o}= 0.2 mH and C

_{o}= 60 μF. A PI controller is used as the output voltage regulator, with parameters of K

_{P}= 6 and K

_{i}= 200, and the active damping regulator applies a damping factor of K

_{c}= 5. A total time delay of 100 μs is assumed for the IE. For further analysis and comparison, the voltages are represented as per-unit (p.u.) values.

**Stability Analysis:**The original circuit for the first scenario was simulated using the PHIL model as shown in Figure 14. It can be assumed that impedance Z

_{s}is a combination of inductor L

_{s}and resistor R

_{s}and that impedance Z

_{l}is a combination of inductor L

_{l}and resistor R

_{l}. The effects of different values of inductor L

_{s}and inductor L

_{l}on the simulation stability were investigated. Table 1 shows the simulation parameters used in the analysis.

_{s}(s) and the impedance Z

_{l}(s) are set using the simulation parameters, which are shown in Table 1. The combined impedance Z

_{lc}(s) and the compensated impedance Z

_{lc}′(s) can be calculated using Equations (18) and (19):

_{s}(s), the impedance Z

_{l}(s), the combined impedance Z

_{lc}(s), and the compensated impedance Z

_{lc}′(s) are shown in Figure 15.

_{s}(s) and the uncompensated impedance Z

_{lc}(s) approaches 180° when inductor L

_{s}is greater than or equal to inductor L

_{l}, indicating that the PM is negative (PM < 0°). Thus, the PHIL simulation is unstable. By contrast, when inductor L

_{s}is smaller than inductor L

_{l}, the simulation is stable. Figure 15c shows that in Case 3, there is no frequency intersection in the high-frequency range, as estimated using the impedance model. It is found that the compensated impedance Z

_{lc}′(s) and impedance Z

_{s}(s) lead to critical stability. Thus, the stability of PHIL simulations can be improved using the VI method.

**Accuracy Analysis:**To describe the accuracy of the PHIL simulation without compensation, Equation (13) can be simplified to

#### 4.2. Experimental Results

#### **Scenario 1: Hardware with Linear Behavior**

_{l}and inductor L

_{s}, and the output voltage waveforms and simulation errors for two cases are shown in Figure 17 and Figure 18. Figure 17a and Figure 18a show that the uncompensated PHIL simulation is unstable when inductor L

_{s}≥ L

_{l}, whereas Figure 17b and Figure 18b show that the stability is significantly improved using the VI method.

#### **Scenario 2: Hardware with Nonlinear Behavior**

## 5. Conclusions

## Acknowledgments

## Author Contributions

## Conflicts of Interest

## References

- Ren, W.; Sloderbeck, M.; Steurer, M.; Dinavahi, V.; Noda, T.; Filizadeh, S.; Chevrefils, A.R.; Matar, M.; Iravani, R.; Dufour, C.; et al. Interfacing issues in real-time digital simulators. IEEE Trans. Power Deliv.
**2011**, 26, 1221–1230. [Google Scholar] [CrossRef] - Steurer, M.; Edrington, C.S.; Sloderbeck, M.; Ren, W.; Langston, J. A megawatt-scale power hardware-in-the-loop simulation setup for motor drives. IEEE Trans. Ind. Electron.
**2010**, 57, 1254–1260. [Google Scholar] [CrossRef] - Li, H.; Steurer, M.; Shi, K.L.; Woodruff, S.; Zhang, D. Development of a unified design, test, and research platform for wind energy systems based on hardware-in-the-loop real-time simulation. IEEE Trans. Ind. Electron.
**2006**, 53, 1144–1151. [Google Scholar] [CrossRef] - Liu, Y.; Steurer, M.; Ribeiro, P. A novel approach to power quality assessment: Real time hardware-in-the-loop test bed. IEEE Trans. Power Deliv.
**2005**, 20, 1200–1201. [Google Scholar] [CrossRef] - Tucker, J. Power-Hardware-In-the-Loop (PHIL) Considerations and Implementation Methods for Electrically Coupled Systems. Master’s Thesis, University of South Carolina, Columbia, SC, USA, 2011. [Google Scholar]
- Etemadi, A.H.; Iravani, R. Overcurrent and overload protection of directly voltage-controlled distributed resources in a microgrid. IEEE Trans. Ind. Electron.
**2013**, 60, 5629–5638. [Google Scholar] [CrossRef] - Li, H.; Guo, F.; Yang, S.; Zhu, L.; Yao, C.; Wang, J. Usage profile optimization of the retired PHEV battery in residential microgrid. In Proceedings of the IEEE Transportation Electrification Conference and Expo, Asia-Pacific, Beijing, China, 31 August–3 September 2014; pp. 1–6.
- Guo, F.; Herrera, L.; Alsolami, M.; Li, H.; Xu, P.; Lu, X.; Lang, A.; Wang, J.; Long, Z. Design and development of a reconfigurable hybrid Microgrid test bed. In Proceedings of the IEEE Energy Conversion Congress and Exposition (ECCE), Denver, CO, USA, 15–19 Septemer 2013; pp. 1350–1356.
- Hwang, T.; Park, S. A seamless control strategy of a distributed generation inverter for the critical load safety under strict grid disturbances. IEEE Trans. Power Electron.
**2013**, 28, 4780–4790. [Google Scholar] [CrossRef] - Dufour, C.; Bélanger, J. On the use of real-time simulation technology in smart grid research and development. IEEE Trans. Ind. Appl.
**2014**, 50, 3963–3970. [Google Scholar] [CrossRef] - Ivanović, Z.R.; Adžić, E.M.; Vekić, M.S.; Grabić, S.U.; Čelanović, N.L.; Katić, V.A. HIL evaluation of power flow control strategies for energy storage connected to smart grid under unbalanced conditions. IEEE Trans. Power Electron.
**2012**, 27, 4699–4710. [Google Scholar] [CrossRef] - Park, M.; Yu, I. A novel real-time simulation technique of photovoltaic generation systems using RTDS. IEEE Trans. Energy Convers.
**2004**, 19, 164–169. [Google Scholar] [CrossRef] - Adzic, E.; Grabic, S.; Vekic, M.; Porobic, V.; Celanovic, N.F. Hardware-in-the-loop optimization of the 3-phase grid connected converter controller. In Proceedings of the 39th Annual Conference of the IEEE Industrial Electronics Society, Vienna, Austria, 10–13 November 2013; pp. 5392–5397.
- Knauff, M.; Schegan, C.; Chunko, J.; Fischl, R.; Miu, K. A preliminary modeling and simulation platform to investigate new shipboard power system prototyping techniques. In Proceedings of the Grand Challenges in Modeling and Simulation, Istabul, Turkey, 13–16 July 2009; pp. 198–204.
- Oh, S.; Yoo, C.; Chung, I.; Won, D. Hardware-in-the-loop simulation of distributed intelligent energy management system for Microgrids. Energies
**2013**, 6, 3263–3283. [Google Scholar] [CrossRef] - Shiau, J.; Lee, M.; Wei, Y.; Chen, B. Circuit simulation for solar Power maximum Power Point tracking with different Buck-Boost converter topologies. Energies
**2014**, 7, 5027–5046. [Google Scholar] [CrossRef] - Calise, F.; Capuano, D.; Vanoli, L. Dynamic simulation and Exergo-Economic optimization of a hybrid solar–geothermal cogeneration plant. Energies
**2015**, 8, 2606–2646. [Google Scholar] [CrossRef] - Marco, J.; Kumari, N.; Widanage, W.D.; Jones, P. A cell-in-the-loop approach to systems modelling and simulation of energy storage systems. Energies
**2015**, 8, 8244–8262. [Google Scholar] [CrossRef] - Locment, F.; Sechilariu, M. Modeling and simulation of DC Microgrids for electric vehicle charging stations. Energies
**2015**, 8, 4335–4356. [Google Scholar] [CrossRef] - Lehfuss, F.; Lauss, G.; Kostampopoulos, P.; Hatziargyriou, N.; Crolla, P.; Roscoe, A. Comparison of multiple power amplification types for power hardware-in-the-loop applications. In Proceedings of the IEEE Workshop Complexity Engineering, Aachen, Germany, 11–13 June 2012; pp. 1–6.
- Lauss, G.; Faruque, M.O.; Schoder, K.; Dufour, C.; Viehweider, A.; Langston, J. Characteristics and design of Power hardware-in-the-loop simulations for electrical Power systems. IEEE Trans. Ind. Electron.
**2016**, 63, 406–417. [Google Scholar] [CrossRef] - Viehweider, A.; Lauss, G.; Lehfuss, F. Interface and stability issues for SISO and MIMO power hardware in the loop simulation of distribution networks with photovoltaic generation. Int. J. Renew. Energy Res.
**2012**, 2, 632–639. [Google Scholar] - Wu, X.; Lentijo, S.; Deshmuk, A.; Monti, A.; Ponci, F. Design and implementation of a power-hardware-in-the-loop interface: A nonlinear load case study. In Proceedings of the Twentieth Annual IEEE Applied Power Electronics Conference and Exposition, Urbana, IL, USA, 6–10 March 2005.
- Ayasun, S.; Fischl, R.; Chmielewski, T.; Vallieu, S.; Miu, K.; Nwankpa, C. Evaluation of static performance of simulation-stimulation interface for Power hardware in the loop. In Proceedings of the IEEE Power Tech Conference, Bologna, Italy, 23–26 June 2003.
- Jha, K.; Mishra, S.; Joshi, A. Boost-amplifier-based Power-hardware-in-the-loop simulator. IEEE Trans. Ind. Electron.
**2015**, 62, 7479–7488. [Google Scholar] [CrossRef] - Lentijo, S.; D’Arco, S.; Monti, A. Comparing the dynamic performances of power hardware-in-the-loop interfaces. IEEE Trans. Ind. Electron.
**2010**, 57, 1195–1207. [Google Scholar] [CrossRef] - Gan, C.; Todd, R.; Apsley, J.M. Drive system dynamics compensator for a mechanical system emulator. IEEE Trans. Ind. Electron.
**2015**, 62, 70–78. [Google Scholar] [CrossRef] - Wu, X.; Lentijo, S.; Monti, A. A novel interface for power hardware-in-the-loop simulation. In Proceedings of the IEEE Workshop on Computers in Power Electronics (COMPEL 2004), Urbana, IL, USA, 15–18 August 2004; pp. 178–182.
- Ren, W.; Steurer, M.; Baldwin, T.L. Improve the stability and the accuracy of power hardware-in-the-loop simulation by selecting appropriate interface algorithms. IEEE Trans. Ind. Appl.
**2008**, 44, 1286–1294. [Google Scholar] [CrossRef] - Feng, X.; Liu, J.; Lee, F.C. Impedance specifications for stable dc distributed power systems. IEEE Trans. Power Electron.
**2002**, 17, 157–162. [Google Scholar] [CrossRef] - Paran, S.; Edrington, C.S. Improved power hardware in the loop interface methods via impedance matching. In Proceedings of the IEEE Electric Ship Technologies Symposium, Arlington, VA, USA, 22–24 April 2013; pp. 342–346.
- Siegers, J.; Santi, E. Improved power hardware-in-the-loop interface algorithm using wideband system identification. In Proceedings of the IEEE Applied Power Electronics Conference and Exposition, Fort Worth, TX, USA, 16–20 March 2014; pp. 1198–1204.
- Viehweider, A.; Lauss, G.; Felix, L. Stabilization of power hardware-in-the-loop simulations of electric energy systems. Simul. Model. Pract. Theory
**2011**, 19, 1699–1708. [Google Scholar] [CrossRef] - Sun, J. Impedance-based stability criterion for grid-connected inverters. IEEE Trans. Power Electron.
**2011**, 26, 3075–3078. [Google Scholar] [CrossRef] - He, J.; Li, Y.W.; Bosnjak, D.; Harris, B. Investigation and active damping of multiple resonances in a parallel-inverter-based microgrid. IEEE Trans. Power Electron.
**2013**, 28, 234–246. [Google Scholar] [CrossRef] - Zhang, S.; Jiang, S.; Lu, X.; Ge, B.; Peng, F.Z. Resonance issues and damping techniques for grid-connected inverters with long transmission cable. IEEE Trans. Power Electron.
**2014**, 29, 110–120. [Google Scholar] [CrossRef] - Wang, F.; Duarte, J.L.; Hendrix, M.A.M.; Ribeiro, P.F. Modeling and analysis of grid harmonic distortion impact of aggregated DG inverters. IEEE Trans. Power Electron.
**2011**, 26, 786–797. [Google Scholar] [CrossRef] - Jia, Y.; Zhao, J.; Fu, X. Direct grid current control of LCL-filtered grid-connected inverter mitigating grid voltage disturbance. IEEE Trans. Power Electron.
**2014**, 29, 1532–1541. [Google Scholar] - Lauss, G.; Lehfuss, F.; Viehweider, A.; Strasser, T. Power hardware in the loop simulation with feedback current filtering for electric systems. In Proceedings of the 37th Annual Conference on IEEE Industrial Electronics Society, Melbourne, Australia, 7–10 November 2011; pp. 3725–3730.
- Cespedes, M.; Sun, J. Impedance modeling and analysis of grid-connected voltage-source converters. IEEE Trans. Power Electron.
**2014**, 29, 1254–1261. [Google Scholar] [CrossRef] - Ren, W.; Steurer, M.; Baldwin, T.L. An effective method for evaluating the accuracy of power hardware-in-the-loop simulations. IEEE Trans. Ind. Appl.
**2009**, 45, 1484–1490. [Google Scholar] [CrossRef] - Yang, D.; Ruan, X.; Wu, H. Impedance shaping of the grid-connected inverter with LCL filter to improve its adaptability to the weak grid condition. IEEE Trans. Power Electron.
**2014**, 29, 5795–5806. [Google Scholar] [CrossRef]

**Figure 7.**Equivalent circuit for the PHIL simulation system with a paralleling virtual impedance (VI).

**Figure 8.**Transfer function diagram of the PHIL system: (

**a**) s-domain model; (

**b**) equivalent transformation I; (

**c**) equivalent transformation II.

**Figure 14.**Topology used in the first PHIL simulation scenario, with a linear resistance/inductor (RL) load circuit.

**Figure 15.**Frequency responses of different impedances Z

_{s}(s) and Z

_{l}(s), the combined impedance Z

_{lc}(s), and the compensated impedance Z

_{lc}′(s): (

**a**) Case 1; (

**b**) Case 2; and (

**c**) Case 3.

**Figure 17.**Scenario 1 simulation with L

_{s}= 2 mH, R

_{s}= 2 Ω, L

_{l}= 2 mH, and R

_{l}= 2 Ω: (

**a**) uncompensated output voltage waveform and (

**b**) compensated output voltage waveform.

**Figure 18.**Scenario 1 simulation with L

_{s}= 4 mH, R

_{s}= 2 Ω, L

_{l}= 2 mH, and R

_{l}= 2 Ω: (

**a**) uncompensated output voltage waveform; (

**b**) compensated output voltage waveform.

**Figure 19.**Scenario 1 simulation with L

_{s}= 2 mH, R

_{s}= 2 Ω, L

_{l}= 4 mH, and R

_{l}= 2 Ω: (

**a**) uncompensated output voltage and error waveforms; (

**b**) compensated output voltage and error waveforms; (

**c**) magnified view of output voltage error waveforms.

**Figure 21.**Scenario 2 simulation with R

_{s}= 2Ω, L

_{l}= 1 mH, C

_{l}= 10 mF, and R

_{l}= 8 Ω: (

**a**) uncompensated output voltage and error waveforms; (

**b**) compensated output voltage and error waveforms; and (

**c**) view of output voltage error waveforms.

Parameter | Value | Parameter | Value |
---|---|---|---|

R_{s} | 2 Ω | R_{l} | 2 Ω |

L_{s} | Case (1): 2 mH | L_{l} | Case (1): 2 mH |

Case (2): 4 mH | Case (2): 2 mH | ||

Case (3): 2 mH | Case (3): 4 mH |

© 2016 by the authors; licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC-BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Zha, X.; Yin, C.; Sun, J.; Huang, M.; Li, Q.
Improving the Stability and Accuracy of Power Hardware-in-the-Loop Simulation Using Virtual Impedance Method. *Energies* **2016**, *9*, 974.
https://doi.org/10.3390/en9110974

**AMA Style**

Zha X, Yin C, Sun J, Huang M, Li Q.
Improving the Stability and Accuracy of Power Hardware-in-the-Loop Simulation Using Virtual Impedance Method. *Energies*. 2016; 9(11):974.
https://doi.org/10.3390/en9110974

**Chicago/Turabian Style**

Zha, Xiaoming, Chenxu Yin, Jianjun Sun, Meng Huang, and Qionglin Li.
2016. "Improving the Stability and Accuracy of Power Hardware-in-the-Loop Simulation Using Virtual Impedance Method" *Energies* 9, no. 11: 974.
https://doi.org/10.3390/en9110974