Distributed Switched Optimal Control of an Electric Vehicle

: Distributed control is investigated to solve an electric vehicle switched optimal control problem faster than centralized control without signiﬁcant performance change. The powertrain includes a cooling system, supercapacitor, and two switched mode components: a battery with discharging and charging modes and an electric drive with motoring and generating modes. Control-oriented component power ﬂow models are developed with mode and temperature dependence. Component speciﬁc power and thermal management optimization problems, subject to these models, require solution for overall powertrain management. The power management problem is switched, having discrete-valued mode selection variables. Both problems are solved in a distributed manner using the alternating direction method of multipliers (ADMM). An ADMM-based algorithm to solve the switched powertrain management problem is proposed; it (i) solves the embedded version of the switched problem that relaxes discrete mode switch values to continuous values and (ii) projects embedded mode selection values onto discrete values and then solves the problem with now known mode selections. The distributed solution approach is demonstrated using a trapezoidal drive proﬁle and three regulatory proﬁles. The regulatory results are compared to centralized control and the proposed algorithm achieved at least a 3.3 times improvement in solution time with comparable drive performance.


Introduction
Electric vehicles with both battery and supercapacitor energy sources have gained interest recently since driver-demanded power can include large, sharp peaks and rapid changes in discharging/charging power, which reduces the usable life and efficiency of a battery if used alone. Given both energy sources, the supercapacitor supplies/absorbs high-frequency and large, sharp peak power demands while the battery supplies/absorbs power at lower frequency and wider peaks. A supercapacitor is not used alone because its energy density is significantly less than a battery. Modeling and control of the battery-supercapacitor powertrain has been investigated previously. Golchoubian et al. [1] use nonlinear model predictive control to manage the power of a battery-supercapacitor electric vehicle. Only the operation of the battery and supercapacitor are considered; their combined power outputs must meet the desired electric drive power. Model predictive control is implemented to minimize the squared battery current, promoting low battery duty and use of the supercapacitor to extend the battery lifetime. The electric drive demand is predicted using a Markov chain process trained on power data sampled over drive profiles. Deterministic and stochastic model predictive control are simulated over different drive profiles. Results show that stochastic optimal control based upon the Markov chain predictions can achieve similar performance compared to a deterministic control with full future knowledge of the drive profile.
Optimal control of a battery-supercapacitor electric vehicle is also investigated by Zhang et al. [2]. The system model includes a battery, supercapacitor, and DC-DC converter. The power management consists of a drive profile categorizer, driving pattern predictor, optimal frequency splitter, and real-time predictive controller. The categorizer and driving pattern predictor together recognize whether the profile is highway, urban, or a combination and predict a real-time driving pattern via a neural network. The optimal frequency splitter is a low-pass filter on the electric drive power demand with a cutoff frequency that is optimized to minimize the battery degradation and energy. Lastly, the real-time predictive controller sets the battery power to the value that minimizes the battery degradation with respect to power values scaled by the reliability of the estimated driving pattern. Control simulations show that the proposed method results in better prediction accuracy and lower system operation cost compared to control based upon a Markov prediction based fuzzy logic strategy.
The models and controls in [1,2] do not consider the powertrain as a switched system with components that have dynamics and algebraic relationships that change depending on the direction of power flow. Meyer et al. [3] investigates the battery-supercapacitor electric vehicle as a switched system that includes battery, supercapacitor, electric drive system, and vehicle dynamics. The battery and electric drive system models change depending on whether the former is discharging or charging and the latter is motoring or generating. Each valid system power flow configuration that has some unique dynamics and/or algebraic relationships is termed a mode of operation. Four modes are defined: battery discharging/supercapacitor discharging/electric drive motoring, battery discharging/supercapacitor charging/electric drive motoring, battery discharging/supercapacitor charging/electric drive regeneratively braking, and battery charging/supercapacitor charging/electric drive regeneratively braking. Each mode has associated with it an integer mode switch variable that indicates whether the mode is on or off. Power management is formulated as a model predictive control problem. The control cost function to minimize includes velocity reference tracking error, mode switched mode-specific frictional braking values (so as to maximize regenerative braking), and the difference in supercapacitor state of charge from fully charged at the end of the prediction horizon. The control problem is a switched optimal control problem (SOCP) because it includes a switched system model and a cost function with mode switched terms; the SOCP has both continuous-valued control inputs and discrete-valued (integer) mode switch variables, which precludes application of traditional model predictive control and numerical solvers. To solve the SOCP, the embedding method is applied. The embedding method embeds the discrete-valued mode switch variables into continuous ones, creating a continuous-valued embedded optimal control problem (EOCP) that is solvable using traditional nonlinear programming techniques [4]. If the solution of the EOCP results in a non-integer mode switch value, then projection is applied to obtain control values applicable to the original switched system [5]. In comparison to common SOCP solution methods such as mixed-integer programming, the embedding method more often results in the existence of a solution (guaranteed to exist under mild conditions) and lower numerical solution times [6]. The control approach is shown to produce effective power management over several drive cycles. However, the switched system control is centralized and the EOCP solution times, even though lower than other SOCP solution methods, are not suitable for practical application.
Distributed control is a potential remedy for slow power system management EOCP solution times that achieves similar solution accuracy to centralized control. Distributed control of power systems has been investigated to reduce computation time through parallelization at the expense of having to pass data between components with computational capability. Typically in distributed control, each component (i) solves a component level specific control problem that is smaller than the centralized system wide control problem, (ii) broadcasts a select subset of its results, (iii) receives pertinent results from other components, (iv) updates its own control problem in a way to work toward a system control solution given its own results and results received, and (v) returns to (i) with the updated component control problem unless some convergence criteria are met. A popular approach to distributed control is the alternating direction method of multipliers (ADMM) [7,8]. Component connecting variables, termed complicating variables, are identified and then (i) component level optimal control problems are  solved with respect to the current values of the complicating variables and dual variables, i.e, Lagrange  multipliers associated with satisfying component connection constraints, to find minimizing values of  the component level problem variables, (ii) the complicating variable values are updated to satisfy  optimality conditions given the current component level problem solution variable values, and (iii) the dual variable values are updated to fulfill dual feasibility given updates in (i) and (ii). ADMM is well-known to converge given convex component level problems and linear connection constraints between components.
East and Cannon [9] propose ADMM for a parallel hybrid electric vehicle powertrain. To avoid discrete (integer) control variable in the control optimization, heuristics control the engine clutch engagement on/off state and fixed-gear transmission selection. Control problem convexity is ensured by modeling the engine and electric drive loss maps as quadratic functions, assuming that the battery dynamics voltage and resistance are invariant with battery power, and showing that the system dynamics are linear under the assumption that increasing output power requires increasing engine or electric drive output. The control objective is to minimize the engine power losses, which is equivalent to minimizing fuel use, while satisfying the power demands of the driver. Simulations of the vehicle control using ADMM and dynamic programming to solve the centralized problem are performed over drive cycles where dynamic programming results are used to tune the ADMM parameters. Variations in power demand and prediction horizon show little variation in the ADMM solution time with the former and computation time decreases as the latter decreases. The ADMM fastest solution times are approximately forty times less than those from dynamic programming at comparable cost values. East and Cannon [10] consider the parallel hybrid electric powertrain again to evaluate computational characteristics of different solution methods for the convex control problem. Multiple control test cases are solved using ADMM and a projected interior point method applied to the centralized problem. The ADMM demonstrates sublinear convergence while the interior point shows superlinear. The total ADMM and interior point method solution times scale quadratically and cubically, respectively, with the problem horizon length. In this work, the ADMM solution time is approximately fifty times less than that of the interior point method in the longest prediction horizon case for similar cost values.
Romijn et al. [11][12][13] investigate complete vehicle energy management of a parallel hybrid heavy-duty vehicle with ADMM. Components include a high voltage battery system, electric drive, engine, gearbox, and refrigerated semi-trailer. Component operation is described with power state variables with power conversion efficiencies modeled as quadratic functions; component connections are enforced by the conservation of power. Individual component control objectives are to minimize their respective energy losses to minimize the total fuel consumption; additionally, the battery state of charge at the end of the prediction horizon is to equal the starting value. ADMM and quadratic programming are used to solve the centralized vehicle energy management problem composed of the individual control objectives. ADMM solution times are approximately seven times less and have similar accuracy compared to quadratric programming results at their longest shared prediction horizon.
Nilsson et al. [14] consider the ADMM-based distributed energy management of heavy vehicle ancillary systems that include the cooling system, electrical system, and engine accessory loads. The control goal is to minimize the fuel use of the ancillaries over a drive cycle while respecting electrical bus bounds and available energy. The conservation of power is applied to each component to obtain component models where components with energy storage have a storage cost. The models are reformulated to be convex using second order cone constraints and then ADMM is used to solve the resulting convex control problem. ADMM simulation solutions are compared to convex and nonconvex centralized problem solutions and show little difference.
ADMM solution times and cost comparisons have also been reported for power system management. Erseghe [15] explores microgrid distributed power flow management using ADMM. Reasons given for using the approach are alleviation of privacy/security concerns since only a limited amount of data is exchanged between nodes and the ability to localize fault handling. The power system consists of transmission line connected nodes with both generation and load consumption abilities. The control problem cost function is convex but the problem is nonconvex due to voltage cross coupling terms in the constraints. Convergence is shown to occur under the weak assumption that the component problem is solvable. Several different wide area networks are simulated. The ADMM solution times are slower than that of an interior point method applied to the centralized problem; both methods result in similar costs. However, the ADMM solution time increases slower than that of the interior point method as the network size increases. Wang et al. [16] uses ADMM to manage a microgrid that consists of electric vehicle charging stations, battery energy storage, and solar arrays. The control problem is to minimize load power tracking error, curtailment of solar output power, and storage and vehicle battery cycling. The microgrid component level control problems are convex with quadratic cost functions subject to linear models and bounds. Control simulation shows that using ADMM results in similar cost to a centralized problem solution and ADMM solution times suitable for real-time implementation. Liu et al. [17] investigates a convex, connected microgrid management control problem using ADMM. Models of diesel generators, battery storage systems, and renewables are associated with each of the microgrids. The objective is minimize total operating cost of the microgrids while protecting the privacy of internal microgrid data and the totality of power exchanges between the microgrids. A case study involving three microgrids operating together is shown to converge and provide the needed power. The ADMM control costs are comparable to a centralized control solution approach.
The application of ADMM to the solution of a powertrain power management EOCP has been problematic since they are usually nonconvex [3,5,18,19]. However, recent ADMM advances have resulted in its broader applicability to certain classes of nonconvex problems with linear connection constraints. Wang et al. [20] shows that convergence is guaranteed for nonconvex cost functions that have decoupled complicating variable costs and component level variable costs and are continuous and differentiable with a Lipschitz continuous gradient. Additional conditions are that the variables are bounded and the linear connection constraints have full column rank in both complicating variables and component level connection variables to ensure uniqueness. Indicator functions can be incorporated into the cost function to signal whether or not component level variables are feasible within a possibly nonconvex compact set. Applications presented include statistical learning, minimization on compact manifolds, smooth optimization over complementary constraints, and matrix decomposition. Ferranti et al. [21] applies the results to perform distributed nonlinear model predictive control of multiple autonomous robot vessels. The overall control problem is for each robotic agent to navigate their path while avoiding collisions with other agents. The centralized problem is reformulated to meet the conditions in Wang et al. [20]; an indicator function signals whether the robot motion is feasible with respect to its nonlinear dynamics model. This work proposes battery-supercapacitor electric vehicle SOCP-based powertrain management with the solution of EOCPs using ADMM to achieve faster solution times and comparable control costs, i.e., performance, with respect to a centralized control problem solution. Unlike past efforts, the powertrain management includes both power management and thermal management. Appropriate powertrain power-flow-oriented component models are developed for both power and thermal management. The power and thermal management are formulated as separate control problems because of their difference in dynamics response time scales. Component level power management problems that include SOCPs are formulated in preparation for distributed control. The SOCP problems are transformed into EOCPs and a distributed control solution algorithm based upon recent ADMM advances to ensure convergence is set forth. A second algorithm is proposed to project the component EOCP control input solutions back to control inputs that are applicable to the original switched components. The thermal management is not a switched control problem, thus the first ADMM-based algorithm is applicable and the projection performed by the second algorithm is not needed. A Tesla Model S with the addition of a supercapacitor is simulated over test and regulatory drive profiles to evaluate the solution times and control costs obtained from ADMM and a centralized control solution approach. Specifically, Section 2 develops the powertrain component models and control objectives for both power and thermal management. Section 3 outlines the distributed approach to solving an SOCP via the solution of an EOCP and, if needed, solution of the projected control inputs. Next, Section 4 gives simulations results over a short, severe-duty trapezoidal drive cycle and three common regulatory profiles. Comparisons are made between the distributed and centralized control problem solutions using regulatory profile results. Conclusions and future work directions are set forth in Section 5.

Component Models and Controls
The vehicle herein is based upon a Tesla Model S with the addition of a supercapacitor to protect the battery from the expected rapid fluctuations and sharp peaks in vehicle power demand that can reduce its efficiency and usable life. Figure 1 shows the powertrain architecture that consists of a 225 kW induction motor-based electric drive system (EDS), 59.6 kWh Lithium-Ion battery pack, and 168 Wh supercapacitor; the EDS, battery, and supercapacitor are connected via an electrical bus and the EDS and drivetrain are joined with a mechanical bus. Not shown is the cooling system that is connected by a thermal bus to the powertrain electrical components. Operation of the powertrain is divided into two tasks: power management and thermal management. The power management task must operate at a much faster update rate than the thermal task since the motion dynamics are much faster than those of the latter task. Each task is performed using distributed control, with the power management task requiring distributed switched system control. The power management task regulates the power flow between the vehicle motion, electric drive system, battery, and supercapacitor. The task is a switched control problem since both the battery and EDS models switch depending on the direction of power flow, where the battery has discharging and charging mode models and the EDS has motoring and generating mode models. Distributed control is to be used to perform the power management and the vector of complicating variables, i.e., the variables that connect the different components, is ,c is the battery electrical bus power, P p c is the supercapacitor electrical bus power, P p m is the mechanical bus power at the drive wheel axle, and ω p m is the angular velocity of the EDS motor shaft and the input into the final gear set connected to the drive wheel axle.
The thermal management task regulates the cooling system to keep the battery, supercapacitor, and EDS at temperatures that maximize efficiency within their operational ranges. The task is an unswitched control problem that is to be solved with the distributed approach. The thermal management task distributed control complicating variable vector is ψ t = [P t b,clt , P t c,clt , P t d,clt , T t clt ] : P t b,clt is the battery coolant transfer power, P t c,clt is the supercapacitor coolant power transfer, P t d,clt is the EDS coolant power transfer, and T t clt is the cooling system coolant temperature. In preparation for the control developments and simulations, the battery, supercapacitor, EDS, vehicle dynamics, and cooling system are detailed. Models and task-specific controls are presented next for each component.

Battery
The 59.6 kWh Lithium-ion battery supplies and absorbs energy from the electrical and thermal buses. The battery is composed of 420 Saft 10.8 V, 12 Ah Lithium-Ion modules [22,23] composed of 12 parallel strings of 35 modules in series that provide 375 V to the EDS. The mode switched battery electrical dynamics without temperature effects are [3] is the battery's maximum rated storage energy; α b is the battery mode switch variable; P α b b is the mode specific battery power; modulate the maximum discharging and charging battery powers; η α b b is the discharge/charge efficiency; and k 0 /k 1 and . . , 4, are both discharge/charge fit coefficients. Unlike past work, the fit coefficients herein are developed as quadratic functions of battery temperature T b from data in [22,23]: Further, battery power changes are constrained to reduce the possibility of damage from rapid power fluctuations: dP where ∆ P b = 15 kW/s is the absolute value of the power rate limit. The battery interfaces with the electrical bus via P b,c , the mode-weighted convex combination of the discharge and charge powers: The connection to the power management complicating variables is the linear equality are appropriate matrices. Appendix A contains additional electrical model data.
While supplying/absorbing electrical power, the temperature T b of the battery may change. The battery temperature dynamics are where α b is known, m b is the battery mass, C b is the battery specific heat, P b,clt is the power transfer to the cooling system coolant, and h A,b is the heat transfer coefficient between the battery and coolant with temperature T clt . The connection of component level variables to the thermal management complicating variables is for thermal management and A t b and B t b are appropriate matrices. Appendix A contains the thermal model data.

Battery Power Management
Operation of the battery component is a switched control problem since α b ∈ {0, 1} must be determined. The electrical power switched optimal control problem is (12) subject to Equations (1)-(8) and convex and compact variable bounds where [t p p,0 , t p p, f ] is the power management prediction horizon, t p p,0 is the current time, J p b is the battery power cost function, and q b,P weights use of battery power to promote use of the supercapacitor described shortly.

Battery Thermal Management
Unlike the electrical dynamics, the battery temperature optimal control problem is not switched. The goal of the control is to regulate the temperature to increase efficiency at the battery power requirement. Specifically, (14) subject to Equations (2) and (9)-(11) and convex and compact variable bounds where [t t p,0 , t t p, f ] is the temperature management prediction horizon, t t p,0 is the current time, J t b is the battery thermal cost function value, q b,η penalizes variation on efficiency from unity so as to promote ideal operation, and P α b b , W b , and α b are considered known from power management operation.

Supercapacitor
The supercapacitor consists of 139 Maxwell BCAP1200 supercapacitors [24] in series that store 168 Wh at full charge. The non-ideal supercapacitor electrical dynamics power flow model without temperature effects is presented in [3]. The model describes a circuit with a resistor, R s , in series with the parallel combination of an ideal supercapacitor, C, and resistor, R p : where Equation (16) represents the power evolution in the parallel legs of the circuit; Equation (17) is the power balance between the input power, the power lost in the series resistor, and the power in the parallel legs; W c is the state of charge; W max c is the maximum energy of the supercapacitor; P cp is the sum of the power in C and R p ; and P c ∈ [−208, 208] kW is the supercapacitor electrical bus interface power that is greater than or equal to zero during discharge and less than zero during charge. Similar to [25], R s and C have a temperature dependence of where T c is the temperature, C 25 • C and R s,25 • C are the capacitance and resistance at 25 • C and c C,i , i = {0, 1}, and c R s ,j , j = {0, 1, 2}, are component temperature variation data fitting coefficients. The connection constraint that connects the supercapacitor to the powertrain electrical bus is where P c is the component level connection variable, z p c = [W c , P c , P cp ] is the vector of power management states and algebraic variables, and A p c and B p c are appropriate matrices. Appendix B provides the supercapacitor parameters.
To obtain the supercapacitor temperature, the thermal dynamics are modeled as where m c is the mass of the supercapacitor, C c is the specific heat of the capacitor, P c,th is the power dissipated by the resistors, P c,clt is the power transfer between the supercapacitor and coolant, h A,c is the heat transfer coefficient between the supercapacitor and coolant, and η c is the efficiency of the transfer of the input power to the capacitor, needed for control. The thermal management task complicating variables are included using with z t c = [P cp , P c,clt , T clt , η c ] and A t c and B t c are appropriate matrices. Appendix B contains thermal model data.

Supercapacitor Power Management
Supercapacitor control herein seeks to maintain the SOC equal to one, i.e., full charge, at the end of an optimal control prediction horizon. Thus the supercapacitor is available without penalty over the majority of the prediction horizon to fulfill electrical power imbalances that occur because of battery power rate of change limits. The desire to have the SOC at one at the end of the prediction horizon promotes its charging and future availability to supply energy. Specifically, the optimal control problem is to minimize with respect to P c and subject to Equations (16)- (20) and convex and compact variable bounds where q W c weights the variations in SOC from full charge at the end of the prediction horizon.

Supercapacitor Thermal Management
The goal of the control is to regulate the temperature to increase efficiency. Specifically, Equations (21)- (25), and convex and compact variable bounds where J t c is the supercapacitor thermal cost function value and q c,η is the penalty weighting on inefficiency; W c and P c are known from power management operation.

Electric Drive System
The electric drive system (EDS) is a 225 kW maximum power, 0-16,000 rpm induction motor and bidirectional AC-DC inverter that provides motoring power and regenerative braking to recharge the battery and supercapacitor. The EDS power conversion efficiency and operational envelope are shown in Figure 2. The motor's maximum mechanical power rises linearly from zero at zero speed to 225 kW at 5000 rpm-denoted as region 1, remains constant to 8000 rpm-denoted as region 2, and then decreases nearly linearly to 92 kW at 16, 000 rpm-denoted as region 3. These regions and efficiency curves are based upon the control approach described in [3]. The EDS has two modes with the mode switch α d = 0 for motoring and α d = 1 for generating. The EDS is modeled algebraically as in [3] since the electrical dynamics are much faster than the typical power flow changes observed for vehicle motion. For motoring: the electrical power P 0 d,e ≤ 0, the mechanical power P 0 d,m ≥ 0, and and during generating: where η d,m is the motoring/generating motor power transfer efficiency ω d is the motor shaft angular speed, η d,inv is the inverter efficiency, β models field weakening above the rated speed ω d,r , c d,1 and c d,2 are constants that are functions of the motor parameters, d 1 is a regularization term to prevent division by zero at zero speed and/or zero mechanical power, and u 0 d , u 1 d ∈ [0, 1] modulate the maximum mechanical power in motoring and generating, respectively. The motor operation variation with temperature is modeled with temperature dependent stator and rotor copper resistances as in [26], which results in c d,1 and c d,2 of where T d is the EDS temperature, c d,i,25 • C is the value at 25 • C, and α copper = 0.004 • C −1 scales the copper resistance change from 25 • C. Electrical model parameter values, including the expression for P max d,m (ω d ), are given in Appendix C. The EDS is connected to the electrical and mechanical buses with mode weighted electrical and mechanical power values, P d,e,c and P d,m,c , respectively: where α d is known, m d is the EDS thermal mass, C d is the EDS specific heat, P d,clt is the power transfer between the EDS and coolant, and h A,d is the heat transfer coefficient. The coupling of component level connection variables to the thermal complicating variables is

Electric Drive System Power Management
Operation of the EDS is a switched optimal control problem since it can operate in either motoring or generating modes. Specifically, the problem here is subject to Equations (29)-(37) and convex and compact variable bounds where J p d is the EDS power task cost function and q d,u weights the control inputs in each mode. Weighting the EDS control inputs has been shown to encourage bang-bang solutions, i.e., those with mode values in {0, 1}, from the numerical optimization of the (to be presented) embedded optimal control problem formulation as demonstrated in [3,5].

Electric Drive System Thermal Management
The EDS thermal optimal control problem is not switched. The goal of the control is to maximize efficiency. The control problem is to minimize subject to Equations (30), (32), (33) and (38)-(40) and convex and compact variable bounds where J t d is the thermal cost function value, q d,η penalizes variation on efficiency from unity so as to promote ideal operation, and P α d d,m , ω d , and α d are known from power management operation.

Vehicle
Vehicle motion is expressed as a Lyapunov energy function, Υ = v 2 (where v is velocity), to remove a singularity at zero velocity that occurs with a standard point-mass, linear motion dynamical model with power inputs [3,5]: where Υ ∈ [0, 2874]m 2 /s 2 (considering only forward motion), P d is the drag force power, P rr is the rolling resistance, P g is the power due to the body gravity force, P w is the wheel power, P f is the frictional braking power, ρ air is the ambient air density, m v is the total vehicle mass, A f r is the vehicle frontal area, C d is the drag coefficient, C rr is the tire rolling resistance, and θ r is the road grade angle. The braking power is where P max f is the maximum braking power and u f ∈ [0, 1] modulates the braking power available at the current velocity. Component level connection variables are joined to the mechanical bus complicating variables with where R f d is the gear ratio from the EDS to the drive wheel axle, ω v = v/r whl is the angular velocity of the drive wheel, z

Vehicle Power Management
The vehicle component level optimal control problem is to determine the propelling and braking power to track a desired reference velocity. The problem is to subject to Equations (45)-(47) and convex and compact variable bounds where J p v is the cost value, q Υ is a penalty weight on tracking error, and q brk is a penalty weight on frictional braking so as to promote regenerative braking.

Cooling System
The cooling system regulates waste power due to power conversion inefficiencies to maintain the temperatures of the battery, supercapacitor, and EDS. The system coolant is assumed to only exchange heat with the battery, supercapacitor, EDS, and a controllable heat exchanger. The coolant temperature dynamics are where T clt ∈ [0, 40] • C is chosen as the intersection of the components' operating ranges, m clt is the mass of the coolant and C clt is the coolant specific heat, and P b,clt , P c,clt , and P d,clt are local values of coolant power values; P hex is the thermal power removed by the remainder of the cooling system that consists of heat exchanger(s) between the coolant and ambient and coolant pump and fan(s) to regulate heat transferred, similar to the cooling approach in [27]. Due to a lack of publicly available data on the majority of the Tesla Model S cooling system, P hex is approximated with where P max hex is the maximum thermal power that can be dissipated by the cooling system, T max clt is the maximum allowable coolant temperature, T amb is the ambient temperature, and u hex ∈ [0, 1] regulates the cooling power. The bases for the choice of P hex are (i) the ability to exchange coolant heat with the ambient is dependent on the temperature differential and (ii) the true coolant flow and cooling air flow rates are assumed to be adjustable by a controller such that P hex is achievable.
The component level connection variables are coupled to the complicating variable via connection constraints: where z t t = [T clt , P b,clt , P c,clt , P d,clt , u hex ] is the vector of cooling system variables and A t t and B t t are appropriate matrices. Appendix E lists cooling system parameters.

Cooling System Thermal Management
The cooling system regulates the temperatures of the battery, supercapacitor, and EDS, to keep them at temperatures such that their combined efficiency is maximized. Efficiency is local to the battery, supercapacitor, and EDS components, thus the cooling system optimal control is to subject to Equations (50)-(52) and convex and compact variable bounds where and q u hex penalizes use of the cooling system. A penalty on cooling system use is analogous to a penalty on the energy used to operate the cooling system even though not explicitly modeled herein.

Distributed Control Development
In preparation for control development, the component level control problems are approximated in discrete time for task j using forward-Euler and trapezoidal numerical integration with a time step of h j . The generic representation of a component level discrete control problem is

Switched, Embedded, and Projected Optimal Control
When components include switched (discrete-valued) mode control inputs α j i , the use of the embedding method to solve switched optimal control problem (SOCP) avoids computational complexity of mixed-integer programming and results in faster solutions that have equal or lower cost values [6]. To apply the embedding method, the SOCP α The change in SOCP variables to embedded ones is denoted by (·) where Z j i →Z j i (which includesα j i ) and Ψ j →Ψ j . The new control problem with the change in SOCP variables to embedded ones is the embedded optimal control problem (EOCP). The sufficient conditions for the existence of an EOCP solution are that the dynamics must be linear in the continuous control inputs u, mode specific continuous control inputs are defined, and the optimization cost function must be convex in the continuous control inputs. This means that there exists at least one (possibly non-unique) minimum; there could be an infinite number of optimal solutions. Further, the switched system trajectories are dense in the embedded system trajectories such that all possible SOCP solutions are EOCP solutions. Thus, if an EOCP solution results in allα  [5]. Here, the projection approach is to set the projected mode value to 0 ifα j i < 0.5 and 1 otherwise. To obtain continuous control inputs that maintain component coordination given projected mode values, a projected optimal control problem (POCP) is solved with α j i equal to the projected values. This does introduce the need to potentially solve two optimal control problems at each time step. Practically, the embedded and projected optimal control problems are classical problems that are solvable using traditional nonlinear programming.

Distributed Control
A popular approach to distributed control is ADMM [7], which is well known to converge when the component level problems are convex. Recently in [20], restrictions on convexity to achieve convergence have been relaxed for classes of nonconvex problems, opening the method to certain nonlinear control problems. Specifically, ADMM applied to continuous-valued component level optimization problems with nonconvex control cost functions will converge if the conditions in [20] where λ j i is the dual variable, Λ j i,k = [λ j i,k+1 , . . . , λ j i,k+N j ] , and ρ is a penalty parameter. The ADMM algorithm for the optimization herein is shown in Algorithm 1. It includes use of the primal residual 2-norm r and dual residual 2-norm s to both evaluate convergence and adjust ρ from a default value during iterations in an effort to keep r and s within a factor of 10 (Factor of 10 chosen through numerical experimentation of the problem herein and suggestion in [7]) of each other [7,28]. Convergence is achieved when r 2 and s 2 are both less than tolerance values, r and s , respectively.   11: if r 2 > 10 s 2 then 12: else if s 2 > 10 r 2 then 14: ρ l+1 ← ρ l /2 15: end if 16: Update iteration l ← l + 1 17: end for 18: end while

Distributed Switched Optimal Control
The component level power management SOCPs in Section 2 satisfy the sufficiency requirements for the existence of an EOCP solution given in Section 3.1. Further, the component level EOCPs and POCPs satisfy the conditions for convergence of non-convex ADMM in [20] (Theorem 1) as described in Section 3.2. The approach to solving the distributed switched optimal control problem is described in Algorithm 2.
Algorithm 2 Distributed switched optimal control at time step k.

Power Management Task Control
The power management task denoted with j = 1 includes the coordination of the battery, supercapacitor, EDS, and vehicle to meet driving velocity demands. The battery and EDS are both switched components, thus Algorithm 2 is used to find the control inputs needed to perform the task. The temperatures of the battery, supercapacitor, and EDS are carried forward from k to k + N 1 since the thermal dynamics of the components are much slower than that of power management and it follows that h 1 N 1 < h 2 N 2 .

Thermal Management Task Control
The thermal management task denoted with j = 2 regulates the cooling system, battery, supercapacitor, and EDS thermal dynamics to maximize efficiency while penalizing cooling system use. Algorithm 1 is used to solve the optimal control problem since this task has no switched components. It is assumed that the future operating velocity demand of the vehicle can only be extrapolated into the future from the current and past values, thus the velocity predictions over the longer horizon h 2 N 2 are unreliable. Due to this unreliability and slow thermal dynamics, the values of P b , W b , P c , W c , P d,m , and ω d are made equal to their mean power management task POCP solution values over a trailing horizon of duration h 1 N th from k where N th is the number of trailing horizon partitions. Additionally, α b and α d are set to values consistent with the signs of the mean values of P b and P d,m , respectively. This task does not start until a short time after driving is initiated, h 1 N th,del , to have nonzero value data available at the first control problem solution. The optimal T clt value at the end of the first partition is used as the reference for a lower-level controller that updates at h 1 intervals. The reference T clt is taken to vary linearly from the current T clt at k to the optimal value h 2 seconds later. The lower-level controller uses the current power management and temperature data to find u hex for reference tracking.

Control Simulation
The vehicle control is simulated over four different drive profiles: trapezoidal, EPA highway fuel economy test (HWYFET), EPA urban dynamometer driving schedule (UDDS), and new European driving cycle (NEDC). The simulations are performed in MATLAB with optimization carried out using sequential quadratic programming.
The power management task is implemented with h 1 = 0.5 s, N 1 = 2, and r , s = 0.2 (The r and s values for power management and thermal management are with respect to Watt, Celsius, and rad/s valued complicating variables.). The component cost function penalty weights are chosen (after empirical testing) as q b,P = 0.5, q W c = 1 · 10 5 , q d,u = 20, q Υ = 1.25 · 10 4 , and q brk = 6.4 · 10 −5 . The reference kinetic energy Υ to track in Equation (49) is obtained by linearly extrapolating from the known current velocity and the desired velocity since perfect knowledge of the drive cycle is not assumed. Thus the energy reference values are where the v k is the currently measured velocity and v re f ,k+1 is the current desired velocity that is delayed to one step ahead. The delay is due to the inability of the vehicle to instantaneously change velocity. This linear extrapolation assumption is meant to approximate a driver but does add a small error to the tracking of reference signals that are non-piecewise linear or have "corners". The thermal management task is performed with h 2 = 10 s, N 2 = 3, N th = 20, N th,del = 20, and r , s = 0.2. The values of the component cost function penalty weights are q b,η = 1000, q c,η = 1000, q d,η = 1000, and q u hex = 1. Similar to the power management task, the weights were empirically determined. The initial coolant temperature is taken as 25 • C and the ambient is 20 • C.

Trapezoidal Drive Profile
The trapezoidal drive profile consists of a 10 s acceleration to 26.8 m/s, 5 s constant velocity portion, and then a constant deceleration to zero over the final 10 s. The profile is meant to demonstrate the functionality of the control during a 0-to-60 mph acceleration over 10 s, the ability to hold a constant velocity, and severe deceleration to evaluate both frictional and regenerative braking. Figure 3 shows the excellent reference velocity tracking achieved with a mean absolute percentage error (MAPE) of 0.52%. The wheel power and frictional braking power are given in Figure 4. The wheel power rises with velocity during the first 10 s and then remains nearly constant during the constant velocity portion. During the deceleration over the last 10 s, the combined wheel and braking power slow the vehicle where the wheel power is the mechanical power consumed by the EDS to provide the preferred regenerative braking. All of the power to decelerate is not consumed by the EDS over (15, 15.5] s and (16.5, 20.5] s due to limits on the change in battery power and maximum supercapacitor SOC as seen in Figures 7 and 8. After 20.5 s, the entirety of the braking is provided by the EDS since the power that needs to be consumed is not greater than which can be taken by the energy storage systems. The limited use of frictional braking is consistent with the penalty on it in the cost function. The difference between the embedded and projected power values over (16.5, 20.5] s is explained in the context of the EDS operation given next. The EDS electrical and mechanical power are shown in Figure 5 where the EOCP values are P d,e,c and P d,m,c . The embedded and projected values track together fairly well until 15 s, the start of the deceleration, when the mechanical power shows a pronounced difference from (16.5, 20.5] s. This difference is due to the POCP, which is constrained to one mode, having solutions with EDS operating points that produce approximately the same electrical power with less mechanical power than solutions obtained from the EOCP, which is not constrained to specific mode values. Figure 6 shows the embedded and projected motoring (1 − α d ) and generating α d mode selections. Motoring is the optimal choice when accelerating and maintaining constant velocity while generating is chosen when there is excess vehicle kinetic energy available to charge the energy storage systems. The number of bang-bang solutions is four out of fifty, thus the projected solution is required 92% of the time. Figures 7 and 8 display the supercapacitor and battery powers and SOCs, respectively, where the battery power is P b,c . The figures show that the supercapacitor is used to supplement the rate limited battery to provide acceleration power. The supercapacitor is also given preference to charge during the constant velocity starting at 11.5 s and until after the start of deceleration at 18.5 s since there is a penalty on the SOC deviation from full and no battery SOC penalty. The battery provides motoring and supercapacitor recharging over (10.5, 15] s of the constant velocity portion. At the start of deceleration, the battery is also being charged. However, at (16, 16.5] s the battery discharges slightly to add additional charge to the supercapacitor. Further, the low battery power values between (15, 16.5] indicate the controller doesn't have a strong preference for discharging or charging. The remainder of the profile after 16.5 s, the battery is being charged. Note that the supercapacitor SOC begins to decrease again at 20.5 s. This is due to the battery rate limits because the battery charge power can't be reduced enough to match the regenerative power available, thus supercapacitor power is needed to make up the difference. The battery mode selection is shown in Figure 9 where (1 − α b ) is the discharging mode and α b is the charging mode; projection is required five times. The charging mode is on during deceleration and start of acceleration at (0.5, 1] s. The charging mode selection at (0.5, 1] s is attributable to the limited need for battery propelling power since the supercapacitor is near full charge and able to both propel the vehicle and provide a small battery charge power without an actionable change in the penalty on supercapacitor terminal SOC.
The thermal management control problem is solved at 10 s and 20 s. Figure 10 shows the responses of the battery, EDS, supercapacitor, coolant, and changes in the desired coolant temperature. After the first solution, the temperatures of the battery, EDS, and supercapacitor are stabilized with the EDS trend being slightly downward. Figure 11 displays the efficiencies achieved. The supercapacitor efficiency is zero between 18.5 and 20.5 s since it is at approximately full charge and effectively off. The EDS efficiency decreases after 20 s, the time of the second thermal management control solution, since (i) the efficiency decreases near the maximum power line at low angular velocity as seen in Figure 2 and (ii) the optimal coolant temperature from 20 s onward is based upon power data that includes not only values obtained during deceleration but also the [10,15] s constant velocity portion of the drive profile. Finally, Figure 12 shows the cooling power control input from the local cooling system controller that follows the setpoint established by the cooling system control problem solution. The control is active during the commanded decrease in coolant temperature on (10,20] s and then active once from 20 s to prevent the coolant temperature from rising too fast. The penalty on coolant control input means that the cooling system will not maximize efficiency at all costs. The average efficiency of the battery is 96.0%, supercapacitor is 89.6%, and EDS is 94.1%.

Regulatory Drive Profiles
The power management distributed switched optimal control is compared to the results of a centralized approach using three regulatory drive profiles: EPA highway fuel economy test (HWYFET), EPA urban dynamometer driving schedule (UDDS), and new European driving cycle (NEDC). The centralized control is similar to that in [3], however the modes are redefined to reflect the powertrain operation herein. The centralized problem requires the definition of four modes of operation since system level valid power flows must be considered: EDS motoring/battery discharging, EDS motoring/battery charging, EDS generating/battery discharging, and EDS generating/battery charging. To account for component temperature in the centralized problem, the values from the distributed control problem solution are applied. Table 1 compares the distributed and centralized control simulation results. The distributed control solution time is the average of the longest embedded plus projected component solution times obtained at each time step. Over the drive profiles, the distributed solution is found between 3.3 and 6.2 times faster than the centralized problem. However, the distributed control MPGe energy economy is −3.4%, −3.2%, and −0.0061% over the HWYFET, UDDS, and NEDC, respectively, compared to the centralized control. The velocity tracking error MAPE is well below 1% for each control. These results show that the distributed control achieves significantly faster solution than a centralized approach with the trade-off of a small energy economy penalty. It is possible that further tuning of Algorithm 1 can decrease this energy economy penalty, however current results are acceptable.

Conclusions
This work developed distributed power and thermal management for a battery-supercapacitor electric vehicle similar to a Tesla Model S to assess solution time and performance compared to centralized control. Previous control-oriented power flow models for powertrain components were expanded to include temperature effects and a cooling system model was developed. Further, these models were incorporated into component level power and thermal management optimal control problems with the former including electric drive system and battery problems with discrete-valued mode selection switches. To simultaneously solve the component level problems, some of which include mode switches, to achieve system power management in a distributed manner, an algorithm based upon the alternating direction method of multipliers was set forth. The algorithm solves (i) the embedded problem, a continuous-valued relaxation of the original switched mode problem, and then (ii) a projected problem with modes set equal to the projection of the embedded problem solution mode values onto a discrete set. System thermal management, which has no mode switches, was solved in a similar distributed manner that did not include the projection step. Control simulations over several drive profiles showed that the distributed solution approach led to successful powertrain power management with low velocity tracking error, appropriate mode switching, and satisfactory energy storage state of charge control. Further, the thermal management resulted in reasonable temperature maintenance and high component operational efficiency. Also, distributed power management control solutions for the regulatory profiles were compared to those obtained using a centralized solution approach. The distributed control resulted in at least a 3.3 times reduction in solution time with at most a 3.4% reduction in energy economy compared to the centralized control. This confirms that a distributed solution approach can lead to lower switched optimal control problem solution times with little penalty. The small energy economy penalty may be overcome with further control tuning. Future work includes additional tuning of the distributed control to better match the centralized control outputs, incorporating fault detection and mitigation into a component to evaluate fault effects on overall system performance, investigating the effects of deletion and addition of components on system performance and choice of component control penalty weight tuning, comparison of the control herein to additional alternative control techniques, and implementation on down-scaled hardware to study the effects of communication delays and message drops.
Funding: This research received no external funding.

Conflicts of Interest:
The author declares no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript:

Appendix A. Battery Parameters
The battery data is taken from [22,23]. Table A1 lists the coefficients of the efficiency parameters obtained from fitting values calculated from temperature dependent battery data. Further, k 0 = −1, k 1 = 1, ∆ P b = 15 kW/s, and W max b = 214.57 MJ. With regard to thermal parameters, m b = 268.8 kg, C b = 795 J/(kg· • C), and h A,b = 536.43 W/ • C is the product of the cylindrical side area of the cells and heat transfer coefficient estimated as that of a cylinder in circulating coolant. The battery temperature range is [0, 41] • C and cooling power range is P b,clt ∈ [−64.37, 65.98] kW, which is determined from the minimum and maximum battery and coolant temperatures and heat transfer expressions.

Appendix B. Supercapacitor Parameters
The supercapacitor parallel resistor value is R p = 89, 732 Ω and the capacitance and series resistance at 25 • C are C 25 • C = 8.63 F and R s,25 • C = 80.62 mΩ, respectively [3]. The capacitance and series resistor are taken to vary with temperature similar to [25]. The parameters for the capacitance as a function of temperature are c C,1 = 7.21 · 10 −5• C −1 and c C,0 = 0.998. The series resistor temperature dependence parameters are c R s ,0 = 0.966, c R s ,1 = 0.111, and c R s ,2 = 21.3 • C. The maximum energy is W max c = 606.8kJ. The supercapacitor thermal parameters are based off data in [24]. The supercapacitor has a thermal rating of [−40, 65] • C, thermal capacitance of m c C c =41,700 J/ • C, and h A,c = 97.6 W/ • C, which is the product of the cylindrical side area of the cells and the heat transfer coefficient estimated as that of a cylinder in circulating coolant. The cooling power range is P c,clt ∈ [−7.81, 6.34] kW, which is determined from the minimum and maximum supercapacitor and coolant temperatures and heat transfer expressions.

Appendix C. Electric Drive System Parameters
The EDS maximum mechanical power shown in Figure 2 is mildly extended at zero speed to a value of 1 kW to make vehicle movement possible from rest and is modeled to have continuous first derivatives as in [3]: The motor efficiency coefficient values at 25 • C are c d,1,25 • C = 5.08 · 10 −2 and c d,2,25 • C = 26.9 with rated speed of ω d,r = 5000π/30 rad/s. The range of electrical power values is found using Equations (30), (32), (33) and (A1). Also, η d,inv = 0.95, η dc = 1, and η f d = 0.98. The EDS operating temperature range used here is [0, 40] • C. Additional EDS thermal parameters include the thermal mass m d = 158.8 kg; the specific heat capacity 430 J/(kg· • C), a generic EDS value [23]; and h A,d = 2.43 · 10 3 W/ • C, which is scaled from data in [29]. The coolant power P d,clt ∈ [−97.3, 97.3] kW is determined from the minimum and maximum EDS and coolant temperatures and heat transfer expressions.

Appendix D. Vehicle Parameters
The Tesla Model S-like vehicle parameters in [3] are duplicated here: the frontal area A f r = 2.35 m 2 is obtained from a dimensioned frontal view, the drag coefficient C d = 0.24, rolling resistance C rr = 0.0092, wheel radius r whl = 0.345 m, gear ratio R f d = 9.73, and the total mass of the vehicle m v = 2184 kg includes two average passengers each of 79 kg. The maximum braking power is P max f = 250 kW.

Appendix E. Cooling System
The mass of the coolant, m clt = 14.0 kg, is estimated from the coolant volume of the Chevrolet Bolt and the density of 50% ethylene glycol and 50% water mix at 30 • C. Coolant specific heat is C clt = 3.47 · 10 3 J/(kg· • C). The value of P max hex is 85 kW, which is taken as 75% of the maximum possible cooling at an ambient temperature of 20 • C.