State discontinuity after switching

I am simulating a Vienna Rectifier. It had been running fine until the error “state discontinuity after switching” pops up. How can I rectify the error?

Hi,

I tried running your model, but it includes thermal descriptions and at least one component from the Simscape Electrical library. Can you please include the .xml files for the MOSFETs/diodes and provide the parameters for the triangular wave generator in your modulator?

Thanks,

Kris

Hi,

The parameters for the triangular wave generator are a frequency of 50kHz and a sample time of 1e-6 sec with 0 degree phase. Maybe you can run the basicVR.m first before running the model because most of the variables are declared there. The .xml files are as attached. Thank you very much for taking the time to help me.

E3M0065090D.xml (7.33 KB)

E3M0065090D_bodydiode.xml (2.54 KB)

C2M0045170D_bodydiode.xml (2.37 KB)

Hi, thank you for including these files and parameters. I have not done a thorough analysis of your model and controller, but the error message refers to the current in the inductor being forced to zero instantaneously such that there is no path for it to go. This is not a typical suggestion for PLECS, but one option is to place a very high impedance (e.g., 1e6) leakage resistance in parallel to your filter inductors to allow a path for the current to flow during the event in question, but otherwise have little effect on normal operation of the system. I just tried this with your model now and it does indeed run successfully with that addition.