  Lithium-ion battery packs are usually composed of hundreds of cells arranged
in series and parallel connections. The proper functioning of these complex
devices requires suitable Battery Management Systems (BMSs). Advanced BMSs rely
on mathematical models to assure safety and high performance. While many
approaches have been proposed for the management of single cells, the control
of multiple cells has been less investigated and usually relies on simplified
models such as equivalent circuit models. This paper addresses the management
of a battery pack in which each cell is explicitly modelled as the Single
Particle Model with electrolyte and thermal dynamics. A nonlinear Model
Predictive Control (MPC) is presented for optimally charging the battery pack
while taking voltage and temperature limits on each cell into account. Since
the computational cost of nonlinear MPC grows significantly with the complexity
of the underlying model, a sensitivity-based MPC (sMPC) is proposed, in which
the model adopted is obtained by linearizing the dynamics along a nominal
trajectory that is updated over time. The resulting sMPC optimizations are
quadratic programs which can be solved in real-time even for large battery
packs (e.g. fully electric motorbike with 156 cells) while achieving the same
performance of the nonlinear MPC.
