Main Content

Battery Heater Control

Battery heater control algorithm

Since R2022b

Simscape / Battery / BMS / Thermal Management


This block implements a battery heater control algorithm.

Temperature is crucial in batteries as low temperatures significantly decrease the battery life. It is then fundamental to keep the temperature of each cell of the battery under control and activate heaters or coolers to keep the temperature under safe limits. If the temperature is too low, the battery management system (BMS) enables a heater.

This block supports single-precision and double-precision floating-point simulation.


To enable single-precision floating-point simulation, the data type of all inputs and parameters must be single.

This diagram shows the structure of the block:


The Battery Heater Control block activates the heater only if the temperature of the ambient drops below the value of the Ambient temperature threshold for heater parameter. If the temperature drops below this threshold, the value at the Command output port is equal to:



  • Tcoolant is the coolant temperature.

  • Ton is the coolant temperature at which the heater switches on.

  • Toff is the coolant temperature at which the heater switches off. This value is greater than Ton.

  • Commandold is the command at the previous time step.



expand all

Temperature of the ambient, specified as a scalar.

Temperature of the coolant, specified as a scalar.


expand all

Heater command, returned as a scalar. If this value is equal to 0, the heater switches off. If this value is equal to 1, the heater switches on.


expand all

Ambient temperature at which the block activates the heater.

Coolant temperature at which the heater switches on.

Coolant temperature at which the heater turns off. The value of this parameter must be greater than the value of the Switch-on coolant temperature parameter.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2022b