Please take a minute to review and accept our Terms of Use.
Welcome to the PLECS User Forum, where you can ask questions and receive answers from other members of the community.

Many technical questions regarding PLECS are answered on the Technical Solutions page of our website. Tutorial videos, specific application examples, and pre-recorded webinars are available on our YouTube page. Please follow us on LinkedIn for the latest Plexim news.

State disconuity after switching error

0 votes

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.
asked Oct 18, 2021 by Luis_SL (12 points)

1 Answer

0 votes
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.


answered Oct 18, 2021 by Bryan Lieblick (1,949 points)