Load overcurrent model now using internal temperature

This commit is contained in:
Martin Jaeger
2019-10-31 11:33:18 +01:00
parent b0e265f3e9
commit b1a7babaff
2 changed files with 10 additions and 1 deletions
+2 -1
View File
@@ -349,7 +349,8 @@ void LoadOutput::control()
junction_temperature = junction_temperature + (
internal_temp - junction_temperature +
port->current * port->current /
(LOAD_CURRENT_MAX * LOAD_CURRENT_MAX) * (MOSFET_MAX_JUNCTION_TEMP - 25)
(LOAD_CURRENT_MAX * LOAD_CURRENT_MAX) *
(MOSFET_MAX_JUNCTION_TEMP - INTERNAL_MAX_REFERENCE_TEMP)
) / (MOSFET_THERMAL_TIME_CONSTANT * CONTROL_FREQUENCY);
if (junction_temperature > MOSFET_MAX_JUNCTION_TEMP