Skip to content

Battery

BattModel

__init__(pwr_pars)

Python version: 3.5 Created by: Thomas Herrmann (thomas.herrmann@tum.de) Created on: 01.04.2020

Documentation: Battery class for the optimization of global trajectories for electric race cars implemented in the CasADi modeling language.

Inputs: pwr_pars: powertrain parameters defined in the initialization file

battery_loss(p_des, p_loss_inv, p_loss_mot, p_in_inv=None)

Python version: 3.5 Created by: Thomas Herrmann Created on: 01.04.2020

Documentation: Defines a battery loss model that was trained on measurement data based on Gaussian Processes

Inputs: p_des: on wheels desired power [kW] p_loss_inv: inverter losses of all the inverters in the electric powertrain [kW] p_loss_mot: machine losses of all the electric machine in the electric powertrain [kW] p_in_inv: input power into a single inverter in the electric powertrain [kW]

extract_sol(w, sol_states)

Python version: 3.5 Created by: Thomas Herrmann Created on: 01.04.2020

Documentation: Defines function to retrieve values of optimized NLP battery states

Inputs: w: discrete optimized NLP decision variables (x and u) sol_states: numeric values belonging to the symbolic NLP decision variables w

get_increment(sf, temp_cool_b)

Python version: 3.5 Created by: Thomas Herrmann Created on: 01.04.2020

Documentation: Initializes symbolic temperature increment of battery (sf * dx/dt = dx/ds)

Inputs: sf: transformation factor dt/ds temp_cool_b: battery cooling liquid temperature [°C]

get_soc(sf)

Python version: 3.5 Created by: Thomas Herrmann Created on: 01.04.2020

Documentation: Initialize SOC increment of battery (sf * dx/dt = dx/ds)

get_thermal_resistance()

Python version: 3.5 Created by: Thomas Herrmann Created on: 01.04.2020

Documentation: Calculates thermal resistance of battery to be used within a lumped description

ini_nlp_state(x, u)

Python version: 3.5 Created by: Thomas Herrmann Created on: 01.04.2020

Documentation: Defines function to define battery states in NLP

Inputs: x: discrete NLP state u: discrete NLP control input

initialize()

Python version: 3.5 Created by: Thomas Herrmann Created on: 01.04.2020

Documentation: Initialization of necessary optimization variables (symbolic CasADi expressions) and states including limits.

internal_resistance()

Python version: 3.5 Created by: Thomas Herrmann Created on: 01.04.2020

Inputs: temp_batt_sym: symbolic description of battery temperature (can be battery.temp_batt (for use of ES in combination with ACADOS) or .temp_batt_n (for use with only CasADi and IPOPT))

Documentation: Outputs the battery internal resistance temperature dependently

ocv_voltage()

Python version: 3.5 Created by: Thomas Herrmann Created on: 01.04.2020

Documentation: Outputs the battery Open Circuit Voltage as a 3rd order polynom