simulation takes so long and memory problem at the end

2 views (last 30 days)
Hi all,
I am trying to simulate the performance of a motor and a battery.
in the first model i attached the motor directly to the battery as shown in figure and simulate it. the simulation was fast and i got results.
in the second case, i put a PWM and a H-Bridge between the same motor and battery and tried to simulate the performance using the same solver and input but the time step was much much smaller than the time step in the first case and when i wait to the end of the simulation i can't open the scope because of memory problem.
i tried to increase the minimum time step but there was a problem with the tolerance. i increased the virtual memory but still has the same problem.
the used solver is ode23t
any suggestions ??

Accepted Answer

A Jenkins
A Jenkins on 27 Feb 2014
How you approach it really depends on what you are trying to accomplish. Off the top of my head:
  1. Change the switching frequency on your PWM so you don't have to calculate as often.
  2. Shorten your simulation time.
  3. Increase the decimation on your scope.
  4. Get a better computer.
  5. Look at a similar example and see how they set up the solver parameters.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!