Main Content

Battery Current Monitoring

Monitor for battery current

Since R2022b

Libraries:
Simscape / Battery / BMS / Protection

Description

This block implements battery overcurrent monitoring. Overcurrent protection is necessary in electrical circuits. A battery that is exposed to overcurrent experiences a considerable increase in cell temperature and is in 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 overcurrent symptom with this equation:

OvercurrentSymptom=(iChargelimit)>ErrorLimit(DischargeLimiti)>ErrorLimit.

The Battery Current Monitoring block then passes the overcurrent symptom to a Fault Qualification block, which qualifies the error.

Ports

Input

expand all

Battery pack current, in ampere, specified as a scalar.

Charging current limit of the battery, in ampere, specified as a scalar.

Discharging current limit of the battery, in ampere, specified as a scalar.

Output

expand all

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

Parameters

expand all

Threshold to allow small deviation from the charging and discharging limits, in ampere.

Time required to qualify the error, in seconds.

Time required to disqualify the 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