When simulating thermal behavior with a MOSFET, the temperature rise is negative.

Hi, I'm working on simulating a system where the main architecture involves using FOC and MTPA algorithms to drive an INVERTER controlling the speed of a PMSM. The aim is to measure the temperature rise in the INVERTER using this architecture.
However, after simulating and measuring the temperature rise, I found that the temperature in the INVERTER is negative (-5*10^5 °C).
When I replaced the same INVERTER architecture with another example for testing (ee_pmsm_drive), the measured temperature was positive, and the temperature rise value was more reasonable.
I haven't been able to find any relevant information or solutions to the problem of measuring a negative temperature rise in the MOSFET or related issues on the website. Could anyone help?

 Accepted Answer

The problem with the thermal is due to the time step being too large for your simulation. You are using a time step of 1e-6. At a time step of 1e-8, i do see the temperature rising. This is due to the fact that the transistor models require very small time steps (often 1e-9) to model turn on and turn off dynamics appropriately. The other model works because it is using a variable step solver which also addresses this problem, while providing a faster simulation than a fixed step 1e-9. Unfortunately, your model doesn't converge with variable time step. I haven't been able to track down the reasons, but it would be good to model the control loop after the example. I'd replace the memory blocks with unit delays or zero order holds (or leave as memory but give it a fixed time step). One way to model a discrete controller is have all inputs go through a zero order hold, and all outputs go through a unit delay. This can cause problems with simscape variable solver IF the controller update rate is much faster than the system dynamics, but for power electronics, the system dynamics are almost always faster than the controller update rate, so this isn't something you would have to worry about. Sorry I couldn't be more specific in how to get it working with a variable rate solver. Also, for most control applications, simulating this level of detail is unecessary. You can also use piecewise linear (ideal) switches to model the controller behavior and put the switching losses into a tabulate table and potentially get more accurate thermal results than using the n-channel mosfet.

6 Comments

Hi Joel, thank you very much for your response. I did try simulating using a smaller time step as you suggested, and indeed, the temperature rise appears to be positive. However, the simulation time is very long; simulating just 0.4 seconds consumes a week's worth of time. I'd like to inquire about modifying my model to have a variable time step to reduce simulation time. Additionally, I want the control loop of my model to be converted to C code for benchmarking simulations. Could you please advise me on the direction I should take for these modifications? Thank you.
Hello Frank, please see the 2nd portion of of my response for the first steps that you should take in attempting to get it to be variable step. Another good way would be to start with the example model and make changes to it bit by bit while leaving it in variable step.
Hi Joel,
Thank you for your advice. I will make the modifications as you suggested. However, I have a question. How does changing the time step from 1e-6 to 1e-9 result in a shift from negative temperature to positive temperature? It seems like it should only affect the granularity of data extraction.
the time step changes the accuracy of the simulation, so anything can be wrong, temperature, current voltage, and even unrealistic values can happen with the time step is too large, so you can't really use logic or reason to explain what your seeing when a simulation has a time step that is too large.
How should one choose the appropriate time step to ensure the accuracy of simulated data and reduce simulation time?
you have to manually make the time step smaller until the simulation results stop changing, or get the model to work with a variable time step.

Sign in to comment.

More Answers (0)

Categories

Find more on Simscape Electrical in Help Center and File Exchange

Products

Release

R2023a

Community Treasure Hunt

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

Start Hunting!