How to fix droop control errors in GFM inverter simulations

Greetings,

I am currently formulating a research project on Grid-Forming (GFM) inverters utilizing droop control, yet I have encountered a significant impasse regarding the droop mechanism itself. Upon executing the code and running the simulation, the following error messages appeared:

Previously, when integrating voltage and current control loops, I did not encounter such issues. I adhered to the recommendation of setting the maximum number of consecutive zero crossings to zero; however, this yielded no substantial progress. In fact, the droop control has ceased to function entirely.

Could you please advise if there is a fundamental error in my implementation of the droop control, or if there are specifically functions that require closer attention when constructing this control scheme? I would greatly appreciate your guidance and direction in resolving this matter.

this is my simulation file:

GFM_DROOP_3.plecs (183.1 KB)

Hi henry_01,

The model you shared and the model shown in your screenshot appear to be different. When I run the shared model as-is, I do not see any errors. It would be helpful if you could please let us know which version of PLECS you are using?

Additionally, in the shared model, it appears that the three-phase inverter is built using individual IGBT with antiparallel diode components. However, in the screenshot based on the error message, it appears that you are using the sub-cycle averaging implementation of the Power Modules, which is intended for real-time HIL simulation.

Could you confirm which model configuration is producing the issue?

Dear @Munadir_Ahmed,

My sincerest apologies; it appears that the model in question is indeed incorrect.

Please find below the simulation model I intended to reference:

GFM_DROOP_3.0.plecs (180.2 KB)

Hi henry_01,

I’m curious to know what your motivation is for using the sub-cycle averaging mode in your simulation. Is your intention to eventually move this model to an RT Box HIL simulation?

For this particular configuration, there may not be many advantages to using the sub-cycle averaging mode. Where it can be especially beneficial for offline simulation is in applications with many converters connected in series or parallel with different carrier phases (for example, MMC applications).

That said, the sub-cycle averaging implementation internally utilizes two diodes. In the model you shared, these diodes appear to be repeatedly turning on and off due to very small voltages or currents around zero.

If I change the Diode turn-on threshold from the default value of 0 V to 0.7 V under:

Simulation → Simulation Parameters → Solver → Diode turn-on threshold

the issue appears to be resolved in your model.

Alternatively, if you do not intend to convert this model to a HIL simulation or take advantage of sub-cycle averaging for large multi-converter systems, you could simply change the VSI component configuration from Sub-cycle Averaging to Switched, which also resolves the issue.

Hope this helps!

Please note the documentation for the diode turn-on threshold. A value of 0.7 is rather high. It is not to be confused with the diode voltage drop. If it needs to be set, start with values like 1e-3.

Yes, my plan is to use this model as the control baseline for an inverter plant in a Typhoon HIL environment for a real-time simulation later.However, I’ve noticed significant differences between the two platforms. The underlying approach applied in PLECS is already quite different from what I’ve built in Typhoon HIL. To be honest, I’m currently still stuck on this Grid-Forming (GFM) plant, specifically regarding the droop control implementation.Nevertheless, thank you so much for all the suggestions! At the very least, my simulation is finally able to run now.