How to speed up simscape electrical simulation?

54 次查看(过去 30 天)
Greetings everyone,
I have been trying to find the way to simulate the simscape electrical model much faster.
  1. 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.
  2. The PMSM parameters are chosen from the pre-parameterized list of motor.
  3. The speed is controlled through field-oriented control.
  4. 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!

回答(2 个)

Antonino Riccobono
Antonino Riccobono 2024-11-19,7:28
Dear Hassan Ali,
I had a look at your model and I can notice that margins of improvements are in the direction of
  1. model fidelity -> you chose components and parameterization options way too detailed;
  2. Local Solver settings -> the default settings do not necessarily offer the balance between accuracy and simulation speed you are looking for.
  3. The control algorithm mixes up continuous-time blocks and discrete-time blocks -> the continuous-time blocks in general represent the bottleneck for simulation speed. Typically, setting the sample times correctly helps a lot with simulation speed.
Therefore, I am happy to share with you that in the Power Electronics Control Design training course (see venues and pricing) I authored all these aspects are dedicated chapters and the course model we build in that course is conceptually the same you are working on. In my final model comprising the cascade of a battery, bi-directional DC-DC converter with DC-link voltage controller, DC-AC three-phase inverter and PMSM with torque controller using the FOC principles, simple mechanical load, I have Tstop = 100 s and I can simulate this system within 1 minute clock time! Quite impressive, isn't it?
Hope you see you in class one day.
Cheers,
Antonino
  3 个评论
Antonino Riccobono
Antonino Riccobono about 24 hours 前
Hi Hassan Ali,
If you need to assess losses and efficiency of the inverter (excluding the PMSM) with different power semiconductor devices, you could do the following:
  1. Replace your battery and motor with and ideal voltage source and and series RL load, respectively. Size the RL load exactly as the stator resistance and inductance.
  2. Convert your torque controller using FOC into a standard current controller aiming at controlling the inductor current.
  3. Replace the N-Channel MOSFET {or N-Channel IGBT} blocks with MOSFET {or IGBT} (Ideal, Switching) blocks. The ideal, switching blocks use a piecewise linear approximation (thus fast computation) while being able to characterize both conduction and switching losses.
  4. Pay attention to the anti-parallel diodes. In many practical application, external power diodes are required to be added in anti-parallel to each IGBT (mandatory) or MOSFET (optional if the body diode is high quality).
  5. Use the ee_importDeviceParameters function to automatically parameterize the IGBT or MOSFET (Ideal, Switching) blocks after an XML file downloaded from a vendor ( see https://www.infineon.com/cms/en/product/power/igbt/ and https://www.hitachienergy.com/products-and-solutions/semiconductors/insulated-gate-bipolar-transistor-igbt-and-diode-modules as examples). See documentation for the function.
  6. Use Simscape logging and run your simulation.
  7. Use the ee_getEfficiency function to calculate both the efficiency and the losses (conduction and switching) for all the nonload components. See documentation.
  8. Repeat for other semiconductor devices.
Hope this helps,
Antonino
Hassan Ali
Hassan Ali about 9 hours 前
Thank you so much for detailed explanation.
I will try this.

请先登录,再进行评论。


Rick Hyde
Rick Hyde 2024-11-19,9:17
Dear Hassan Ali
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 个评论
Rick Hyde
Rick Hyde 2024-11-19,13:22
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
Hassan Ali about 9 hours 前
Thank You Rick,
I will look into it and try.

请先登录,再进行评论。

社区

更多回答在  Power Electronics Control

类别

Help CenterFile Exchange 中查找有关 Switches and Breakers 的更多信息

产品


版本

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by