Long simulation time by combining BEV and PV modelling in SIMULINK

9 views (last 30 days)
Hi, I am doing a physical modelling simulation using Simscape of Battery Electric Vehicle equipped with Photovoltaic as additional power source. The model of BEV and PV itself were a success when it is being simulated seperately. The problem is when i combine PV model with my BEV model, the simulation takes a longer time to simulate and it would usually take hours to finish simulating, even though i simulate it for 10 seconds. For the PV Module i use boost DC Converter connect with battery. In order to simulate i need to use discrete powergui and a sample time of 1 micro.
I wish to know how can i reduce the simulation time and make MATLAB SIMULINK simulate it faster. It would be a great help if suggestions on how to solve this problem are presented. Thank you in advance!
  2 Comments
HAMIZAH SYAZWANI JOHARI
HAMIZAH SYAZWANI JOHARI on 6 Sep 2022
Both models run fast seperately and only slow down when combined. Attached here is the lastest file that I have improvised. I simulated a drive cycle EUDC for 400s with solver ode23t and it took me more than an hour to finished simulating, but I did not get to see the result of the simulation as the file crashed everytime I simulate the combined model longer than 50s. Is it because my laptop has low storage to simulate such big files?

Sign in to comment.

Accepted Answer

Joel Van Sickel
Joel Van Sickel on 6 Sep 2022
Hello Hamizah,
thank you for sharing your model. I can give you some specifics now. The first issue is that the battery is implemented in Specialized Power Systems (black model) and so is the boost converter, but you have a switching dc motor modelled in simscape (blue model). Combining Specialized power systems with more complex simscape models is not recommended as the ideal solver for specialized power systems is ode23tb, while for simscape, you'd want to use ode15s, ode23t, or daessc. The model also has 2 seperate powergui blocks, one which is set at a discrete rate of 1s which seems wrong due to the fact that you are modelling switching behavior. There is also a battery on the boost converter model and a seperate battery for the car, is this expected? The boost converter doesn't seem to be doing anything in the simulation that I ran. I dug deeper into that and the PWM generator doesn't seem to be working. It looks like the zero crossing detection isn't working. I suggest using one of the shipping PWM generator blocks instead of your own.
I would then drastically simplify this system and build it back up piece by piece. It looks like a lot of stuff was stitched together.
Another really good way to speed things up would be to NOT include the switching effects. Using average models will work much faster and still be useful for simulation analysis.
use the averaged switch option.
Regards,
Joel
  3 Comments
HAMIZAH SYAZWANI JOHARI
HAMIZAH SYAZWANI JOHARI on 7 Sep 2022
Hello Joel,
May I know what do you mean by "if something is wrong with the solar piece, you should put it in a model by itself and get it working individually"? I do not quite understand it. I also think that there is a problem with the solar cell, because I removed the switch and still get weird behaviour.
I have remove the PWM and connect the duty ratio directly to the boost converter with average switch chosen. But the simulation only be able to simulate for 300s instead of 1180s. There is one error at boost converter at 300s, refer to the image below:
The error states "no line number info" which I also do not quite understand as I am using a default value for boost converter. Could you please help me to clarify this?
Best Regards,
Hamizah

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by