Battery Management System Development in Simulink
Summary
TLDRThe video script details the design and simulation of a Battery Management System (BMS) in Simulink, focusing on its application in an electric vehicle powertrain. The BMS model is used to simulate various usage cycles and environmental conditions to evaluate the system's response to unsafe conditions, such as temperature, voltage, or current outside recommended limits. The script explains the model's components, including the battery pack with different cell configurations, the BMS ECU with monitoring and control algorithms, and the charger and inverter contactor circuitry. It also discusses the importance of accurate State of Charge (SOC) estimation and presents three methods for this purpose: Coulomb counting, Unscented Kalman Filter (UKF), and Extended Kalman Filter (EKF). The video emphasizes the need for balancing individual battery cells to prevent underutilization and the significance of active thermal management to maintain cell condition uniformity. The script concludes by highlighting the use of Simulink, Stateflow, and Control System toolboxes for designing the BMS through modeling and simulation.
Takeaways
- π The BMS model in Simulink is used for desktop simulations to evaluate the system's response to unsafe conditions such as temperature, voltage, or current outside recommended limits.
- π The model can simulate various usage cycles and environmental conditions, aiding vehicle designers in testing scenarios without damaging real batteries.
- π The BMS ECU within the model has monitoring and control algorithms connected to a block representing the battery pack and its circuitry and peripherals.
- π The model includes two versions of the battery pack: a small one with six cells and a larger one with 16 modules, each containing six cells in series.
- π₯ The thermal layout of the battery pack is asymmetrical, leading to significant temperature differences among cells, which is crucial for understanding real-life performance.
- π Each cell in the model has an equivalent circuit that includes temperature, SOC, and aging dependencies, mimicking real-life lithium chemistry behaviors.
- π The BMS algorithm includes passive balancing circuitry to maintain battery cell modules' balance and better utilize total storage capacity.
- π The model also includes charger and inverter contactor circuitry to prevent high current from damaging the battery pack during charging.
- π The BMS subsystem uses individual cell voltages and temperatures to calculate maximum allowable charge and discharge current levels for safety.
- π State of charge (SOC) estimation is crucial and is achieved through three methods: Coulomb counting, unscented Kalman filters, and extended Kalman filters, each with its merits and limitations.
- π§ The model allows for the assessment of SOC estimation accuracy and the effectiveness of balancing procedures, highlighting the need for active thermal management.
Q & A
What is the primary purpose of the BMS model in Simulink?
-The primary purpose of the BMS model in Simulink is to simulate desktop simulations for reproducing diverse usage cycles and environmental conditions to evaluate the system's response to potentially unsafe conditions such as temperature, voltage, or current outside the recommended limits.
How does the BMS model help in testing different scenarios without damaging real batteries?
-The BMS model allows vehicle designers to test various situations like different temperatures, state of charges, and aggressive drive cycles in simulation, which helps in understanding the system's behavior without risking damage to the real battery.
What are the two versions of the battery pack included in the model?
-The model contains two versions of the battery pack: a small one with just six cells connected in series, and a larger one with 16 modules, each module containing the six-cell series string, all connected in one parallel string.
Why is it important to model the physical domain of each cell in the battery pack?
-Modeling the physical domain of each cell, indicated by different colors (e.g., blue for electrical, orange for thermal), helps in understanding how cells exchange heat with one another and how thermal layouts can affect temperature differences among cells, which is crucial for battery performance and safety.
What role does the equivalent circuit play inside each unit cell?
-The equivalent circuit inside each unit cell, which should have a topology and parameters that mimic real-life lithium chemistry responses, is essential for providing an equivalent response to what would be observed experimentally, including dependencies on temperature, SOC, and possibly aging.
How does the BMS algorithm manage cell balancing to optimize battery utilization?
-The BMS algorithm manages cell balancing by selectively closing switches in the passive balancing circuitry, which allows cells to undergo a partial discharge to lower their voltage, maintaining the battery cell modules' balance and enabling better utilization of the total storage capacity.
What is the significance of the charger and inverter contactor circuitry in the BMS model?
-The charger and inverter contactor circuitry are important for safely connecting the battery pack to a charger. They prevent excessively high current from rushing into the pack, which could potentially cause damage, by implementing a special pre-connection sequence.
How does the BMS algorithm protect the battery pack from physical damage due to temperature extremes?
-The BMS algorithm uses a lookup table with a rising or falling s-shaped profile to specify a current threshold based on temperature, modulating the allowable current delivery to avoid physical damage to the cell materials at high temperatures during charge and discharge, and at low temperatures during charge.
What are the three methods for state of charge (SOC) estimation presented in the BMS model?
-The three methods for SOC estimation presented in the BMS model are Coulomb counting, unscented Kalman filter (UKF), and extended Kalman filter (EKF). Each method has its merits and limitations and is used to estimate the SOC based on different principles and data.
How does the state machine in the BMS algorithm define the main operating states?
-The state machine in the BMS algorithm uses a state flow diagram to define the main operating states, which include standby, driving, charging, and fault states. It uses components representing states that are active or inactive depending on conditions, with code executing during entry, during, or exit from the state.
What is the importance of accurate SOC estimation in a battery management system?
-Accurate SOC estimation is crucial as it determines how much longer a vehicle can be driven before needing to recharge. It is more challenging than traditional fuel gauge design because SOC is not directly measurable; instead, other measurements are related to SOC, which requires sophisticated algorithms to estimate correctly.
How does the BMS model handle temperature differences among cells to prevent uneven degradation?
-The BMS model addresses temperature differences by showing the significant discrepancy among the hottest and coldest cells due to layout symmetry in thermal behavior. It highlights the need for active thermal management to keep thermal differences within a few degrees Celsius to prevent faster degradation of hotter cells.
What are the capabilities and limitations of Coulomb counting for SOC estimation?
-Coulomb counting is simple and has a very low computational cost, making it beneficial for SOC estimation. However, its limitations include the accumulation of current sensor error and the inability to recover from a wrong initial condition due to the lack of feedback from voltage measurements.
Why is it necessary to activate passive balancing in the BMS model?
-Passive balancing is necessary to keep individual battery cells at roughly the same state of charge. Without it, the cell with the highest SOC would limit the amount of charge that can be put into the pack, leading to underutilization of the system and reduced performance.
Outlines
π Introduction to BMS Model in Simulink
The first paragraph introduces the Battery Management System (BMS) model in Simulink, which is used for desktop simulations to evaluate the system's response to various usage cycles and environmental conditions. It highlights the ability to test scenarios like temperature, voltage, or current outside recommended limits without damaging a real battery. The script discusses a specific example involving an electric vehicle powertrain with a 75% charged battery at 15 degrees Celsius, and the subsequent driving, charging, and resting stages. It emphasizes the model's utility in testing different conditions, such as varying temperatures and states of charge, and its components including the BMS ECU, monitoring and control algorithms, and the representation of the battery pack and its circuitry. Two versions of the battery pack are mentioned: a smaller one with six cells and a larger one with 16 modules, each containing six cells in series. The paragraph also touches on the thermal layout and the importance of modeling each cell to represent real-life lithium-ion cells, including their chemistry and equivalent circuit parameters.
π¦ BMS Algorithm and Battery Pack Protection
The second paragraph delves into the BMS algorithm, which is responsible for monitoring, protecting, and reporting measurements from the battery pack. It explains how the system uses cell voltages and temperatures to calculate maximum allowable charge and discharge current levels, preventing physical damage to the cells at high or low temperatures. The paragraph outlines the state machine within the BMS that defines the main operating states, including standby, driving, charging, and fault states. It also discusses the charging sequence, emphasizing the importance of pre-connecting the battery to the charger via a resistor to prevent high current inrush. Furthermore, the paragraph explores different methods for State of Charge (SOC) estimation, including Coulomb counting and the Unscented and Extended Kalman filters, and their respective advantages and limitations.
π§ Balancing and Thermal Management
The third paragraph focuses on the importance of balancing individual battery cells to maintain similar states of charge, which prevents underutilization of the battery pack. It describes the state logic that calculates voltage differences between cells and activates passive balancing to reduce the SOC of higher cells. The paragraph also discusses the simulation results, showing how cell voltages converge due to the balancing procedure and how charging currents are managed to prevent voltage thresholds from being exceeded. The temperature traces highlight the thermal discrepancy among cells due to the module layout, emphasizing the need for active thermal management to maintain cell condition uniformity. Lastly, the paragraph presents SOC estimation results using different methods, demonstrating the recovery from initial errors in the estimation algorithms.
π Simulation Results and Conclusion
The fourth and final paragraph summarizes the simulation results, showcasing the convergence of cell voltages and the effectiveness of the balancing procedure. It also discusses the BMS state and balanced command signals, providing insights into the system's operation. The paragraph concludes by highlighting the use of Simulink, Stateflow, and Control System toolboxes for designing the BMS through modeling and simulation, and then hands back the discussion to Chirag.
Mindmap
Keywords
π‘BMS (Battery Management System)
π‘Simulink
π‘State of Charge (SOC)
π‘Electric Vehicle (EV)
π‘Temperature, Voltage, and Current Limits
π‘Aging Dependencies
π‘Passive Balancing Circuitry
π‘Charger and Inverter Contactor Circuitry
π‘Equivalent Circuit
π‘State Machine
π‘Coulomb Counting
Highlights
The BMS model in Simulink can simulate desktop scenarios to evaluate the system's response to potentially unsafe conditions like temperature, voltage, or current outside recommended limits.
The model is used to test various situations without risking damage to the real battery, aiding vehicle designers in assessing diverse usage cycles and environmental conditions.
The battery system can be part of an electric vehicle powertrain, with the model simulating different states such as driving, charging, and resting.
The model includes two versions of the battery pack: a small one with six cells and a larger one with 16 modules, each containing six cells in series.
Each unit cell within the battery pack is representative of a real-life lithium-ion cell, with an equivalent circuit that includes temperature, SOC, and aging dependencies.
The BMS algorithm includes monitoring and control algorithms to manage the battery pack and associated circuitry and peripherals.
Passive balancing circuitry is used to maintain the battery cell modules' balance, allowing better utilization of the total storage capacity.
The charger and inverter contactor circuitry are modeled to prevent high current from potentially damaging the battery pack upon connection.
The BMS algorithm uses individual cell voltages and temperatures to calculate maximum allowable charge and discharge current levels.
Current thresholds are determined based on temperature to avoid physical damage to the cell materials at high temperatures during charge and discharge.
The state machine within the BMS defines the main operating states, including standby, driving, charging, and fault.
Accurate estimation of the battery's state of charge (SOC) is crucial for determining how long the vehicle can be driven before needing to recharge.
Three different methods for SOC estimation are presented: Coulomb counting, unscented Kalman filter (UKF), and extended Kalman filter (EKF).
Coulomb counting is simple and low-cost but lacks the ability to recover from a wrong initial condition due to the absence of voltage information.
Kalman filter algorithms, UKF and EKF, recover from initial errors and rely on a model of the unit cell to predict terminal voltage for SOC estimation.
Active thermal management is necessary to keep thermal differences within a few degrees Celsius, preventing uneven cell degradation.
The simulation results show how individual cell voltages converge towards each other as a result of the balancing procedure.
The BMS state and balanced command signals are monitored to ensure the battery pack remains within recommended electrical and thermal limits.
The use of Simulink, Stateflow, and Control System toolboxes allows for comprehensive design and simulation of the battery management system.
Transcripts
in the next few minutes I'll explain the
main components of the BMS modeled in
Simulink we can use this model for
desktop simulations where we can for
example reproduce diverse usage cycles
and environmental conditions to evaluate
the system's response to a potentially
unsafe condition for example a
temperature voltage or current outside
the recommended limits let's say this
battery system is part of an electric
vehicle powertrain say the battery is
75% charged and the outside temperature
is 15 degrees Celsius in these
conditions we start driving for a while
and stop and charge the battery
finally the battery is at rest and the
balancing cycle kicks in how do we know
that during these three typical usage
stages the battery pack remains within
recommended electrical and thermal
limits what if the temperature is 40
degrees Celsius instead of 15 how about
if the initial state of charge is 30%
well an aggressive drive cycle will
cause an under voltage situation the
model allows the vehicle designer to
test all these situations in simulation
without risking causing damage to the
real battery this is the BMS model in
simulink the battery and its management
system are inside this model reference
on the top left we define a different
driving scenarios that determine the
test sequence provided by the subsystem
on the bottom left the green lights at
the top right indicates whether there
has been a fault
for example any cell has reached an over
temperature condition the system itself
has a model reference representing the
BMS ECU with its various monitoring and
control algorithms connected to a block
with a representation of the battery
pack and associated circuitry and
peripherals this model contains two
versions of the battery pack a small one
with just six cells connected in series
and a larger one with 16 modules
each module containing the six cell
series string in all cases we model just
one parallel string let's start with a
description of the battery pack and
spare Ferrell's the variant subsystem on
the Left contains the two versions of
the battery pack mentioned before the
one with the six cells and the large one
with 96 cells let's take a look at the
small one first this battery packs model
in Sims Cape where the component color
tells us its physical domain for example
blue indicates electrical an orange
indicates a thermal we can see that the
six cells are connected in series and
can exchange heat with one another the
thermal layout is asymmetrical with cell
number six at the bottom insulated on
one side so no heat can dissipate in
that direction and cell number one at
the top exposed to the outside
atmosphere and therefore getting rid of
the heat by convection this asymmetry
will be responsible for a significant
temperature difference among the six
cells so what makes each unit cell
representative of a real-life lithium
and chemistry say nickel manganese
cobalt or NMC well inside each cell
there's an equivalent circuit whose
topology and parameters should give me a
response equivalent to the one I would
observe experimentally the equivalent
circuit components should also include
temperature SOC and possibly aging
dependencies if you're interested in
cell characterization a detailed account
on how to perform this parameter
estimation on battery cells is available
on our website searching for battery
modeling next to the battery pack
there's a subsystem with a passive
balancing circuitry commanded by the
balancing logic from the BMS algorithm
these switches selectively close
their corresponding cell needs a partial
discharge to lower its associ
maintaining the battery cell modules
imbalance allows me to better utilize
its total storage capacity as we will
see in a few minutes another important
element of the plant model is the set of
charger and inverter contactor circuitry
prior to connecting a battery back to a
charger it is important to pre connect
them via a resistor to prevent an
excessively high current from rushing
into the pack and potentially damage it
this pre connection needs a special
sequence that we will show and we
describe the BMS algorithm finally the
last piece of the battery plan that we
model here are the charger and the load
both simply represented here by current
sources commanded to follow the charging
and driving profiles from the source
block at the model top level let's now
focus on the BMS algorithm this part of
the battery management system monitors
protects limits and reports measurements
from the battery pack the subsystem left
uses individual cell voltages and
temperatures to calculate maximum
allowable charge and discharge current
levels when a cell is at low SOC its
voltage is low and it is important to
prevent the cell from delivering a large
amount of current since this would cause
an excessively large voltage drop that
could potentially be below the cutoff
voltage
specified by the cell manufacturer
comparing the minimum cell voltage in
the module against this lower threshold
and dividing it by the maximum internal
resistance value calculated for this
cell we can compute a voltage based
current threshold
we also know that it is important to
limit current deliver your intake when
temperature is too high or too low
using a lookup table with a rising or
falling s-shaped profile we can specify
a current threshold based on temperature
and modulate the allowable current
delivery this is very important to avoid
physical damage to the cell materials at
high temperatures both during charge and
discharge and at low temperatures during
charge since doing so below freezing
temperature is now allowed these two
thresholds are then compared against one
another and the lowest becomes the
current limit
the subsystem labeled state machine
defines the main operating state of the
BMS it is represented here using state
flow as Simulink add-on toolbox meant
for designing state logic in state law
we used components representing states
that are active or inactive depending on
the conditions and the text were writing
inside a state is code that executes
saan entry curing or an exit from the
state the state machine has four
parallel States parallel here meaning
that they can be active at the same time
the first one defines the variable BMS
state which indicates standby driving
charging and fault
charging comprises constant currents and
constant voltage stages the second state
switch is the fault state on incase of a
current voltage or temperature value
reaches an unsafe level the third and
fourth states define the contactor on
and off switching sequence for the
charger and inverter this is needed to
avoid an excessively large current in
rush at the beginning of the charging
stage knowing how much longer we will be
able to drive our car before we need to
stop for a recharge depends on accurate
estimation of the battery SOC this is of
great importance and it is much more
challenging than in the case of
conventional vehicle fuel gauge design
where the measurement is direct in
battery systems we do not measure state
of charge which is not directly
measurable we actually measure something
else and hopefully relate that to the
SOC the third subsystem contains three
different methods for state of charge
estimation in practice the BMS developer
would only use one of them but here we
present all three
illustrate their individual merits and
limitations
the first method known as Coulomb
counting consists of integrating the
current that enters and leaves the cell
to keep track of the state of charge
over time a benefit of this method is
its simplicity and very low
computational cost its drawbacks include
the accumulation of current sensor error
and its inability to recover from a
wrong initial condition because of the
lack of feedback from voltage
measurements the second and third SOC
emission methods implemented here are
the unscented and extended Kalman
filters both are variations of nonlinear
common filters and they rely on a model
of the unit cell to predict a terminal
voltage resulting from a current
stimulus estimating the internal cell
states the SOC among them by comparing
this prediction against measurement of
the terminal voltage the choice between
EKF and UKF is typically made based on
the severity of the systems
non-linearity in this case the only
non-linearity presence is given by the
OSI vsoc relationship and it is a mild
one so it is expected that the EKF
should give adequate results the common
filter algorithm has two parts the state
update and the measurement update the
state update predicts the current state
based on the previous state value and
the input and the measurement update
corrects this prediction using newly
acquired data the cell model we use is
implemented here as a MATLAB script and
corresponds to the equivalent circuit we
use to simulate the battery pack the
next task to consider is balancing it is
important to keep individual battery
cells roughly at the same state of
charge
otherwise the cell with high
so sea level will limit the amount of
charge that we can put into the pack
rendering the system underutilized this
state logic calculates the voltage
difference between the highest and
lowest cell voltages and based on
whether this difference exceeds a design
value activate pest balancing balance
commands is a boolean vector that
indicates which bleach resistor to
activate so that the cell SOC is slowly
reduced doing this with all cells but
the one whose SOC is the lowest
eventually makes all associates converge
within a prescribed tolerance let's now
take a second look at the simulation
results in this driving charging
balancing sequence example we first
observed individual cell voltages
changing as a result of current flowing
in and out at the beginning of the
simulation they are slightly different
because we initialize the model with a
slight SOC imbalance towards the end of
the simulation the values converge
towards one another as a result of the
balancing procedure and how about
currents look at the charging period
during the constant current stage the
current is generated because the maximum
module cell voltage is high enough
compared to a prescribed four point four
volt limit that an excessively high
current could try the voltage beyond the
threshold significantly limiting the
life of the battery since we calculate
the limits based on the maximum
resistance value within the battery cell
locum table we're in conservative a less
conservative current limiting
calculation could use the actual battery
cell resistance at the estimated SOC and
temperature since this information is
available at all operating conditions
the temperature traces show a
significant discrepancy among the
hottest and coldest sell the reason is
mainly be a symmetry in the module
layout in terms of thermal behavior cell
number six gets significantly hotter
than seller one because it is thermally
insulated on one side even when the
maximum temperature reached during the
simulation is not of a medium concern in
terms of safety the temperature
difference exhibited here will
eventually cause a much faster
degradation of cell six
compared to cell one leading to an
undesirable unevenness in cell condition
hence the need for active thermal
management to keep thermal differences
within a few degrees Celsius the graph
at the top right shows three SOC
estimation traces of the same battery
cell each performed with a different
method yellow corresponds to cool of
counting blue corresponds to UKF and
orange to EKF the initial SOC in the
simulation is seventy-five percent but
the SOC estimators were initialized to
eighty percent to assess their
capability to recover it is apparent
that Coulomb counting never does because
it has no way to realize it is wrong due
to the absence of voltage information
both Kalman filter algorithms on the
other hands recover from the initial
error within the first hour of simulated
time with the EKF slightly outperforming
the UK earth and finally the other two
scopes indicates that BMS state and each
of the six balanced command signals
respectively in summary we've utilized
Simulink state low sim scape and control
system toolboxes to design a battery
management system using modeling and
simulation now I'll turn it over back to
Chirag
Browse More Related Video
![](https://i.ytimg.com/vi/B4QJ_3iGSAY/hq720.jpg?v=65a3b9e3)
How To Make 220V Battery at home | 12v battery sy darict 220v battery bnay
![](https://i.ytimg.com/vi/gwSbQBo55QI/hq720.jpg)
Cells, EMF, terminal voltage & internal resistance | Electric current | Physics | Khan Academy
![](https://i.ytimg.com/vi/c38AAEPFQFU/hq720.jpg)
Introduction to Modern Broiler Production (all subjects combined)
![](https://i.ytimg.com/vi/TgcrUIWhfhk/hq720.jpg?v=653ff99e)
Your RV Battery Questions Answered
![](https://i.ytimg.com/vi/hN8dL55rP5I/hq720.jpg)
Understanding Sensor Fusion and Tracking, Part 3: Fusing a GPS and IMU to Estimate Pose
![](https://i.ytimg.com/vi/uSmgQ4fy23o/hq720.jpg)
NO Opportunities after BBA? π’β οΈ | The Only BBA Analysis video you Need To Watch! π₯
5.0 / 5 (0 votes)