Two-level converter causing computation spike every 3.3 ms

1 view (last 30 days)
I am currently running a real time simulator based on a simulink model. In this model I use the Two-level-converter block available in simulink. The problem I encounter is that every 3.333ms it uses large computational time.
This can be observed in the added picture where you should compare the computation time when using the two-level converter and when using a controlled voltage source (the converter controller is never changed.)
Any idea of what is causing this? (3.333 ms is exactly 6 times in a 50 Hz cycle, 50 Hz is the power system frequency)
Any idea on how to reduce the spikes in computation time?
  3 Comments
Karl Fredrik Wirgenes
Karl Fredrik Wirgenes on 5 Feb 2023
Edited: Karl Fredrik Wirgenes on 5 Feb 2023
Thanks for the feedback.
I forgot to mention that the I am running matlab 2019B. An the converter is set to be an average model (Uref controlled), which uses a switching function (not a switching device(?)). You seem to be correct that it is related to the commutation as it occours for each zero crossing of the inverter current.
chattering in the currents?
Not at all, almost a perfect sinusoid.
How big is the load it's feeding?
A large microgrid running at about 7 MW with a power factor of 0.9 (perfectly balanced system)
Joel Van Sickel
Joel Van Sickel on 6 Feb 2023
Can you share your model? Are you using simscape (blue) or specialized power systems (black)? You can also run the profiler in Simulink to see how long a model runs. Can you recreate this problem on desktop? In general, even if something strange is happening with commutation, a fixed step solver should take the same amount of time. The exception to this rule is if somehow a setting it set allowing the solver to iterate. The other difference would be if you are logging significantly more data with the new block, but that would not likely line up with your system frequency.

Sign in to comment.

Answers (0)

Communities

More Answers in the  Power Electronics Control

Products


Release

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!