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.
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)?. Resolution will be handled in that ticket.
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!