# Why does this simulation give completely different results between offline and on-hardware(HIL)?

**URL:** <https://forum.plexim.com/t/why-does-this-simulation-give-completely-different-results-between-offline-and-on-hardware-hil/3148>\
**Category:** RT Box\
**Tags:** rt-box\
**Created:** [June 11, 2026, 3:26am UTC](https://forum.plexim.com/t/why-does-this-simulation-give-completely-different-results-between-offline-and-on-hardware-hil/3148 "2026-06-11T03:26:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yinyu\_yan](https://avatars.discourse-cdn.com/v4/letter/y/bbce88/32.png) [@Yinyu\_yan](https://forum.plexim.com/u/Yinyu_yan)\
**Post date:** [June 11, 2026, 3:26am UTC](https://forum.plexim.com/t/why-does-this-simulation-give-completely-different-results-between-offline-and-on-hardware-hil/3148/1 "2026-06-11T03:26:24Z")

</div>

I established a VSG simulation model, which exhibited excellent performance in offline simulation. However, the model produced entirely inaccurate results under the hardware-in-the-loop (HIL) simulation condition. Furthermore, I have independently verified the accuracy of the current inner-loop results obtained from the HIL test. Therefore, it is concluded that the discrepancies in the HIL simulation results stem from the P-F and Q-V control loops. The complete simulation model is attached below for reference.

[Inverter\_Double\_loop\_offline\_28069\_used.plecs](https://forum.plexim.com/uploads/short-url/8ggTwBXNseNF8Oa1ouKJ3q6JXdx.plecs) (313.9 KB)

---

<div class="post-metadata">

**Author:** ![Munadir\_Ahmed](https://dub1.discourse-cdn.com/flex006/user_avatar/forum.plexim.com/munadir_ahmed/32/1540_2.png) [@Munadir\_Ahmed](https://forum.plexim.com/u/Munadir_Ahmed)\
**Post date:** [June 11, 2026, 8:45pm UTC](https://forum.plexim.com/t/why-does-this-simulation-give-completely-different-results-between-offline-and-on-hardware-hil/3148/2 "2026-06-11T20:45:42Z")

</div>

This appears to be a duplicate of the question asked in [Why does this simulation give completely different results between offline and on-hardware (HIL)?](https://forum.plexim.com/t/why-does-this-simulation-give-completely-different-results-between-offline-and-on-hardware-hil/3143). Resolution will be handled in that ticket.

---

<div class="post-metadata">

**Author:** ![Yinyu\_yan](https://avatars.discourse-cdn.com/v4/letter/y/bbce88/32.png) [@Yinyu\_yan](https://forum.plexim.com/u/Yinyu_yan)\
**Post date:** [June 12, 2026, 12:24am UTC](https://forum.plexim.com/t/why-does-this-simulation-give-completely-different-results-between-offline-and-on-hardware-hil/3148/3 "2026-06-12T00:24:50Z")

</div>

Thank you very much for your detailed suggestions. My team and I will test and implement the optimization methods you proposed. Thanks again for your great support!
