MATLAB: Bi directional buck boost converter with simulink and simscape only

pepower_electronics_controlspecialised power system block

Hello All,
I did design a bi directional circuit in simscape.I used PWM from specialised power system for producing PWM of variable duty cycle.But i see the simulation runs very slowly.When i try increasing the sample time,the circuit functioanlity disappears. How can I increase the speed of my circuit.Kindly help
I'm using ode15s/dasesimscape solver under variable step configuration

Best Answer

Sample time is an intrinsic part of the power electronics circuit model. As a result, it would be difficult to speed up simulation by merely increasing the sample time.
There is an alternative way to achieve a faster simulation by using averaged-value models, which does not simulate the switching behavior. You can use the block in the following link to construct your model:
As mentioned in the link, you can program the block as a buck converter, boost converter, or buck-boost converter by providing the duty cycle. In your model, simply replace the individual component blocks with a single converter block.