Balancing of Battery Networks via Constrained Optimal Control

Similar documents
Connectivity of addable graph classes

Connectivity of addable graph classes

Fast Linear Iterations for Distributed Averaging 1

Distributed Receding Horizon Control of Cost Coupled Systems

Learning Model Predictive Control for Iterative Tasks: A Computationally Efficient Approach for Linear System

Decentralized Stabilization of Heterogeneous Linear Multi-Agent Systems

Decentralized Robust Control Invariance for a Network of Integrators

Distributed Averaging with Flow Constraints

Markov Decision Processes

Hybrid Systems Course Lyapunov stability

Convex Optimization of Graph Laplacian Eigenvalues

Disturbance Attenuation Properties for Discrete-Time Uncertain Switched Linear Systems

Preliminaries and Complexity Theory

ECE7850 Lecture 8. Nonlinear Model Predictive Control: Theoretical Aspects

EE C128 / ME C134 Feedback Control Systems


Boundary Behavior of Excess Demand Functions without the Strong Monotonicity Assumption

Nonlinear Observer Designs for State-of-Charge Estimation of Lithium-ion Batteries

CS 6820 Fall 2014 Lectures, October 3-20, 2014

MULTI-AGENT TRACKING OF A HIGH-DIMENSIONAL ACTIVE LEADER WITH SWITCHING TOPOLOGY

Dynamic thermal prediction of Li-Ion batteries using physics based modeling and neural network techniques. February 24, 2010

Near-Potential Games: Geometry and Dynamics

Subject: Optimal Control Assignment-1 (Related to Lecture notes 1-10)

Average-Consensus of Multi-Agent Systems with Direct Topology Based on Event-Triggered Control

Optimality, Duality, Complementarity for Constrained Optimization

Consensus-Based Distributed Optimization with Malicious Nodes

Constrained Optimization and Lagrangian Duality

Symmetric Constrained Optimal Control: Theory, Algorithms, and Applications. Claus Robert Danielson

Nonlinear Control Design for Linear Differential Inclusions via Convex Hull Quadratic Lyapunov Functions

Gramians based model reduction for hybrid switched systems

Model reduction for linear systems by balancing

Hybrid Fault diagnosis capability analysis of Hypercubes under the PMC model and MM model

The Multi-Agent Rendezvous Problem - The Asynchronous Case

Discrete Geometry. Problem 1. Austin Mohr. April 26, 2012

STATE ESTIMATION IN COORDINATED CONTROL WITH A NON-STANDARD INFORMATION ARCHITECTURE. Jun Yan, Keunmo Kang, and Robert Bitmead

A Hierarchy of Suboptimal Policies for the Multi-period, Multi-echelon, Robust Inventory Problem

The spectra of super line multigraphs

A State-Space Approach to Control of Interconnected Systems

Convex Optimization Boyd & Vandenberghe. 5. Duality

A Stable Block Model Predictive Control with Variable Implementation Horizon

Prashant Mhaskar, Nael H. El-Farra & Panagiotis D. Christofides. Department of Chemical Engineering University of California, Los Angeles

Using DERIVE to Interpret an Algorithmic Method for Finding Hamiltonian Circuits (and Rooted Paths) in Network Graphs

On the Inherent Robustness of Suboptimal Model Predictive Control

Facets for Node-Capacitated Multicut Polytopes from Path-Block Cycles with Two Common Nodes

Research on Consistency Problem of Network Multi-agent Car System with State Predictor

Physical Metaphors for Graphs

Chapter 3: Discrete Optimization Integer Programming

5. Duality. Lagrangian

Near-Potential Games: Geometry and Dynamics

ON SEPARATION PRINCIPLE FOR THE DISTRIBUTED ESTIMATION AND CONTROL OF FORMATION FLYING SPACECRAFT

Stability and Control of dc Micro-grids

FRACTIONAL PACKING OF T-JOINS. 1. Introduction

Network Flows that Solve Linear Equations

Hybrid Systems - Lecture n. 3 Lyapunov stability

Automatic Control 2. Nonlinear systems. Prof. Alberto Bemporad. University of Trento. Academic year

On robustness of suboptimal min-max model predictive control *

Routing. Topics: 6.976/ESD.937 1

Distributed Computation of Minimum Time Consensus for Multi-Agent Systems

Hegselmann-Krause Dynamics: An Upper Bound on Termination Time

On the sufficiency of finite support duals in semi-infinite linear programming

Lecture 1: Entropy, convexity, and matrix scaling CSE 599S: Entropy optimality, Winter 2016 Instructor: James R. Lee Last updated: January 24, 2016

Robust Stabilizing Output Feedback Nonlinear Model Predictive Control by Using Passivity and Dissipativity

Theory in Model Predictive Control :" Constraint Satisfaction and Stability!

Balancing of Lossless and Passive Systems

Disturbance Attenuation in Classes of Uncertain Linear Hybrid Systems

Dual Decomposition.

BBM402-Lecture 20: LP Duality

Feedback stabilisation with positive control of dissipative compartmental systems

Chapter 3: Discrete Optimization Integer Programming

Assignment 1: From the Definition of Convexity to Helley Theorem

E209A: Analysis and Control of Nonlinear Systems Problem Set 6 Solutions

Suboptimality of minmax MPC. Seungho Lee. ẋ(t) = f(x(t), u(t)), x(0) = x 0, t 0 (1)

Shortest paths with negative lengths

Modeling and Stability Analysis of a Communication Network System

A Questionable Distance-Regular Graph

A Price-Based Approach for Controlling Networked Distributed Energy Resources

Applications of Controlled Invariance to the l 1 Optimal Control Problem

On Dwell Time Minimization for Switched Delay Systems: Free-Weighting Matrices Method

Some Properties of the Augmented Lagrangian in Cone Constrained Optimization

On the number of cycles in a graph with restricted cycle lengths

Consensus Tracking for Multi-Agent Systems with Nonlinear Dynamics under Fixed Communication Topologies

Architectures and Algorithms for Distributed Generation Control of Inertia-Less AC Microgrids

Production Capacity Modeling of Alternative, Nonidentical, Flexible Machines

Representing Independence Models with Elementary Triplets

Consensus Problems on Small World Graphs: A Structural Study

LIMITING PROBABILITY TRANSITION MATRIX OF A CONDENSED FIBONACCI TREE

TOPOLOGY FOR GLOBAL AVERAGE CONSENSUS. Soummya Kar and José M. F. Moura

The norms can also be characterized in terms of Riccati inequalities.

Control of Sampled Switched Systems using Invariance Analysis

Reaching a Consensus in a Dynamically Changing Environment A Graphical Approach

Optimal Network Topology Design in Multi-Agent Systems for Efficient Average Consensus

Proceedings of the 34th Annual Conference on Information Sciences and Systems (CISS 2000), Princeton, New Jersey, March, 2000

Active Passive Networked Multiagent Systems

Adaptive Parameter Identification and State-of-Charge Estimation of Lithium- Ion Batteries

RANDOM SIMULATIONS OF BRAESS S PARADOX

PHYS 212 Final Exam (Old Material) Solutions - Practice Test

Completions of P-Matrix Patterns

Distributed and Real-time Predictive Control

A Graph-Theoretic Characterization of Structural Controllability for Multi-Agent System with Switching Topology

10725/36725 Optimization Homework 2 Solutions

Transcription:

Balancing of Battery Networks via Constrained Optimal Control Claus Danielson, Francesco Borrelli, Douglas Oliver, Dyche Anderson, Ming Kuang, and Tony Phillips Abstract This paper defines two control problems: the capacity maximization and the battery balancing problems. In the first part, we compare the two problems by analyzing properties of their solutions. In the second part, two algorithms are presented for solving the capacity maximization and battery balancing problems respectively. These algorithms are based on constrained optimization techniques. We prove asymptotic convergence of both algorithms and present a numerical example. I. INTRODUCTION The maturation of electrical and hybrid vehicles is strongly dependent on advancements in battery technology. One method to increase the reliability and effective capacity of lithium based battery packs is through intelligent cellbalancing. Cell-balancing is the process of balancing the state of charge of the cells in a battery pack. The state of charge of battery cells naturally tends to drift due to manufacturing differences, environmental factors, and aging. Over the course of several charge/discharge cycles the state of charge of the battery cells drifts farther and farther apart. In older battery technologies, such as lead-acid, the imbalance is corrected using a controlled over-charge [5], [7]. This process can cause permanent damage to lithium based batteries. Instead lithium-based batteries employ a system called a battery balancer to balance the cells. There are two classes of battery balancer: passive and active. In passive balancing excess charge is drawn from the cells with the highest state of charge and dissipated through a resistor. In active balancing charge is exchanged between battery cells over a network. Information about battery balancing hardware can be found in [10], [5]. In this paper we focus on active balancing. Cell-balancing can increase the effective capacity of the battery pack and improve its durability. The active materials in lithium-based batteries can be damaged by overcharging or overdischarging [8]. Since all the cells are charged simultaneously this means charging must stop when one of the cells has reached the maximum state of charge. This leaves the other battery cells partially uncharged, reducing the effective capacity of the entire battery pack. Likewise, the the battery system can only be discharged until one of the cells is depleted. This leaves the remaining charge in the other cells inaccessible, reducing the effective capacity. We are interested in studying the bulk behavior of large networks of battery cells. Therefore we model the battery Claus Danielson and Francesco Borrelli are with the University of California, Berkeley, CA 94720-1740, USA. Douglas Oliver, Dyche Anderson, Ming Kuang, and Tony Phillips are with Ford Research and Advanced Engineering, Dearborn, MI 48124-5029, USA. cells using simple discrete-time integrator dynamics. Higher fidelity mathematical battery models can be found in [17], [15]. We consider an arbitrary network topology rather than the typical series topology [8], [9], [14]. Throughout this paper we assume that the battery state of charge is known. Details on estimating the state of charge for battery cells can be found in [12], [13], [16]. In this paper we formally define two problems: the battery balancing problem and the capacity maximization problem. We compare the two problems by analyzing properties of their solutions. We introduce two control algorithms to solve the capacity maximization and battery balancing problems respectively. We prove asymptotic convergence of both algorithms and present a numerical example. II. SYSTEM In this section we describe the battery system. We describe the system dynamics, constraints, and control objectives. A. Dynamics We consider a collection of charge storage elements which exchange charge through a network. The storage elements are capacitors and battery cells. The state-of-chargex i [0,1] of a storage element is defined as the amount of stored charge normalized by the total charge capacity Q i of the element. The i th storage element is modeled as a discrete-time integrator Q i x i (t+1) = Q i x i (t)+u net i (t) for i = 1...n (1) where Q i x i is the total stored charge in the i th storage element and u net i is the total charge added or removed from the storage element. Equation (1) is the mass-balance of stored charge in the i th storage element. B 1,...,n} is the set of battery cell indices and C = 1,...,n}\B is the set of capacitor indices with B = n b and C = n c. The storage elements are connected in a network G = (V,E) where the set of nodes V = B C ( V = n) are the storage elements and the set of edges E V V ( E = m) are physical links that allow the storage elements to exchange charge. The control variable is the charge transfers q ij (t) between adjacent storage elements (i, j) E q ij (t) = i ij (t)t s (2) where i ij (t) is the current applied between elements i and j for the duration of the sample time T s. Thus the model (1) of the i th element becomes x i (t+1) = x i (t)+ 1 Q i j N i q ij (t) (3)

where N i = j (i,j) E} is the set of storage elements neighboring the i th storage element. We assign a label k to each edge (i,j) E. The bijection e(k) maps each label k to an unorder pair (i,j) E. We also assign an orientation σ k to each edge e(k) = (i,j) E. The orientation specifies whether i j or j i is the positive direction for charge exchange. For edge e(k) = (i,j) E with orientationi j we haveσ k (i) = 1 andσ k (j) = +1. The charge transfers are collected in a vector u R m where u k (t) = q ij (t) for e(k) = (i,j). With this notation the dynamics of the i th node are x i (t+1) = x i (t)+q 1 i B i u(t) (4) where the vector Bi T R m is the i th row of the incidence matrix B associated to the graph G with entries σ k (i) if e(k) = (i,j) for some j V B ik = (5) 0 otherwise. The collective dynamics for systems are x(t+1) = x(t)+q 1 Bu(t) (6) where x = [x 1... x n ] T R n collects the state of charge of the storage elements and Q = diag([q 1... Q n ]) R n n is the matrix with the storage capacities of the storage elements on the diagonal. B. Constraints The storage element state of charge must satisfy the constraint x(t) X for all t where } X = x R n x b x i (t) x b for i B. (7) x c x i (t) x c for i C Here x b and x b are the lower and upper bounds on the battery cell states respectively, and x c and x c are the lower and upper bounds on the capacitor states respectively. These bounds account for uncertainty due to state estimation errors and unmodeled dynamics. In battery cells overcharging and overdischarging can potentially damage the cells. Typically [x b,x b ] [0,1]. The links that connect the storage elements have limited current capacity i max k T s u k (t) i max k T s for e(k) E (8) wherei max k is the maximum current allowed on thek th edge. This constraint is symmetric about zero since the links are designed to carry charge in both directions between adjacent storage elements. Capacitors impose an additional constraint on the charge transfers u. The capacitors cannot be both charged and discharge simultaneously. For this reason we introduce a charging time T c,i for each capacitor. The i th capacitor can draw charge from its neighbors for a total time of T c,i [0,T s ]. It can transfer charge to its neighbors for a total time of T s T c,i. Therefore the charge transfer to the i th capacitor is constrained by i max k (T s T c,i ) B ik u k (t) i max k T c,i (9) for each edge e(k) E and each capacitor i C. B ik u k (t) is the amount of charge transferred to the i th capacitor, i max k T c,i is the maximum amount of charge that can enter the i th capacitor, and i max k (T s T c,i ) is the maximum amount of charge that can leave the i th capacitor. The vector T c R nc collects the charging times for each capacitor. During active balancing energy is lost due to inefficiencies in the links connecting the storage elements. The power lost during active balancing is upper-bounded by W act (t) e(k) E (1 η k ) maxv i(t),v j (t)} T s u k (t) (10) where η k is the efficiency of the k th link and V i and V j are the voltages of the storage elements on each end of the k th link. The power dissipated during balancing is converted to heat that can degrade the performance or cause permanent damage to lithium-based battery cells. Therefore the amount of power that can be dissipated during balancing is constrained by W act (t) W max (11) where W max is the maximum allowable power dissipation. The charge time and input constraints are collected by the sets T = [0,T s ] nc (12a) U(T c ) = u R m u satisfies (8-9) and (11)}. (12b) Thus the constraints on the charging time and input can be concisely written as T c (t) T and u(t) U(T c ), respectively. C. Control Objectives The goal of the controller is to maximize the effective capacity of the battery network. We formalize the concept of effective capacity in this section. Each battery celli B containsq i (x i x b ) usable charge. Since all the cells discharge at the same rate and discharge must stop when one of the battery cells is depleted, the amount of charge that can be extracted from each battery cell i B is min Q i(x i x b )}. (13) Likewise each battery cell i B can accommodate Q i (x b x i ) additional charge. However the battery cells are only charged until one of the cells is filled. Therefore the additional charge that can be stored in each battery cell i B is min Q i(x b x i )}. (14) We define the effective capacity of the battery network as q = min Q i(x i x b )}+min Q i(x b x i )}. (15) In this paper the control objective is to maximize the effective capacity. In addition, since charge cannot be accessed from the capacitors we also want to minimize the amount of

charge stored in the capacitors. Therefore we have the cost function J(x) = min Q i(x i x b )}+min Q i(x b x i )} Q i x i. (16) III. PROBLEM STATEMENTS In this section we define two control problems; capacity maximization and battery balancing. A. Reachable Sets We begin by defining the N-step and -step sets of reachable states for system (6) [1]. Definition 1 (N-step Reachable Set): For a given initial condition x(0) X, the N-step reachable set of the system (6) subject to the constraints (12a) and (12b) is defined recursively R i+1 := x + R n x Ri, u U(T c ), and T c T } such that x + = x+q 1 Bu (17) for i = 1...N 1 and R 0 = x(0). Definition 2 ( -step Reachable Set): For a given initial condition x(0) X, the -step reachable set of the system (6) subject to the constraints (12a) and (12b) is defined as R := lim R N (18) N Note that R = R (x(0)) depends on the initial condition x(0). We drop this dependence for notational simplicity. Also we refer to the set of -step reachable states as the reachable set for system (6). The set of reachable states for system (6) subject to constraints (12a) and (12b) is characterized by Proposition 1. Proposition 1: Let G = (V,E) be connected. The -step reachable set for the system (6) subject to the constraints (12a) and (12b) is R = x X Q i x i = } Q i x i (0). (19) Proof: First we prove the reachable states must satisfy the conservation law ix i = Q Q ix i(0). (20) Since B is an incidence matrix, it satisfies 1 T B = 0 where 1 R n is the vector of ones [6], [3]. From the dynamics (6) we have 1 T Qx(t+1) = 1 T Qx(t)+1 T Bu (21) = 1 T Qx(t). (22) Therefore the total charge1 T Qx = Q ix i is conserved. Next we prove that a point x X which satisfies (20) is reachable. For x to be reachable there must exist a sequence of charging times T c (k)} k=0 T and control inputs u(k)} k=0 U(T c) such that Qx = Qx(0)+B u(k). (23) k=0 where (23) is obtained recursively from the dynamics (6) as t. Since x satisfies (20) it follows that Qx Qx(0) is orthogonal to 1. This follows from equation (21) which states that the total charge 1 T Qx = Q ix i does not change. Furthermore since the graph is connected 1 is the only null vector of B. Thus Qx Qx(0) is in the columnspace of B. In order to show x is reachable it suffices to show that the column multipliers k=0 u j(k) can assume any value in R. The set U(T c ) is full dimensional. For any T c (0,T s ), U(T c ) contains the origin in its interior and is non-shrinking. Therefore the control series k=0 u j(k) can assume any value in R. It follows that (19) is the set of -step reachable states. B. Capacity Maximization The objective of the capacity maximization problem is to maximize (16). We define the subset of reachable states that maximize (16) as X = argmax x R J(x). (24) We formally define the capacity maximization problem as follows. Problem 1 (Capacity Maximization): At each time instance t N select feasible charging times T c (t) T and input u(t) U(T c ) such that for x(t) X the future state x(t +1) X is feasible and the cost (16) is maximized at steady-state i.e. x(t) x X as t. In section IV we propose an algorithm that solves this problem. C. Battery Balancing A common approach to solving Problem 1 is by solving the battery balancing problem. The objective of the battery balancing problem is to drive the battery cells to a common state of charge x i = x j for all i,j B. The capacitors are driven to the minimum state of charge x i = x c for i C. We define the set of reachable balanced states as } X = x R xi = x j i,j B and x i = x c i C. (25) Note that X = X(x(0)) depends on the initial conditions x(0). The set of initial conditions x(0) for which the set X is non-empty is characterized by the follow proposition. Proposition 2: The set X is non-empty for all initial conditions x(0) in the set X 0 = x X Q i x i Q i x b + } Q i x c. (26) Proof: For X to be non-empty there must exist at least one point x satisfying the conditions 1) Balance: x i = x j i,j B and x i = x c i C 2) Conservation of charge: Q i x i = Q ix i (0) 3) Feasibility: x i [x b,x b ] for all i B and x i [x c,x c ] for all i C.

Let us parameterize all x that satisfy condition 1 by α i B x i = (27) x c i C where α is the common state of the battery cells. In order to satisfy condition 2, α must satisfy Q iα+ Q ix c = Q ix i(0). (28) In order to satisfy condition 3 we need α [x b,x b ]. Since x(0) is feasible (x i (0) x b i B and x i (0) x c i C) we have Q iα+ Q ix c = Q ix i(0) (29) Q ix b + Q ix c. (30) Subtracting Q ix c from each side and noting that α and x b are constant over i B we conclude that α x b. For α x b we need the following inequality to hold iα = Q Q ix i(0) Q ix c (31) Q ix b. (32) This is the condition in (26) for x i = x i (0). Proposition 2 states that X is non-empty when the initial amount of charge stored in the battery network is small enough that the battery cells can stored it with the capacitors at their minimum storage Q i x c for i C. If the battery network does not contain capacitors (C = ) then X is nonempty for any feasible initial condition x(0) X. We formally define the battery balancing problem as follows. Problem 2 (Battery Balancing): At each time instance t N select feasible charging times T c (t) T and input u(t) U(T c ) such that for x(t) X the future state x(t +1) X is feasible and the state converges to a point in the set of balanced states i.e. x(t) x X as t. In section IV we propose an algorithm that solves this problem. In the following Proposition we will show that the set of balanced states X is a subset of the capacity maximizing states X. Therefore an algorithms that solves Problem 2 can be used to solve Problem 1. We will show that the converse is not necessarily true through a numerical example in section V. Proposition 3: X X Proof: In the case X = the proof is trivial. Let us consider the case when X. Let x X. Then x X if x maximizes the cost (16) over R. The cost J(x) at x is J( x) = min Qi(α x b )}+minqi(x b α)} Q ix i = min Qi}(x b x b ) Q ix i (33) where x i = α is the common battery state. We will show that J( x) is an upper-bound on J(x) for all x X R. Using the identity max(a B) maxa minb the cost can be upper-bounded ( ) J(x) max min x X Qi(xi x b )}+minqi(x b x i)} min x X Q ix i. (34) Clearly the second term in (34) is minimized by x i = x c for all i C since the charge capacities are positive Q i > 0. Using the identity mina+minb min(a+b) the first term in (34) can be upper-bounded min Qi(xi x b )}+minqi(x b x i)} min Qi(xi x b )+Qi(x b x i)} (35) = min b x b )} (36) = min b x b ) (37) Thus the cost (16) is upper-bounded by J(x) min b x b ) Q ix c (38) = J( x) (39) for all x X. Since x X R X it follows that x maximizes J(x) over R. Therefore x X and thus X X. IV. MODEL PREDICTIVE CONTROL ALGORITHMS In this section we introduce two model predictive control algorithms to solve Problems 1 and 2. We uses a one-step horizon since this simplifies the problem. Longer horizons would require a model to predict the storage element voltages V(t). This would make the constraint (11) non-linear since the cell voltages depend on the state x(t). The stability proofs for the algorithms use the following theorem on set-valued Lyapunov functions. Theorem 1: Let W : R R be an upper semicontinuous set-valued Lyapunov function satisfying 1) x W(x) for all x R and W(x e ) = x e } for all x e X e 2) W(x(t+1)) W(x(t)) for all x(t) R 3) There exists a function µ : Im(W) R 0, bounded on bounded sets, such that ( ) ( ) µ W(x(t+1)) < µ W(x(t)) (40) for all x(t) R \X e. Then x(t) x e X e as t. Proof: See Theorem 4 in [11]. A. Capacity Maximization Algorithm We present the following algorithm for solving Problem 1. Algorithm 1: At each time instant t N the flow u(t) and charging timest c (t) are obtained by solving the optimization

problem maximize u,t c J(x(t+1)) ρ u(t) 2 2 (41a) subject to x(t+1) = x(t)+q 1 Bu(t) x(t+1) X u(t) U(T c ) T c (t) T. (41b) (41c) (41d) (41e) Here J(x) has been defined in (16) and is restated below J(x) = min Q i(x i x b )}+min Q i(x b x i )} Q i x i. (42) Before proving this algorithm solves the battery balancing problem we prove the following Lemma. Lemma 1: Let G = (V,E) be connected. Then u(t) = 0 if and only if x(t) X. Proof: Clearlyu(t) = 0 forx(t) X. We will provide that for x(t) X Algorithm 1 will produce a control input u(t) 0. This is done by showing there exists a perturbation of u(t) = 0 that strictly increases the cost (41a) for x(t) X. For notational simplicity let x = x(t), u = u(t), and x + = x(t+1). With abuse of notation we write J(x,u) = J(x + Q 1 Bu). Note that J(x,u) is a concave function of u. This follows from the facts that the minimum of a set of linear functions is concave (i.e. min ib Q i (x i x b )} is concave), the sum of concave function is concave, and composition of a concave function with a linear function is concave [4]. Next we show there exists a control input ũ such that x + = x+bũ = x X. (43) for allx R. Note that we do not require thatũis feasible, just that it exist. Existence follows from the fact thatx R and x X R are both reachable. Therefore the total amount of charge in the battery pack remains constant. Thus Qx Qx is orthogonal to 1 and therefore in the column space of B since G = (V,E) is connected. There exists a 1 > 0 such that the input 1 ũ is feasible. This follows from the fact that U(T c ) is full-dimensional and contains the origin in its interior for T c (0,T s ). There exists 2 > 0 such that 2[J(x,ũ) J(x,0)] > ρ 2 2 ũ 2 2. (44) for all x R \X. Let ǫ = min 1, 2,1}. Then ǫũ is feasible and by the the concavity of J(x,u) it satisfies J(x,ǫũ) J(x,0) ǫ[j(x,ũ) J(x,0)] > ρǫ 2 ũ 2 2. (45) This is a direct result of the definition of concavity J(x,ǫũ) ǫj(x,ũ)+(1 ǫ)j(x,0). Rearranging the terms in (45) we obtain J(x,ǫũ) ρ ǫũ 2 2 > J(x,0). (46) The left hand side of this expression is the cost (41a) of ǫũ. This is a lower bound on the cost of the optimal controller u produced by Algorithm 1. Therefore Algorithm 1 will not produce the sub-optimal control input u = 0 for x X. We now prove that Algorithm 1 solves Problem 1. Proposition 4: Let G = (V,E) be connected. Then Algorithm 1 solves Problem 1. Proof: In order to solve Problem 1, Algorithm 1 must maintain feasibility x(t+1) X for x(t) X and guarantee asymptotic convergence x(t) x X as t. Persistent feasibility is guaranteed by the constraint (41c). A solution to equation (41) always exists since u = 0 is feasible. We now prove asymptotic convergence x(t) x X as t using Theorem 1. Here X = X e is the set of equilibrium states. Consider the candidate set-valued Lyapunov function } W(x) = x+bv R J(x+Bv) ǫ v 2 2 J(x). (47) where ǫ (0,ρ] is choose such that W(x) X for all x R. Such an ǫ exists since R is bounded and J(x) is continuous. First we prove that W(x) is upper semi-continuous. Consider the graph of W(x) graph(w) =(x,x+bv) x R, J(x+Bv) J(x) ǫ v 2 2 0}. (48) This set is closed since it is the pre-image of a continuous function. This implies W is upper semi-continuous. Now we show W(x) satisfies condition 1 from Theorem 1. For v = 0 we can confirm x W(x). For x X we have J(x ) = max x R J(x) thus W(x ) = x }. Thus W(x) satisfies condition 1 in Theorem 1. Next we showw(x(t+1)) W(x(t)). Takez W(x(t+ 1)) then there exists v such that z = x(t+1)+bv and J(z) ǫ v 2 2 J(x). By the definition of x(t + 1) there exists a control input u = u(t) such that x(t+1) = x(t)+bu. Thus there exists u+v such that z = x(t)+b(u+v). z satisfies J(z) ρ v +u 2 2 J(z) ǫ v 2 2 ǫ u 2 2 (49) J(x(t+1)) ǫ u 2 2 (50) J(x(t+1)) ρ u 2 2 (51) J(x(t)) (52) where the first inequality follows from the triangle inequality, the second inequality follows from the definition of z W(x(t + 1)), third inequality the choice of ǫ (0, ρ], and third inequality follows from the optimality of (41a). Thus z W(x(t)) which implies W(x(t+1)) W(x(t)). Therefore W(x) satisfies conditions 2 of Theorem 1. Let us define the function µ(w(x)) = J inf J(z). (53) z W(x) where J = max x R J(x). This function is bounded on bounded sets since W(x) is bounded andj(z) is continuous. By the definition of W(x) we have inf z W(x) J(z) = J(x). Therefore µ(w(x)) = J J(x). The optimal cost (41a) satisfies J(x(t+1)) ρ u 2 2 J(x(t)) (54) where J(x(t)) is the cost (41a) for u = 0. From Lemma 1 we conclude J(x(t+1)) > J(x(t)) since u 0 for x X.

Therefore µ(w(x)) satisfies condition 3 µ(w(x(t+1))) < µ(w(x(t))) for all x(t) R \X. Finally we conclude by Theorem 1 that x(t) x X. B. Battery Balancing Algorithm We present the following algorithm for solving Problem 2. Algorithm 2: At each time instant t N the flow u(t) and charging timest c (t) are obtained by solving the optimization problem minimize u,t c max x i(t+1)} min x i(t+1)} + x i (t+1)+ρ u(t) 1 (55a) subject to x(t+1) = x(t)+q 1 Bu x(t+1) X u(t) U(T c ) (55b) (55c) (55d) T c (t) T. (55e) Before proving this algorithm solves the battery balancing problem we prove the following Lemma. Lemma 2: Let G = (V,E) be connected, x(0) X 0 and ( 1. ρ < Q i δ(i,j)) (56) max j V where δ(i, j) is the distance between the i and j nodes. Then u(t) = 0 if only if x(t) X. Proof: Clearly u(t) = 0 for x(t) X. We will provide that for x(t) X Algorithm 2 will produce a control input u(t) 0. This is done by showing there exists a perturbation of u(t) = 0 that strictly decreases the cost (55a) when x(t) X. For notational simplicity let x = x(t), u = u(t), and x + = x(t). For x X at least one of the following conditions must occurs; some of the capacitors contains more than the minimum charge x c x c for some c C or some of the battery cells are unbalanced x i x j for some i,j B. We will show that either of these conditions implies u 0. Let us consider the case x c x c for some c C first. We will show there is a feasible flow moves excess charge from the capacitors and distributes it evenly among the battery cells. Furthermore this flow has a lower cost (55a) than the cost achieved at u = 0. Let 1 = Q c (x c x c ) > 0 be the excess charge in capacitor c C. Choose 2 > 0 such that a flow satisfying u 2 is feasible. Such a 2 exists since U(T c ) is full full-dimensional and contains the origin in its interior for T c (0,T s ). Define ǫ = 1 j B Qj min 1, 2}. (57) We seek the min-cost flow that transfers ǫq j charge from the capacitor c C to each of the battery cells j B. The battery cells can accommodate this additional charge since x(0) X 0. By our choice of ǫ 2 / j B Q j the flow constraints are not active. Therefore the min-cost flow problem is equivalent to the shortest path problem (see [2] p.11). Thus the flow that transfers ǫq j charge from capacitor c C to each battery cell j B satisfies u 1 = j BǫQ jδ(c,j) (58) where δ(, ) is the distance between nodes. By our choice of ǫ 2 / j B Q j this flow is feasible since u j BǫQ j 2. (59) This follows from the fact that the shortest path from capacitor c C to battery j B will pass through each edge at most once. This flow will not increase the battery imbalance since the state-of-charge of each battery cells is increased by the same amount ǫ. Thus this flow decreases the cost (55a) by ǫ ) Q j (1 ρq cδ(c,j). (60) Q c j B This quantity is positive due to our choice of ρ since Q cδ(c,j) max j V Q iδ(i,j) < ρ 1. (61) and thus ρq c δ(c,j) < 1. Therefore there exists a u 0 that improves the cost (55a). Thus Algorithm 2 will produce a control input u 0 if there exists c C such that x c x c. Now consider the case x i x j for some i,j B. We will show there exists a feasible flow that decreases the maximum state of charge of the battery cells by removing charge from the highest battery cells. Furthermore this flow has a lower cost (55a) than the cost for u = 0. Define the set of battery cells that have the maximum state-of-charge } B = j B x j = max xi (62) and let x = max x i be the common state of charge of these cells. Define Ḡ as the vertex contraction of G where vertices B \ B are identified. We denote this new vertex by s. We assign to node s the maximum state-ofcharge x s = max j B\ Bx j and minimum charge capacity Q s = min j B\ BQ j of all nodes in B\ B. Define 1 = Q s ( x x s ) as the amount of charge node s can accept without joining B. 2 is again chosen such that flow satisfying u 2 is feasible. Define } 1 ǫ = min Q s +, 2. (63) i B Qi i B Qi We seek the min-cost flow that transfers ǫq i charge from each node i B into some node j B\B. This is equivalent to finding the min-cost flow on the graph Ḡ from i B to s. By our choice of ǫ 2 / Q i the flow constraints are not active. Therefore the min-cost flow problem is equivalent to the shortest path problem [2]. Thus the flow that transfers ǫq i from each battery i B to some battery j B \ B satisfies u 1 = i BǫQ i δ(i,s) (64) where δ(, ) is the distance between nodes in the graph Ḡ.

By our choice of ǫ 2 / i B Q i this flow is feasible since u j BǫQ j 2. (65) This follows from the fact that the shortest path from a battery i B to some battery j B \ B will pass through each edge at most once. This flow will decrease the state-of-charge of each battery cell i B by ǫ. The state-of-charge of battery cells j B\ B will only increase. The increase in the state-of-charge for j B \ B can be upper-bounded x j(t+1) x j(t)+q 1 j ǫq i (66) i B x j(t)+q 1 j Q s( x x s) ǫq 1 j Q s (67) x j(t) x s + x ǫ (68) x ǫ. (69) The first inequality is due to the worst-case scenario where all the cells i B transfer charge to a single battery cell j B \ B. The second inequality is due to our choice of ǫ i.e. i B ǫq i Q s ( x x s ) ǫq s. The third and fourth inequalities follow from Q s Q j and x s x j. Therefore our shortest-path flow will decrease max x i by ǫ. This flow reduces the cost (55a) by ( ǫ 1 ρ Q i δ(i,s) ). (70) i B where the first term is due to max x i by ǫ decreasing and the second terms is the penalty on the flow. This quantity is positive due to our choice of ρ since i B Q i δ(i,s) max j V Q iδ(i,j) < ρ 1. (71) Note that δ(i,s) min j B\ Bδ(i,j) since vertex contractions shorten the distances in a graph. This implies Algorithm 2 will produce a control input u 0 if there are i,j B such that x i x j. We conclude that the control input u 0 for x X. We now prove that Algorithm 2 solves Problem 2. Proposition 5: Let G = (V,E) be connected, x(0) X 0 and ( ρ < max j V Q i δ(i,j)) 1. (72) Then Algorithm 2 solves Problem 2. Proof: In order to solve Problem 2, Algorithm 2 must maintain feasibility x(t+1) X for x(t) X and guarantee asymptotic convergence x(t) x X as t. Persistent feasibility is guaranteed by the constraint (55c). A solution to equation (55) always exists since u = 0 is feasible. We now prove asymptotic convergence x(t) x X as t using Theorem 1. Here X = X e is the set of equilibrium states. Consider the candidate set-valued Lyapunov function } W(x) = x+bv R V(z) ǫ v 1 V(x). (73) where V(x) = max x i (t+1)} min x i (t+1)}+ x i(t+1) x c andǫ (0,ρ] is choose such thatw(x) X for all x R. Such an ǫ exists since R is bounded and V(x) is continuous. First we prove that W(x) is upper semi-continuous. Consider the graph of W(x) graph(w) =(x,x+bv) x R, V(x+Bv) V(x) ǫ v 1 0}. (74) This set is closed since it is the pre-image of a continuous function. This implies W is upper semi-continuous. We now show W(x) satisfies condition 1 from Theorem 1. For v = 0 we can confirm x W(x). For x X we have V( x) = 0. Since V(x) 0 and v 1 0 are positive definite this implies W( x) = x}. Thus W(x) satisfies condition 1 in Theorem 1. Next we showw(x(t+1)) W(x(t)). Takez W(x(t+ 1)) then there existsv such thatz = x(t+1)+bv andv(z) ǫ v 1 V(x). By the definition of x(t + 1) there exists a control input u = u(t) such that x(t+1) = x(t)+bu. Thus there exists u+v such that z = x(t)+b(u+v). z satisfies V(z) ǫ v +u 1 V(z) ǫ v 1 ǫ u 1 (75) V(x(t+1)) ǫ u 1 (76) V(x(t+1)) ρ u 1 (77) V(x(t)) (78) where the first inequality follows from the triangle inequality, the second inequality follows from the definition of z W(x(t + 1)), third inequality follows from the choice of ǫ (0,ρ], and forth inequality follows from the optimality of (41a). Thus z W(x(t)) which implies W(x(t+1)) W(x(t)). Therefore W(x) satisfies conditions 2 of Theorem 1. Let us define the function µ(w(x)) = sup V(z) = V(x). (79) z W(x) This function is bounded on bounded sets since W(x) is bounded and V(z) is continuous. From the definition it is clear V(x) > 0 for all x R \ X and V( x) = 0 for all x X. The optimal cost (55a) satisfies V(x(t+1)) ρ u 1 V(x(t)) (80) where V(x(t)) is the cost (41a) for u = 0. From Lemma 1 we conclude J(x(t+1)) > J(x(t)) since u 0 for x X. Therefore µ(w(x)) satisfies condition 3 µ(w(x(t+1))) < µ(w(x(t))) for all x(t) R \X. Finally we conclude by Theorem 1 that x(t) x X. V. NUMERICAL EXAMPLE We now present a numerical example for Algorithm 1. We currently apply this method to battery packs with more then one hundred cells. In this example we present a lower order system to highlight the main features of our approach. Consider the battery network shown in Figure 1. The initial conditions of the battery cells are shown in Figure 2. The capacitor has initial condition x i = 0 for i C. The parameters used in the simulation are Q i = 75±2A-h for i B, Q i = 1A-h for i C, i max = 5A, W max = 5W,

60 55 q(t) 50 45 Fig. 1. Battery cell-balancing network topology with 16 battery cells and 1 capacitor. The battery cells are marked with a B and the capacitor with a C. xi(0) 1 0.8 0.6 0.4 0.2 0 2 4 6 8 10 12 14 16 i B Fig. 2. Initial state-of-charge of the battery cells x(0). The capacitor has initial state-of-charge x i = 0 for i C. T s = 300s, [x b,x b ] = [0.20,0.95], and [x c,x c ] = [0.0,1.0]. The cell voltage was modeled using the linear relation V i (t) = Vx(t)+V 0. (81) The closed-loop simulation results of Algorithm 1 are shown in Figures 3-4. In proposition 3 we showed that algorithms for Problem 2 (Battery Balancing ) will also solve the Problem 1 (Capacity Maximization). This example illustrates that the converse is not true. Algorithm 1 maximized the effective capacity of the battery network. Figure 4 shows the effective capacity of the battery network converging to the maximum value min (x b x b ). However Figure 3 shows that the state-ofcharge of the battery cells converged to an imbalanced state. Thus Algorithm 1 drove the system to an equilibrium point in X \ X. VI. ACKNOWLEDGMENTS We thank Miroslav Barić for his help on the initial problem formulation. x(t) 0.8 0.75 0.7 0.65 0 20 40 60 80 100 120 Fig. 3. State-of-charge of the battery cells x(t). Notice that the battery cells converges to unbalanced steady-state values. t 40 0 20 40 60 80 100 120 Fig. 4. Effective capacity of the battery pack q(t). The dashed-line shows the maximum attainable effective capacity. Notice that the battery network converges to the maximum value. t REFERENCES [1] F. Borrelli A. Bemporad and M. Morari. Constrained Optimal Control and Predictive Control. 2009. [2] D. Bertsekas. Network Optimization: Continuous and Discrete Models. Athena Scientific, 1998. [3] N. Biggs. Algebriac Graph Theory. Cambridge University Press, 1974. [4] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, 7th edition, 2004. [5] Jian Cao, N. Schofield, and A. Emadi. Battery balancing methods: A comprehensive review. In Vehicle Power and Propulsion Conference, 2008. VPPC 08. IEEE, pages 1 6, sept. 2008. [6] C. Godsil and G. Royle. Algebriac Graph Theory. Springer, 2001. [7] Chih-Chiang Hua and Meng-Yu Lin. A study of charging control of lead-acid battery for electric vehicles. In Industrial Electronics, 2000. ISIE 2000. Proceedings of the 2000 IEEE International Symposium on, volume 1, pages 135 140 vol.1, 2000. [8] Yuang-Shung Lee and Ming-Wang Cheng. Intelligent control battery equalization for series connected lithium-ion battery strings. Industrial Electronics, IEEE Transactions on, 52(5):1297 1307, oct. 2005. [9] C.S. Moo, Y.C. Hsieh, and I.S. Tsai. Charge equalization for series-connected batteries. Aerospace and Electronic Systems, IEEE Transactions on, 39(2):704 710, april 2003. [10] Stephen W. Moore and Peter J. Schneider. A review of cell equalization methods for lithium ion and lithium polymer battery systems, March 2001. [11] L. Moreau. Stability of multiagent systems with time-dependent communication links. Automatic Control, IEEE Transactions on, 50(2):169 182, 2005. [12] Gregory L. Plett. Extended kalman filtering for battery management systems of lipb-based hev battery packs: Part 1. background. Journal of Power Sources, 134(2):252 261, 2004. [13] Valer Pop, Henk Jan Bergveld, Dmitry Danilov, Paul P. L. Regtien, and Peter H. L. Notten. State-of-the-art of battery state-of-charge determination. In Battery Management Systems, volume 9 of Philips Research Book Series, pages 11 45. Springer Netherlands, 2008. [14] H. Shibata, S. Taniguchi, K. Adachi, K. Yamasaki, G. Ariyoshi, K. Kawata, K. Nishijima, and K. Harada. Management of seriallyconnected battery system using multiple switches. In Power Electronics and Drive Systems, 2001. Proceedings., 2001 4th IEEE International Conference on, volume 2, pages 508 511 vol.2, oct. 2001. [15] Carmelo Speltino, Domenico Di Domenico, Giovanni Fiengo, and Anna G. Stefanopoulou. Comparison of reduced order lithium-ion battery models for control applications. In Joint 48th IEEE Conference on Decision and Control and 28th Chinese Control Conference, October 2009. [16] Carmelo Speltino, Domenico Di Domenico, Giovanni Fiengo, and Anna G. Stefanopoulou. Experimental validation of a lithium-ion battery state of charge estimation with an extended kalman filter: Part i. In The European Control Conference, 2009. [17] Karen Thomas, John Newman, and Robert Darling. Mathematical modeling of lithium batteries. In Walter Schalkwijk and Bruno Scrosati, editors, Advances in Lithium-Ion Batteries, pages 345 392. Springer US, 2002.