Simulation speed reduction due to Control / Discrete blocks

Dear all,

I noticed that the same simulation pass from 2s simulation to 25sec when I let PLECS calculate the Discrete mean value and the discrete RMS, is it possible that?

How can I improve it?

Attached the files

bst_UV2W_IPmod_noBlocks.plecs (86.8 KB)

bst_UV2W_IPmod_mitBlocks.plecs (88.8 KB)

Hi.

The blocks mentioned do consume a lot of time for computation when “sample time” is too low and/or “Number of samples” is too high. Try adjusting them and I feel that it is the compromise between “accuracy” and “time”.

Bhavani.

Hello,

The additional discrete states can slow down the simulation. We are addressing this in our next release with variable step/continuous RMS and THD blocks that will not cause the simulation speed issue.

Thank you,

Kris

thanks for the answer and for the support of @lino_capponi

there is a bug in the RMS block you sent to me, the reason is not clear be seems something with the initial buffer

Hello, can you please continue your email discussion with Lino about this?

Thank you,

Kris