Main Content

Battery Voltage Monitoring

Monitor for battery voltage

Since R2022b

Libraries:
Simscape / Battery / BMS / Protection

Description

The Battery Voltage Monitoring block monitors the voltage of a battery. Voltage protection is necessary in electrical circuits. A battery that is exposed to extremely high or extremely low voltages can enter a dangerously unstable state.

You can switch between continuous and discrete implementations of the block by using the Sample time (-1 for inherited) parameter. To configure the block for continuous time, set the Sample time (-1 for inherited) parameter to 0. To configure the block for discrete time, set the Sample time (-1 for inherited) parameter to a positive, nonzero value, or to -1 to inherit the sample time from an upstream block.

This diagram shows the structure of the block:

Equations

This block computes the undervoltage symptom with this equation:

UndervoltageSymptom=min(CellVoltage)UndervoltageLimit

This block computes the overvoltage symptom with this equation:

OvervoltageSymptom=max(CellVoltage)OvervoltageLimit

This block computes the faulty sensor symptom with this equation:

FaultySensorSymptom=|PackVoltagei1nCellVoltagei|FaultySensorThreshold

The check on the sum of the cell voltages assumes that all the cells are in series.

The Battery Voltage Monitoring block then passes these symptoms to a Fault Qualification block, which qualifies the errors.

Examples

Ports

Input

expand all

Cell voltage, in volt, specified as a scalar for a single cell or a vector for multiple cells.

Battery pack voltage, in volt, specified as a scalar.

Output

expand all

Indication of an undervoltage error. If this output is equal to 1, the battery is in an undervoltage state.

Indication of an overvoltage error. If this output is equal to 1, the battery is in an overvoltage state.

Indication of a sensor faulty error. If this output is equal to 1, the sensor is faulty.

Parameters

expand all

Voltage limit under which the battery is in an undervoltage state, in volt.

Voltage limit over which the battery is in an overvoltage state, in volt. The value of this parameter must be greater than the value of the Undervoltage limit (V) parameter.

Voltage threshold over which the sensor is faulty, in volt.

Time required to qualify the undervoltage error, in seconds.

Time required to disqualify the undervoltage error, in seconds. If you set this parameter to 0, the block does not disqualify the error.

Time required to qualify the overvoltage error, in seconds.

Time required to disqualify the overvoltage error, in seconds. If you set this parameter to 0, the block does not disqualify the error.

Time required to qualify the faulty sensor error, in seconds.

Time required to disqualify the faulty sensor error, in seconds. If you set this parameter to 0, the block does not disqualify the error.

Time between consecutive block executions. During execution, the block produces outputs and, if appropriate, updates its internal state. For more information, see What Is Sample Time? and Specify Sample Time.

For inherited discrete-time operation, specify this parameter as -1. For discrete-time operation, specify this parameter as a positive integer. For continuous-time operation, specify this parameter as 0.

If this block is in a masked subsystem or a variant subsystem that allows you to switch between continuous operation and discrete operation, promote the sample time parameter. Promoting the sample time parameter ensures correct switching between the continuous and discrete implementations of the block. For more information, see Promote Block Parameters on a Mask.

Extended Capabilities

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

Version History

Introduced in R2022b