solver discrete or continuos in simscape?
2 views (last 30 days)
Show older comments
Hi, I'm doing some changes to my model (an installation for solar harvesting) in order to improve its performance and reduce the simulation time which is too long since I integrate the DC-DC converter to the whole system (speed up and keep a reasonable accuracy). These were the changes:
1-Change solver from variable-step (no continuos step) to variable-step (ode23tb)
2-Powergui from Discrete (TBE with a sample time 0.01) to continuos (ideal switching)
3-In order to break an algebraic loop, I first used a Delay Block, but now I use a Transfer Fcn (with initial outputs).
I have to pinpoint that in discrete mode my system takes 27 hours to simulate 24 hours of energy production. However, in continous mode, it now takes around a week to simulate 24 hours of solar generation.
It is important to note that this model is composed of both Simulink blocks and Simscape blocks.
0 Comments
Answers (1)
Devraj Dutt
on 9 Nov 2016
ode23tb is the best solver I've used for power electronics simulations.
Option 1: For point 2, also try changing each switch in your model to ideal via its properties.
For point 3, try using a memory block instead (https://www.mathworks.com/help/simulink/slref/memory.html)
Option 2: For point 2, run it back on TBE.
For point 3, try using a memory block instead (https://www.mathworks.com/help/simulink/slref/memory.html)
2 Comments
Devraj Dutt
on 14 Nov 2016
Have you tried the memory block, though? The physical effect of the memory block is that it delays the signal by one time-step. Do you think it would matter a lot (really depends on the resolution of your voltage measurement and also how quickly the voltage can change in your system - is it more than 100 Hz)? I have tried using memory to solve issues even in circuits with upto 20000 Hz switching (simscape with powergui), provided that the timestep is lesser than that by at least a factor of 10-100, it may not be a big issue. Ofcourse, if you'd like to go ahead with mathworks advice, I cannot contradict that.
See Also
Categories
Find more on Electrical Sensors in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!