How to speed up simscape electrical simulation?
Show older comments
Greetings everyone,
I have been trying to find the way to simulate the simscape electrical model much faster.
- I have designed a drivetrain model using simscape electrical, in which the 3-phase inverter contains 6 N-channel MOSFETs which I have parameterized using silicon MOSFETs datasheet.
- The PMSM parameters are chosen from the pre-parameterized list of motor.
- The speed is controlled through field-oriented control.
- At the motor end, the tires and vehicle body is attached to replicate the EV model.
I want to run the simulation over a complete drivecycle, but the simulation time is too slow, it takes around 30-40 minutes to run 1% only depending on the switching frequency and consequently sample time.
Due to longer simulation time, it often crashes after few hours.
Could you please guide if my model has any errors or what possible ways are there to improve it and pace up the simulation time.
The model is hereby attached for your kind reference.
Thank you!
Accepted Answer
More Answers (1)
Rick Hyde
on 19 Nov 2024
0 votes
Dear Hassan Ali
You might want to take a look at this example on MATLAB Central: https://www.mathworks.com/matlabcentral/fileexchange/104840-motor-efficiency-improvements-with-tuned-control-parameters?s_tid=srchtitle
plus this one:
For a drive cycle, you're best using a more abstract model as in this second example. This uses our Motor & Drive (System Level) library block which balances electrical power, mechanical power and losses - so no semiconductor switching. For this model to give good predictions over a drive cycle, the losses have to be accurate. For this, you can use a more detailed model like in the first linked example above - the detailed model is used to get motor and power electronic losses at different operating points.
They key here is that you only need a few switching cycles to get losses for a particular operating point (torque, speed, temperature) - so the detailed model doesn't need to simulate a whole drive cycle.
Hope that helps
Rick
Simscape Team
3 Comments
Hassan Ali
on 19 Nov 2024
Rick Hyde
on 19 Nov 2024
Suggest looking at the two linked examples to understand how you can get losses from a few switching cycles. It's about initializing your detailed model up in a range of initial condiitons (torque, speed, temperature, DC voltage etc) and recording the on-state and switching losses as lookup tables. You then use these in your system-level drive cycle model.
Hassan Ali
on 20 Nov 2024
Communities
More Answers in the Power Electronics Control
Categories
Find more on Choose and Parameterize Blocks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!