State disconuity after switching error

Hello,

I am simulating a voltage source inverter supplying a three-phase RL load. The modulation scheme is set to sine PWM. Attached files are the model and thermal descriptions.

When simulating, I get error messages stating something like this:

At t=0.000974924832999970385: State discontinuity after switching. The current through inductor inversortri/Circuit/L1 is forced to jump from -0.183154 to -0.122102.

This happens the most when attempting the simulation for low AC frequencies (~2Hz). Note that I have tried lowering the simulation step but I still get the same discontinuity error message. I need to find a way to prevent the error or to allow the simulation to continue when it happens.

Thanks for your help.

inversortri.slx (38 KB)

DIODE_thermal.xml (2.03 KB)

IGBT_thermal.xml (2.06 KB)

Hi Luis,

The appropriate change here is not to decrease the Max Step Size setting but to decrease the Relative Tolerance setting.

After changing the Relative Tolerance setting to 1e-4 from 1e-3 the simulation proceeds as expected. One indicator this might be an accuracy issue, and not something more fundamentally wrong with the model, is that the change in current at the “discontinuity” is quite small relative to the ripple .

You should set the Max Step Size back to the original setting of 1e-3 as having an artificially low Max Step Size simply slows down your simulation in the majority of cases.

Regards,

Bryan