Long simulation time by combining BEV and PV modelling in SIMULINK

조회 수: 11 (최근 30일)
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
Joel Van Sickel
Joel Van Sickel 2022년 9월 2일
Do both of your models run fast seperately and only slow down when combined, or does the PV run slow no matter what? Are you able to share the models or can you share the solver settings used for both of them?
HAMIZAH SYAZWANI JOHARI
HAMIZAH SYAZWANI JOHARI 2022년 9월 6일
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?

댓글을 달려면 로그인하십시오.

채택된 답변

Joel Van Sickel
Joel Van Sickel 2022년 9월 6일
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
Joel Van Sickel
Joel Van Sickel 2022년 9월 7일
Hello Hamizah,
It looks like the solar cell is decoupled from the rest of your simulation and connected through a controlled current source that is behind a switch. First, if that switch is ever disconnected AND you try and put a current through that current source, you will get weird behavior because one is trying to force an open circuit and the other is trying to force current through the circuit. Also, if something is wrong with the solar piece, you should put it in a model by itself and get it working individually. You're still simulating switching events, with a 1e-6 time step so as long as you do this, your model will always be slow. You need to get rid of the PWM and use an average signal (the duty ratio) and feed that directly to the boost converter with average switch chosen instead of MOSFET.
Regards,
Joel
HAMIZAH SYAZWANI JOHARI
HAMIZAH SYAZWANI JOHARI 2022년 9월 7일
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

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Sources에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by