# Battery Coolant Control

**Libraries:**

Simscape /
Battery /
BMS /
Thermal Management

## Description

This block implements a battery coolant control algorithm.

Temperature is crucial in batteries because high temperatures significantly decrease the battery life. It is import to keep the temperature of each cell of the battery under control and activate heaters or coolers to keep the temperature within safe limits. If the temperature is too high, the battery management system (BMS) enables a cooling fan.

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

**Note**

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:

### Equations

The Battery Coolant Control block uses this equation to compute the flow temperature:

$$FlowTemperature={T}_{amb}-{T}_{cool}$$

where *T _{amb}* is the
ambient temperature and

*T*is the coolant temperature.

_{cool}If the value at the **FlowRateCommand** output port is equal to
`0`

, there is no flow in the battery. If this value is equal to
`1`

, then the flow rate in the battery takes its highest
possible value.

If you set the **Control strategy** parameter to
`ON-OFF control`

, the block uses this equation to
calculate the flow rate command:

$$FlowRateCommand=\{\begin{array}{cc}1,& {T}_{hottest}\ge {T}_{on}\\ FlowRateComman{d}_{old},& {T}_{off}<{T}_{hottest}<{T}_{on}\\ 0,& {T}_{hottest}<{T}_{off}\end{array}$$

where

*T*is the temperature of the hottest cell._{hottest}*T*is the switch-on temperature._{on}*T*is the switch-off temperature, which must be less than T_{off}_{on}.*FlowRateCommand*is the flow rate command at the previous time step._{old}

If you set the **Control strategy** parameter to ```
Step
control
```

, the block uses these equations to calculate the flow rate command:

$$\begin{array}{l}f\left(\Delta T\right)=c\left({T}_{hottest}-\mathrm{min}\left({T}_{coolest},{T}_{amb}-{T}_{cool}\right)\right)\\ FlowRateCommand=\mathrm{min}\left(f\left(\Delta T\right)-\mathrm{mod}\left(f\left(\Delta T\right),step\right),1\right)\end{array}$$

where

*T*is the temperature of the coolest cell._{coolest}*step*is the flow rate step command. For example, if*step = 0.2*, the value at the**FlowRateCommand**output port is one of these values: [0,0.2,0.4,0.6,0.8,1].*c*controls how aggressive the coolant strategy is. This value is a constant such that, if*f(ΔT)≥ 1*, the value at the**FlowRateCommand**output port is equal to 1. Otherwise, the block scales the flow rate command linearly to`0`

.

The step control strategy allows intermediate flow commands with the
value you specify for the **Flow rate step** parameter. To compute
the actual command, the block uses a function of the temperature gradient.

## Examples

## Ports

### Input

### Output

## Parameters

## Extended Capabilities

## Version History

**Introduced in R2022b**