1 Introduction and literature review

Hybrid power systems can be used to produce energy to meet demand at remote sites such as forward operating bases (FOBs), secured places outside of their own borders from which countries support combat operations. We use an optimization model to determine: (1) the procurement strategy, i.e., the number and type of energy-producing technologies selected, and (2) the dispatch strategy, i.e., the amount of energy provided by each of the technologies, to meet load at a FOB while minimizing cost and fuel use. The available technologies include diesel generators, photovoltaic cells (PV) and batteries, the latter of which allow us to store energy and provide dispatchable power quickly (Das et al. 2015; Liu et al. 2015). Without loss of generality, we consider lithium-ion batteries, which have both advantages and disadvantages over other commercially available battery types such as lead acid, nickel cadmium and nickel-metal hydride (Tan et al. 2013; Zhao et al. 2015).

Power output from a battery is influenced by many factors including its type, its capacity, its charge and discharge rates, the number of charge and discharge cycles it has undergone, and the conditions in which it is used, e.g., hot or cold climates. The behavior of the battery affects the hybrid system’s ability to perform efficiently and, therefore, to meet load. Limited by slow electrochemical processes, such as the formation of a solid-electrolyte interphase in the negative electrode (Pinson and Bazant 2013), capacity decreases in rechargeable batteries over thousands of cycles. We refer to this decrease as capacity fade.

Previous work incorporates a nonlinear set of battery constraints into a design and dispatch optimization model such as ours in which average battery output is modeled as a function of the “physics-based nonlinear, nonconvex relationship between current and voltage” (Scioletti et al. 2016). This work introduces a rate-capacity effect which allows for an adjusted state of charge of the battery. In their optimization model, termed (\({\mathcal{P}}\)), Scioletti et al. take into account the effects of the rate of discharge on battery capacity. This is an improvement over previous models because it lowers the overestimation of discharge capabilities. However, (\({\mathcal{P}}\)) does not consider capacity fade directly; rather, it limits the number of battery life cycles after which the battery cannot be used. We improve upon (\({\mathcal{P}}\)) by introducing a newer model, henceforth referred to as (\({\mathcal{C}}\)), that includes battery temperature and capacity fade effects. Instead of limiting battery life to a predetermined number of cycles, we calculate the loss of capacity within the battery based on its size, ambient temperature and ampere-hour throughput. The capacity fade model (\({\mathcal{C}}\)) is a mixed-integer nonlinear program (MINLP), which, for realistic instances, proves to be difficult to solve and, in fact, intractable after the horizon extends beyond 300 time periods. To increase tractability, we apply linearization techniques to the MINLP to create an approximate mixed-integer linear program (MILP). Although a solution from this model does not guarantee the feasibility and/or optimality of the MINLP, the former model can be an effective alternative that allows us to solve instances containing up to 8,760 hourly time periods (corresponding to one year’s worth of load data). We compare linearized versions of (\({\mathcal{C}}\)), with capacity fade, and (\({\mathcal{P}}\)), without capacity fade, and show that incorporating capacity fade can improve the level of detail in the corresponding model of a microgrid.

Several optimization papers provide methodologies and solutions for mixed-integer linear programs that address meeting energy loads (Scioletti et al. 2016; Morais et al. 2010; Pruitt et al. 2014; Goodall et al. 2017; Zachar and Daoutidis 2015). Pruitt et al. (2014) investigate a system that is grid-connected and incorporates a solid oxide fuel cell for cooling and heating, along with generators and PV. Zachar and Daoutidis (2015) also use an MILP to optimize a grid-connected DG system, but they consider wind and microturbines among their renewables. Morais et al. (2010) combine a fuel cell with wind and batteries in their model. Several more use both exact and heuristic optimization techniques (Ashok 2007; Daud and Ismail 2012; Katsigiannis and Georgilakis 2008; Bala and Siddique 2009; Koutroulis et al. 2006; Merei et al. 2013) or the simulation model Hybrid Optimization Model for Electric Renewables (HOMER) (Givler and Lilienthal 2005; Kamel and Dahl 2005; Rehman and Al-Hadhrami 2010; Shaahid and El-Amin 2009).

Papers that model distributed generation with batteries include Bala and Siddique (2009), Rehman and Al-Hadhrami (2010), Kaldellis et al. (2011), Scioletti et al. (2017), Merei et al. (2013), Shaahid and El-Amin (2009), Ikeda and Ooka (2015), Morais et al. (2010), Manwell and McGowan (1993), and Dufó-Lopez and Bernal-Agustin (2005). Rehman and Al-Hadhrami (2010) and Shaahid and El-Amin (2009) employ HOMER, which simulates hybrid systems, in their work. HOMER incorporates a kinetic battery model (Manwell and McGowan 1993), which assumes that the change in capacity is a nonlinear function of the charge and discharge rates and models a battery’s capacity as two tanks, one that is immediately available for discharge and another that is chemically bound. Bala and Siddique (2009) use the Hybrid Optimization by Genetic Algorithms model developed by Dufó-Lopez and Bernal-Agustin (2005). This model improves on the kinetic battery model (Manwell and McGowan 1993) used in HOMER by optimizing over the battery state of charge, as opposed to a user-entered value. Kaldellis et al. (2011) consider a PV, wind and battery system for 10- and 20-year time horizons. They employ lead-acid batteries but do not take into account battery degradation over time. They cite Hua et al. (2006), who warn about the capacity loss in lead-acid batteries operated in remote locations due to sulfation of the electrodes and stratification of the electrolyte. In Hua et al. (2006), the authors show that batteries maintain capacity well, under test conditions, over two- and three-year spans. Merei et al. (2013) model three battery types—lead-acid, lithium-ion and vanadium redox-flow—in a DG system with wind, PV and diesel generators. Their lithium-ion battery model is based on the work of Buller (2002), but they introduce an aging factor that depends on state of charge, temperature and data. Our work differs from that of Merei et al. (2013) in that they use a genetic algorithm, implemented in Matlab and Simulink, while we use an optimization model and provide a more detailed, mathematical approach to battery capacity fade. Morais et al. (2010) use an MILP that includes wind, PV, fuel cells and battery storage; however, their constraints do not account for capacity fade or temperature effects.

Our main contribution lies in the introduction of a set of constraints to a mixed-integer programming model that incorporates battery capacity fade and temperature effects; models that do not include rate-capacity effects overestimate discharge capabilities. Such microgrid models exist, as do models that capture battery capacity fade and temperature effects (Pinson and Bazant 2013; Hua et al. 2006). However, to the best of our knowledge, these models have not been combined. We use explicit, mathematical expressions for the capacity fade that discretize time; to enhance tractability, we linearize these expressions. The remainder of this paper is organized as follows: Sect. 2 details capacity fade behavior. Section 3 provides a mathematical model that incorporates the capacity fade behavior from Sect. 2, while Sect. 4 outlines a heuristic we use to help solve our model. Section 5 discusses the corresponding results, and Sect. 6 concludes.

2 Capacity fade effects

In this section, we detail battery capacity fade effects and introduce the necessary simplifications to some battery chemistry equations that allow us to model these effects in (\({\mathcal{C}}\)). These include limits to the charge and discharge rate of the battery given other system constraints, as well as the linearization of nonlinear curves defining the relationship between percentage capacity lost and ampere-hour throughput, using piecewise linear functions.

We employ the following notation to provide the battery chemistry equations relevant to (\({\mathcal{C}}\)). Our notational convention is as follows: lower-case letters (a) represent parameters and indices, upper-case letters (A) represent variables, and script upper-case letters (\({\mathcal{A}}\)) represent sets. Superscripts and accents distinguish between parameters and variables that use the same base letter, while subscripts identify elements of a set. Some parameters and variables are defined only for certain set elements, which are listed in each definition. Plus signs (\(+\)) indicate power entering a technology (i.e., power in); minus signs (−) indicate power exiting (i.e., power out). Units are provided with each parameter and variable definition. The term “twins,” denoted by the subscript k, refers to a tuple or a multiple of a certain technology type.

Symbol

Explanation

Units

Sets

\(b \in {\mathcal{B}}\)

Batteries

(integer)

\(k \in {\mathcal{K}}\)

Battery twins

(integer)

\(n \in {\mathcal{N}}\)

Total pieces of slope values in piecewise linear function

(integer)

\(t \in {\mathcal{T}}\)

Time periods

(h)

Parameters

\({\bar{a}}_b\)

Ampere-hour threshold for percentage capacity change (leveling) of battery b

(Ah)

\(b_b^{rate}\)

Coefficient of loss as a function of \(c^{rate}\) for battery b

(J/mol)

\(c_b^{rate}\)

Charge or discharge rate of battery b

(unitless)

\(k^c_b, k^r_b\)

Temperature coefficient for capacity and resistance, respectively, of battery b

(K)

\(m_{bn}\)

Slope coefficient for ampere-hour throughput for battery b, piece n

[(Ah)\(^{-0.45}\)]

\(q_{bt}\)

Capacity loss LiFePO\(_4\) constant (includes temperature) for battery b in time period t

[(Ah)\(^{-0.55}\)]

R

Universal gas constant

(JK\(^{-1}\)mol\(^{-1}\))

\(s_{b}\)

Size of battery b

(Ah)

\(\theta ^{ref}_b\)

Battery b reference temperature

(K)

\(\theta _{t}\)

Ambient temperature in time period t

(K)

\(\theta ^c_{bt}\)

Capacity temperature coefficient of battery b in time period t

(unitless)

\(\theta ^r_{bt}\)

Resistant temperature coefficient of battery b in time period t

(unitless)

 

\(\theta ^c_{bt} = e^{k^c_b \Big (\frac{1}{\theta _{t}}-\frac{1}{\theta ^{ref}_b}\Big )} \;\;\; \forall b \in {\mathcal{B}}, t \in {\mathcal{T}}\)

(1)

 

\(\theta ^r_{bt} = e^{k^r_b \Big (\frac{1}{\theta _{t}}-\frac{1}{\theta ^{ref}_b}\Big )}\;\;\; \forall b \in {\mathcal{B}}, t \in {\mathcal{T}}\)

(2)

Variables

\(A_{bkt}\)

Cumulative ampere-hour throughput (charge and discharge) in battery b twin k up to time period t

(Ah)

\(Q_{bkt}\)

Battery b twin k percentage capacity loss up to time period t

(percentage)

The percentage capacity loss of battery b, twin k, up to time period t (\(Q_{bkt}\)), is a function of temperature, size of the battery, and the ampere-hour throughput. It can be calculated using the following equation (Wang et al. 2011):

$$\begin{aligned} Q_{bkt} = b^{rate}_b\cdot e^{\Big (\frac{-31,700 + 370.3\cdot c^{rate}_b}{R \cdot \theta _{t}} \Big )} (A_{bkt})^{0.55} \;\;\; \forall b \in {\mathcal{B}}, k \in {\mathcal{K}}, t \in {\mathcal{T}}, \end{aligned}$$
(3)

in which

$$\begin{aligned} b^{rate}_b= 448.96(c^{rate}_b)^2 - 6301.1\cdot c^{rate}_b + 33,840 \;\;\; \forall b \in {\mathcal{B}}.\\ \end{aligned}$$

Assumption of a constant charge and discharge rate


C rate, \(c^{rate}_b\), is a measure of the rate of battery charge and/or discharge relative to its maximum capacity and is defined as the amount of current one is able to extract from a battery that is in a fully charged state, i.e., state of charge equals one, until it is in a fully discharged state, i.e., state of charge equals zero, in 1 h; we assume that there are no transport limitations. For example, if a battery has a capacity of 4800 mAh, a 1C rate corresponds to 4800 mA. And, if the battery is discharged at low current (e.g., 48 mA or a C/100 rate), the battery holds some charge for 100 h. In our case, the value varies only from 0C to 1C, because 1 h is the minimum time step in our model. If the battery discharges entirely in 1 h at a rate of 1C, it discharges completely in 2 h at a rate of C/2 (MIT Electric Vehicle Team 2005). We use C/2 as an average rate of battery operations in order to choose the parameter values for simplifying the expression given in Eq. (3), the result of which is given in Eq. (4):

$$\begin{aligned} Q_{bkt} = 31,630\cdot e^{\Big (\frac{-31,514.9}{R \cdot \theta _{t}} \Big )} (A_{bkt})^{0.55} \;\;\; \forall b \in {\mathcal{B}}, k \in {\mathcal{K}}, t \in {\mathcal{T}} \end{aligned}$$
(4)

Choosing a C/2 rate of cycling as an average current does not compromise the accuracy of Eq. (3) for the range of operations shown in Fig. 1, which (1) compares the output of the simplified expression given in Eq. (4) with the general expression given in Eq. (3), and (2) shows that, for low rates of charge and/or discharge, the difference in capacity loss between 1C and C/10 is negligible.

Fig. 1
figure 1

Percentage capacity lost through battery use at different C rates with the simplified formula given in Eq. (4). Note that the curve generated using the simplified formula lies on top of the 1C rate, C/2 rate and C/10 rate curves


Calculating \(Q_{bkt}\) for differently sized batteries


The expression derived in Eq. (4) is valid for an A123 battery with 2.44 ampere hour (Ah) capacity. However, the optimization model \(\mathcal{(C)}\) chooses from different battery sizes. To consider several different battery sizes, we scale the size using the ampere hour calculation in Eq. (5):

$$\begin{aligned} Q_{bkt} = 31,630\cdot e^{\Big (\frac{-31,514.9}{R\cdot \theta _{t}} \Big )} \Big (A_{bkt} \cdot \frac{2.44}{s_b} \Big )^{0.55} \;\;\; \forall b \in {\mathcal{B}}, k \in {\mathcal{K}}, t \in {\mathcal{T}} \end{aligned}$$
(5)

Equation (5) shows that a battery with size 4.88 Ah, \(s_b\), has less degradation for the same ampere-hour throughput relative to that of a 2.44 Ah battery. Figure 2 plots the percentage capacity lost against ampere-hour throughput for up to 8 million Ah for six different battery sizes.

Fig. 2
figure 2

Percentage capacity lost, \(Q_{bkt}\), versus ampere-hour throughput for different battery sizes, \(s_b\) (plots derived from Eq. (5))

The approximate ampere-hour throughput that leads to a given percentage degradation can be calculated using Eq. (6). We give an example of that calculation using 20% degradation and provide a summary for six different battery sizes, from 25 to 250 kWh, in Table 1. We choose 20% to illustrate the effect of capacity fade as a function of battery size given by Eq. (6).

$$\begin{aligned} 20 = 31,630\cdot e^{\Big (\frac{-31,514.9}{8.3\cdot 298} \Big )} \Big (A_{bkt} \cdot \frac{2.44}{s_b} \Big )^{0.55} \;\;\; \forall b \in {\mathcal{B}}, k \in {\mathcal{K}}, t \in {\mathcal{T}} \end{aligned}$$
(6)
Table 1 Different battery sizes and Ah throughput that cause 20% capacity loss, in approximately 3600 equivalent cycles

Linearization of ampere-hour throughput term


The term \((A_{bkt})^{0.55}\) causes computational issues in the optimization framework, so we simplify the term by using piecewise linear approximations based on the slope parameter \(m_{bn}\), where \(n \in {\mathcal{N}} = \{1, 2\}\), and a breakpoint \({\bar{a}}_b\), as shown in Fig. 3. The values for \(m_{b1}\), \(m_{b2}\) and \({\bar{a}}_b\) are calculated so as to minimize the sum of squared errors between the nonlinear and piecewise linear functions.

For \(A_{bkt} < {\bar{a}}_b\):

$$\begin{aligned} Q_{bkt} = 31,630\cdot e^{\Big (\frac{-31,514.9}{R \cdot \theta _{t}} \Big )} (A_{bkt} \cdot m_{b1}) \;\;\; \forall b \in {\mathcal{B}}, k \in {\mathcal{K}}, t \in {\mathcal{T}} \end{aligned}$$
(7)

For \(A_{bkt} \ge {\bar{a}}_b\):

$$\begin{aligned} Q_{bkt} = 31,630\cdot e^{\Big (\frac{-31,514.9}{R \cdot \theta _{t}} \Big )} (m_{b1}{\bar{a}}_b+m_{b2}(A_{bkt} - {\bar{a}}_b)) \;\;\; \forall b \in {\mathcal{B}}, k \in {\mathcal{K}}, t \in {\mathcal{T}} \end{aligned}$$
(8)

where, in Eqs. (7) and (8), \(m_{b1}\) is the slope of the line in the region \(A_{bkt} < {\bar{a}}_b\) and \(m_{b2}\) is the slope of the line after \(A_{bkt}\) equals or surpasses the value of \({\bar{a}}_b\). The values of these slope parameters are obtained by minimizing the error between the linear approximations in Eqs. (7) and (8) and the original curves given by Eq. (5). Table 2 provides the values of the parameters for battery sizes between 25 kWh and 250 kWh. Figure 3 shows a plot of the linear approximation of two of these sizes (i.e., 25 kWh and 250 kWh).

Table 2 Parameter values used in piecewise linear approximation for the percentage capacity loss of different batteries
Fig. 3
figure 3

Linear approximation for capacity loss (%) in two different battery systems, 25 kWh and 250 kWh, as a function of Amphere hour throughput

In practical applications, battery operations are subject to variations in temperature and current that occur over time. Therefore, we evaluate capacity degradation (i.e., percentage capacity loss) for each battery and twin for every time period (\(\Delta Q_{bkt}\)) as a function of temperature and ampere-hour throughput.


For \(A_{bkt} < {\bar{a}}_b\):

$$\begin{aligned} \Delta Q_{bkt} = 31,630\cdot e^{\Big (\frac{-31,514.9}{R \cdot \theta _{t}} \Big )} (m_{b1} \cdot \Delta A_{bkt}) \;\;\; \forall b \in {\mathcal{B}}, k \in {\mathcal{K}}, t \in {\mathcal{T}} \end{aligned}$$
(9)

For \(A_{bkt} \ge {\bar{a}}_b\):

$$\begin{aligned} \Delta Q_{bkt} = 31,630\cdot e^{\Big (\frac{-31,514.9}{R \cdot \theta _{t}} \Big )} (m_{b2}\cdot \Delta A_{bkt}) \;\;\; \forall b \in {\mathcal{B}}, k \in {\mathcal{K}}, t \in {\mathcal{T}} \end{aligned}$$
(10)

where, as we show in Sect. 3.4 and the related constraints, the use of a binary variable \(Y_{bknt}\) controls the implementation of this piecewise linear function. Note that \(\Delta Q_{bkt}\) is the percentage capacity loss and \(\Delta A_{bkt}\) is the ampere-hour throughput in a given time period t, whereas \(Q_{bkt}\) and \(A_{bkt}\) represent the cumulative percentage capacity loss and ampere-hour throughput, respectively, for the time horizon from the initial time period up to time t. Equations (9) and (10) can be notationally simplified by defining \(q_{bt} = 31,630\cdot e^{(-31,514.9/(R \theta _{t}))}\).


For \(A_{bkt} < {\bar{a}}_b\):

$$\begin{aligned} \Delta Q_{bkt} = q_{bt} (m_{b1}\cdot \Delta A_{bkt}) \;\;\; \forall b \in {\mathcal{B}}, k \in {\mathcal{K}}, t \in {\mathcal{T}} \end{aligned}$$
(11)

For \(A_{bkt} \ge {\bar{a}}_b\):

$$\begin{aligned} \Delta Q_{bkt} = q_{bt} (m_{b2}\cdot \Delta A_{bkt}) \;\;\; \forall b \in {\mathcal{B}}, k \in {\mathcal{K}}, t \in {\mathcal{T}} \end{aligned}$$
(12)

3 Capacity fade portion of the optimization model

In this section, we provide a nonlinear constraint set for the part of the battery model that incorporates capacity fade; we term this part (\({\mathcal{C}}^1\)). The objective function and the remainder of the constraint set, which we term (\({\mathcal{C}}^2\)), are given in Appendix 1. The combination, then, of (\({\mathcal{C}}^1\)) and (\({\mathcal{C}}^2\)) forms the model \(\mathcal{(C)}\). We introduce additional notation here; notation used but not introduced here is given in Sect. 2, and the notational conventions there apply.

Symbol

Explanation

Units

Sets

\(j \in {\mathcal{J}}\)

All battery and generator technologies

 

\(k \in {\hat{\mathcal{B}}}_b\)

All battery twins of type b

 

\(k \in \hat{{\mathcal{J}}}_j\)

Identical twins of technology j, given by size, type, and manufacturer

 

Parameters

\(\alpha ^r_b, \alpha ^c_b\)

Loss terms for resistance and rate capacity for battery b, respectively

(Ohm, h)

\(a^v_b, b^v_b\)

Voltage slope and intercept coefficients for battery b, respectively

(V)

\(b^0_b\)

Initial state of charge of battery b

(unitless)

\(\hat{c}^-_{bt}\)

Rate-capacity slope of battery b in time period t

(h)

\(c^{ref}_b\)

Manufacturer-specified initial capacity of battery b

(Ah)

\(r^{ref}_{bt}\)

Internal resistance of battery b as a function of temperature in time period t

(Ohm)

\(\tau \)

Length of one time period

(h)

Variables

\(B^{soc}_{bkt}\)

State of charge of battery b twin k in time period t

(fraction)

\(C^{eff} _{bkt}\)

Variable capacity of battery b twin k in time period t

(Ah)

\(C^-_{bkt}\)

Battery b twin k discharge capacity in time period t

(h)

\(I^{+}_{bkt}, I^{-}_{bkt}\)

Charge and discharge current of battery b twin k in time period t, respectively

(A)

\(P^{+}_{bkt}, P^{-}_{bkt}\)

Aggregate power into and out of battery b twin k in time period t, respectively

(W)

\(R^{int}_{bkt}\)

Internal resistance of battery b twin k in time period t

(Ohm)

\(W_{jk}\)

1 if technology j, twin k is procured, 0 otherwise

(binary)

\(Y_{bknt}\)

1 if battery b twin k piece n is used in time period t, 0 otherwise

(binary)

3.1 Mathematical formulation

Problem \(({\mathcal{C}}^1)\)

subject to


Battery power: See Sect.  3.2

$$\begin{aligned} P^+_{bkt}&= (a^{v}_bb^{0}_b+b^v_b+ R^{int}_{bkt}I^+_{bkt})I^+_{bkt}\;\;\; \forall b \in {\mathcal{B}}, k \in {\hat{\mathcal{B}}}_b, t =1 \end{aligned}$$
(13a)
$$\begin{aligned} P^-_{bkt}&= (a^{v}_bb^{0}_b+b^v_b- R^{int}_{bkt} I^-_{bkt})I^-_{bkt}\;\;\; \forall b \in {\mathcal{B}}, k \in {\hat{\mathcal{B}}}_b,t =1 \end{aligned}$$
(13b)
$$\begin{aligned} P^+_{bkt}&= (a^{v}_bB^{soc}_{bk,t-1}+b^v_b + R^{int}_{bkt} I^+_{bkt})I^+_{bkt}\;\;\; \forall b \in {\mathcal{B}}, k \in {\hat{\mathcal{B}}}_b, t \in {\mathcal{T}} \setminus \{1\} \end{aligned}$$
(13c)
$$\begin{aligned} P^-_{bkt}&= (a^{v}_bB^{soc}_{bk,t-1}+b^v_b- R^{int}_{bkt} I^-_{bkt})I^-_{bkt}\;\;\; \forall b \in {\mathcal{B}}, k \in {\hat{\mathcal{B}}}_b, t \in {\mathcal{T}} \setminus \{1\} \end{aligned}$$
(13d)

Capacity and current: See Sect.  3.3

$$\begin{aligned} C^{eff} _{bkt}\cdot B^{soc}_{bkt}&= c^{ref}_{b}\cdot b^0_b \cdot W_{bk} + \tau (I^{+}_{bkt} - I^{-}_{bkt}) \;\;\; \forall b \in {\mathcal{B}}, k \in {\hat{\mathcal{B}}}_b, t =1 \end{aligned}$$
(14a)
$$\begin{aligned} C^{eff} _{bkt}\cdot B^{soc}_{bkt}&= C^{eff} _{bk,t-1}\cdot B^{soc}_{bk,t-1} + \tau (I^{+}_{bkt} - I^{-}_{bkt}) \;\;\; \forall b \in {\mathcal{B}}, k \in {\hat{\mathcal{B}}}_b, t \in {\mathcal{T}}\setminus \{1\} \end{aligned}$$
(14b)
$$\begin{aligned} I^{-}_{bkt}\le & \Bigg (\frac{c^{ref}_{b}}{\tau +C^-_{bkt}}\Bigg )b^{0}_b \cdot W_{bk} \;\;\; \forall b \in {\mathcal{B}}, k \in {\hat{\mathcal{B}}}_b, t =1 \end{aligned}$$
(14c)
$$\begin{aligned} I^{-}_{bkt}&\le \Bigg (\frac{C^{eff} _{bk,t-1}}{\tau +C^-_{bkt}}\Bigg )B^{soc}_{bk,t-1}\;\;\; \forall b \in {\mathcal{B}}, k \in {\hat{\mathcal{B}}}_b, t \in {\mathcal{T}}\setminus \{1\} \end{aligned}$$
(14d)

Capacity fade: See Sect.  3.4

$$\begin{aligned} R^{int}_{bkt}& = r^{ref}_{bt} \Big (W_{bk}+\alpha ^r_b Q_{bkt} \Big ) \quad \forall b \in {\mathcal{B}}, k \in {\hat{\mathcal{B}}}_b, t \in {\mathcal{T}} \end{aligned}$$
(15a)
$$\begin{aligned} Q_{bkt}& = \tau q_{bt} \sum _{n \in {\mathcal{N}}}m_{bn}(I^{+}_{bkt} + I^{-}_{bkt})Y_{bknt} \;\;\; \forall b \in {\mathcal{B}}, k \in {\hat{\mathcal{B}}}_b, t =1 \end{aligned}$$
(15b)
$$\begin{aligned} Q_{bkt} - Q_{bk,t-1}&= \tau q_{bt}\sum _{n \in {\mathcal{N}}} m_{bn}(I^+_{bkt} +I^-_{bkt})Y_{bknt} \;\;\; \forall b \in {\mathcal{B}}, k \in {\hat{\mathcal{B}}}_b, t \in {\mathcal{T}}\setminus \{1\} \end{aligned}$$
(15c)
$$\begin{aligned} C^{eff} _{bkt}&= c^{ref}_b \cdot W_{bk} \Big (1-\frac{Q_{bkt}}{100} \Big ) \quad \forall b \in {\mathcal{B}}, k \in {\hat{\mathcal{B}}}_b, t \in {\mathcal{T}} \end{aligned}$$
(15d)
$$\begin{aligned} C^{-}_{bkt}&= \hat{c}^{-}_{bt} \Big ( W_{bk}+\alpha ^c_b Q_{bkt} \Big ) \quad \forall b \in {\mathcal{B}}, k \in {\hat{\mathcal{B}}}_b, t \in {\mathcal{T}} \end{aligned}$$
(15e)
$$\begin{aligned} \sum _{n \in {\mathcal{N}}} Y_{bknt}&= W_{bk} \quad \forall b \in {\mathcal{B}}, k \in {\hat{\mathcal{B}}}_b, t \in {\mathcal{T}} \end{aligned}$$
(15f)
$$\begin{aligned} A_{bkt}&= \tau (I^{+}_{bkt} + I^{-}_{bkt}) \quad \forall b \in {\mathcal{B}}, k \in {\hat{\mathcal{B}}}_b, t=1 \end{aligned}$$
(15g)
$$\begin{aligned} A_{bkt}&= A_{bk,t-1} + \tau (I^+_{bkt} +I^-_{bkt}) \quad \forall b \in {\mathcal{B}}, k \in {\hat{\mathcal{B}}}_b, t \in {\mathcal{T}}\setminus \{1\} \end{aligned}$$
(15h)
$$\begin{aligned} A_{bkt}&\ge {\bar{a}}_b (W_{bk} - Y_{bknt}) \ \ \forall b \in {\mathcal{B}}, k \in {\hat{\mathcal{B}}}_b, t \in {\mathcal{T}}, n=1 \end{aligned}$$
(15i)
$$\begin{aligned} A_{bkt}&\ge {\bar{a}}_b Y_{bknt} \quad \forall b \in {\mathcal{B}}, k \in {\hat{\mathcal{B}}}_b, t \in {\mathcal{T}}, n=2 \end{aligned}$$
(15j)

Nonnegativity and binary restrictions

$$\begin{aligned}&A_{bkt}, B^{soc}_{bkt}, C^{eff} _{bkt}, C^-_{bkt}, I^+_{bkt}, I^-_{bkt}, P^+_{bkt}, P^-_{bkt}, Q_{bkt}, R^{int}_{bkt} \ge 0 &\quad \forall b \in {\mathcal{B}}, k \in {\hat{\mathcal{B}}}_b, t \in {\mathcal{T}} \end{aligned}$$
(16a)
$$\begin{aligned}&W_{bk} \quad {\text {binary}} \quad \forall {b} \in {\mathcal{B}}, {k} \in {\hat{\mathcal{B}}}_b \end{aligned}$$
(16b)
$$\begin{aligned}&Y_{bknt} \quad {\text {binary}} \quad \forall {b} \in {\mathcal{B}}, {k} \in {\hat{\mathcal{B}}}_b, {n} \in {\mathcal{N}}, {t} \in {\mathcal{T}} \end{aligned}$$
(16c)

3.2 Battery power

Constraints (13a) and (13b) show the nonlinear relationship between power, current, and resistance for power into and power out of the battery, respectively, in the initial time period, while (13c) and (13d) give the power into and out of the battery for every subsequent time period.

3.3 Capacity and current

Equations (14a) and (14b) calculate the available capacity of the battery in the initial and each subsequent time period, respectively, based on the amount of charge and discharge current passing through the battery. The variable \(I^{-}_{bkt}\) is maximally bounded in constraints (14c) and (14d) by the relationship between the capacity, state of charge, and the discharge capacity of the battery for the initial and subsequent time periods, respectively.

3.4 Capacity fade

As the battery ages, its available capacity decreases while the resistance increases. Equation (15a) shows the effects of temperature and degradation on the resistance of a battery. Constraints (15b) and (15c) provide the relationship between the cumulative capacity loss and the current in the initial and all subsequent time periods, respectively. The variable capacity is calculated based on capacity degradation according to a percentage loss over time such that the capacity in each time period is less than the original reference capacity of the battery; see constraint equation (15d). Constraint (15e) relates the discharge capacity to the cumulative loss in each time period. Constraint (15f) equates the sum \(\sum \nolimits _{n \in {\mathcal{N}}} Y_{bknt}\) to one if the battery is procured, and zero otherwise. This ensures that the slope of the piecewise linear function is either (\(m_{b1}\)) or (\(m_{b2}\)), as shown in Fig. 3. Constraints (15g) and (15h) calculate the change in ampere-hour throughput in each time period based on the current charging and discharging from the battery. Constraints (15i) and (15j) ensure that once \(A_{bkt}\) surpasses the value of \({\bar{a}}_b\), n shifts from one to two. For any values of \(A_{bkt}\) less than \({\bar{a}}_b\), n is equal to one.

4 Heuristic

We present a heuristic, which we term \(\mathcal{H}\), that produces an initial feasible solution to (\({\mathcal{C}}\)) by simulating two different, myopic dispatch policies, \(\mathcal{H}^1\)and \(\mathcal{H}^2\), for each possible combination of technologies. We simulate both policies, and choose the one with the lower cost. We term the design and dispatch solution a design-dispatch pair. The heuristic \(\mathcal{H}\) supplies the lowest-cost design-dispatch pair to a branch-and-bound solver as a “warm start,” which can reduce solution time significantly. Additionally, because these dispatch policies do not include any information on future time periods, they are easier to implement in a microgrid controller than a strategy that includes clairvoyance of future loads and PV resources.

We adopt the dispatch policies developed by Scioletti et al. (2017), which aim to (1) maximize fuel efficiency by attempting to run the diesel generators at their rated capacity whenever possible, (2) use the maximum allowable energy from PV systems to minimize fuel costs, and (3) employ the batteries to balance the load and provide additional spinning reserve while meeting goals (1) and (2). Both \(\mathcal{H}^1\)and \(\mathcal{H}^2\)  initialize all diesel generators to be off at each time period, and incrementally add diesel capacity by turning off the lowest-capacity running generator and turning on that of the next larger size if it is offline; otherwise, the policies turn on the smallest generator in the design. \(\mathcal{H}^1\) stops adding capacity when the load and spinning reserve requirements are met for the time period, while \(\mathcal{H}^2\) continues until an exchange or addition precludes diesel generators from running at their rated capacities without curtailing PV power output. Figure 4 provides a flowchart for \(\mathcal{H}^2\); an analogous flowchart for \(\mathcal{H}^1\) is available in Scioletti et al. (2017), and pseudocode for \(\mathcal{H}^1\) is available in Appendix 2.

Fig. 4
figure 4

A flowchart illustrating the myopic dispatch strategy for heuristic \(\mathcal{H}^2\) under a given design decision

Our heuristic differs from the one developed by Scioletti et al. (2017) in how the upper bounds on battery charge and discharge are calculated, and the assignment of battery dispatch decision variables given power flow in each time period. This allows our heuristic to provide a design-dispatch pair that is feasible for the battery constraints. In what follows, we develop a method for calculating upper bounds on battery power input and output, and then provide procedures for assigning dispatch decisions feasible for \(({\mathcal{C}})\) when battery power flow is provided as input.

For the derivations in the following sections, we use this notation, in addition to that already defined:

Symbol

Explanation

Units

Parameters

\(\underline{\imath }_b, \bar{\imath }_b\)

Minimum and maximum current allowed for battery b, respectively

(A)

\(\underline{s}_b, {\bar{s}}_b\)

Minimum and maximum allowed state of charge in battery b, respectively

(fraction)

\({\bar{p}}_{b}\)

Maximum power rating of battery b

(W)

4.1 Maximum discharge power

Calculating the maximum charge or discharge power for a battery requires the state of the battery in the previous time period (\(t-1\)), which is defined by \(Q_{bk,t-1}\), \(B^{soc}_{bk,t-1}\), and \(A_{bk,t-1}\). With these inputs, we can obtain the maximum current into or out of the battery, which, in turn, inform the maximum charge or discharge power in time period t, respectively.

Let \(\bar{I}^-_{bkt}\) be the maximum discharge current for battery b, twin k in period t, given the battery’s state at \(t-1\). Constraints (14c)–(14d) provide an upper bound for \(I^-_{bkt}\) that uses \(C^{eff} _{bk,t-1}\), \(B^{soc}_{bk,t-1}\), and \(C^-_{bkt}\). The former two variables are inputs for \(t>1\), and are equal to \(c^{ref}_b\) and \(b^0_b\), respectively, for \(t=1\). Constraint (15e) shows that \(C^-_{bkt}\) is a function of \(Q_{bkt}\), which, in turn, is a function of the inputs \(Q_{bk,t-1}\) and \(Y_{bknt}\), and the variable \({I}^-_{bkt}\), in constraints (15b) and (15c), with \(Q_{bk,t-1} \leftarrow 0\) for \(t=1\). We therefore substitute \(Q_{bkt}\) and \(C^-_{bkt}\) with the right-hand sides of Eqs. (15b)–(15c) and Eq. (15e), respectively, to obtain the following quadratic equations, which we solve for the variable \(\bar{I}^-_{bkt}\):

$$\begin{aligned}&\left( \hat{c}^-_{bt} \alpha ^c_b \tau q_{bt} m_{bn} \right) \left( \bar{I}^-_{bkt}\right) ^2 + \left( \tau + \hat{c}^-_{bt}\right) \bar{I}^-_{bkt} - c^{ref}_b b^0_b = 0,\quad \forall b \in {\mathcal{B}}, k \in \hat{{\mathcal{B}}}_b, t=1 \end{aligned}$$
(17a)
$$\begin{aligned}&\left( \hat{c}^-_{bt} \alpha ^c_b \tau q_{bt} m_{bn} \right) \left( \bar{I}^-_{bkt}\right) ^2 + \left( \tau + \hat{c}^-_{bt} \left( 1 + \alpha ^c_b Q_{bk,t-1}\right) \right) \bar{I}^-_{bkt} - C^{eff} _{bk,t-1} B^{soc}_{bk,t-1} = 0, \\&\quad \forall b \in {\mathcal{B}}, k \in \hat{{\mathcal{B}}}_b, t \in {\mathcal{T}}\setminus \{1\}. \end{aligned}$$
(17b)

Section “Maximum discharge current” of Appendix 3 details the full derivation of Eq. (17b), from which we assign the smallest positive-valued root to \(\bar{I}^-_{bkt}\). We then make the adjustment:

$$\begin{aligned}&\bar{I}^-_{bkt} \leftarrow \min \{\bar{I}^-_{bkt}, c^{ref}_b(b^0_b-\underline{s}_b)/\tau , \bar{\imath }_b\},\ t=1\\&\bar{I}^-_{bkt} \leftarrow \min \{\bar{I}^-_{bkt}, C^{eff} _{bk,t-1}(B^{soc}_{bk,t-1}-\underline{s}_b)/\tau , \bar{\imath }_b\},\ t \in {\mathcal{T}}\setminus \{1\}, \end{aligned}$$

to ensure that \(I^-_{bkt}=\bar{I}^-_{bkt}\) is feasible for constraints (14a), (14b), and the simple bounds on discharge current (see constraint (27c)).

We note that the value \(m_{bn}\) used to determine \(Q_{bkt}\) in constraints (15b) and (15c) depends on \(A_{bkt}\), which, in turn, depends on the value of \({I}^-_{bkt}\) per constraints (15g) and (15h). Heuristic \(\mathcal{H}\) uses \(m_{b1}\) when \(A_{bk,t-1} \le {\bar{a}}_b\), and \(m_{b2}\) otherwise as a first pass; after calculating \(A_{bkt}\), \(\mathcal{H}\) determines whether a switch from \(m_{b1}\) to \(m_{b2}\) is necessary, i.e., \(A_{bk,t-1} \le {\bar{a}}_b < A_{bkt}\), and resolves Eqs. (17a)–(17b) using \(m_{b2}\) as needed.

Next, we use \(\bar{I}^-_{bkt}\) as input to update \(Q_{bkt}\) according to Eqs. (15b) and (15c), which we use to calculate \(R^{int}_{bkt}\) via constraint (15a). Then, constraints (13b), (13d) and the simple bounds on power output (see constraint (27b)) are used to obtain the maximum power output for the battery in period t, which we call \(\bar{P}^-_{bkt}\):

$$\begin{aligned} \bar{P}^-_{bkt}&= \min \left\{ {\bar{p}}_b, (a^v_b b^0_b + b^v_b - r^{ref}_{bt} \bar{I}^-_{bkt}) \bar{I}^-_{bkt}\right\} ,\ \forall b \in {\mathcal{B}}, k \in \hat{{\mathcal{B}}}_b, t =1 \end{aligned}$$
(18a)
$$\begin{aligned} \bar{P}^-_{bkt}&= \min \left\{ {\bar{p}}_b, (a^v_b B^{soc}_{bk,t-1} + b^v_b - (r^{ref}_{bt} (1+\alpha ^r_b Q_{bkt})) \bar{I}^-_{bkt}) \bar{I}^-_{bkt}\right\} ,\forall b \in {\mathcal{B}}, k \in \hat{{\mathcal{B}}}_b, t \in {\mathcal{T}}\setminus \{1\}. \end{aligned}$$
(18b)

4.2 Maximum charge power

Upper bounds on the charge current for battery b, twin k in period t are determined by the simple bounds on battery state of charge and charge current in constraints (27f) and (27d), respectively, and the state-of-charge tracking in constraints (14a) and (14b). The latter constraint includes \(C^{eff} _{bkt}\), which requires the value of \(Q_{bkt}\) in constraint (15d). Therefore, we apply substitutions similar to those of Sect. 4.1 to obtain the maximum charge current, which we call \(\bar{I}^+_{bkt}\):

$$\begin{aligned} \bar{I}^+_{bkt}&= \min \left\{ \bar{\imath }_b, \frac{c^{ref}_b ({\bar{s}}_b - b^0_b)}{\tau + \frac{ {\bar{s}}_b c^{ref}_b \tau q_{bt} m_{bn}}{100}} \right\} ,\ \forall b \in {\mathcal{B}}, k \in \hat{{\mathcal{B}}}_b, t =1 \end{aligned}$$
(19a)
$$\begin{aligned} \bar{I}^+_{bkt}&= \min \left\{ \bar{\imath }_b, \frac{{\bar{s}}_b c^{ref}_b \left( 1-\frac{Q_{bk,t-1}}{100}\right) - C^{eff} _{bk,t-1} B^{soc}_{bk,t-1}}{\tau + \frac{ {\bar{s}}_b c^{ref}_b \tau q_{bt} m_{bn}}{100}} \right\} ,\ \forall b \in {\mathcal{B}}, k \in \hat{{\mathcal{B}}}_b, t \in {\mathcal{T}}\setminus \{1\}. \end{aligned}$$
(19b)

Section “Maximum charge current” of Appendix 3 details the derivation in Eq. (19b). To obtain \(\bar{P}^+_{bkt}\), we calculate \(\bar{I}^+_{bkt}\) via Eqs. (19a)–(19b), then calculate \(Q_{bkt}\). We substitute \(R^{int}_{bkt}\) with \(Q_{bkt}\) via constraint (15a), then use constraints (13a), (13c), and (27a) to obtain the maximum charge power, \(\bar{P}^+_{bkt}\):

$$\begin{aligned} \bar{P}^+_{bkt}&= \min \left\{ {\bar{p}}_b, (a^v_b b^0_b + b^v_b + (r^{ref}_{bt} (1+\alpha ^r_b Q_{bkt})) \bar{I}^+_{bkt}) \bar{I}^+_{bkt} \right\} ,\ \forall b \in {\mathcal{B}}, k \in \hat{{\mathcal{B}}}_b, t=1 \end{aligned}$$
(20a)
$$\begin{aligned} \bar{P}^+_{bkt}&= \min \left\{ {\bar{p}}_b, (a^v_b B^{soc}_{bk,t-1} + b^v_b + (r^{ref}_{bt} (1+\alpha ^r_b Q_{bkt})) \bar{I}^+_{bkt}) \bar{I}^+_{bkt} \right\} ,\forall b \in {\mathcal{B}}, k \in \hat{{\mathcal{B}}}_b, t \in {\mathcal{T}}\setminus \{1\}. \end{aligned}$$
(20b)

4.3 Discharge variables

When the battery is discharging, we first solve for the required current out of the battery, then assign dispatch variables in a specific order, given in Algorithm 1. For battery b, twin k, at period t, \(P^-_{bkt} > 0\), \(B^{soc}_{bk,t-1}\), \(Q_{bk,t-1}\), and \(A_{bk,t-1}\) are inputs. Constraints (13b) and (13d) relate \(P^-_{bkt}\) to \(I^-_{bkt}\) and \(R^{int}_{bkt}\), the latter of which can be substituted for a function of \(Q_{bk,t-1}\), \(A_{bk,t-1}\), and \(I^-_{bkt}\) using constraints (15a), (15b)–(15c), and (15g)–(15h); for \(t=1\), we substitute \(B^{soc}_{bkt} \leftarrow b^0_b,\ Q_{bk,t-1} \leftarrow 0,\ \) and \(A_{bk,t-1}\leftarrow 0\). Then, we solve the following cubic equations with \(I^-_{bkt}\) as a variable:

$$\begin{aligned}&-r^{ref}_{bt} \alpha ^r_b \tau q_{bt} m_{bn} \left( {I}^-_{bkt}\right) ^3 - r^{ref}_{bt} \left( {I}^-_{bkt}\right) ^2 + \left( a^v_b b^0_b + b^v_b\right) {I}^-_{bkt} - P^-_{bkt} = 0, \\&\quad \forall b \in {\mathcal{B}}, k \in \hat{{\mathcal{B}}}_b, t =1. \end{aligned}$$
(21a)
$$\begin{aligned}&-r^{ref}_{bt} \alpha ^r_b \tau q_{bt} m_{bn} \left( {I}^-_{bkt}\right) ^3 - r^{ref}_{bt} \left( 1+\alpha ^r_b Q_{bk,t-1}\right) \left( {I}^-_{bkt}\right) ^2 + \left( a^v_b B^{soc}_{bk,t-1} + b^v_b\right) {I}^-_{bkt} - P^-_{bkt} = 0, \\&\quad \forall b \in {\mathcal{B}}, k \in \hat{{\mathcal{B}}}_b, t \in {\mathcal{T}}\setminus \{1\}. \end{aligned}$$
(21b)

Section “Discharge current given power output” of Appendix 3 details the derivation in Eq. (21b), from which a positive real-valued root feasible for constraints (14c), (14d), and (27c) yields \(I^-_{bkt}\); this, in turn, is used to assign the other dispatch variables shown in Algorithm 1.

figure a

4.4 Charge variables

We obtain battery decision variable values when the battery is charging in a manner similar to Algorithm 1. We obtain \(I^+_{bkt}\), using \(P^+_{bkt} > 0\) and the battery state as input, and perform analogous substitutions to those of Sect. 4.3. We then solve the cubic equations:

$$\begin{aligned}&r^{ref}_{bt} \alpha ^r_b \tau q_{bt} m_{bn} ({I}^+_{bkt})^3 + r^{ref}_{bt} ({I}^+_{bkt})^2 + (a^v_b b^0_b + b^v_b) {I}^+_{bkt} - P^+_{bkt} = 0, \\&\quad \forall b \in {\mathcal{B}}, k \in \hat{{\mathcal{B}}}_b, t=1 \end{aligned}$$
(22a)
$$\begin{aligned}&r^{ref}_{bt} \alpha ^r_b \tau q_{bt} m_{bn} ({I}^+_{bkt})^3 + r^{ref}_{bt} (1+\alpha ^r_b Q_{bk,t-1}) ({I}^+_{bkt})^2 + (a^v_b B^{soc}_{bk,t-1} + b^v_b) {I}^+_{bkt} - P^+_{bkt} = 0, \\&\quad \forall b \in {\mathcal{B}}, k \in \hat{{\mathcal{B}}}_b, t \in {\mathcal{T}} \setminus \{1\}, \end{aligned}$$
(22b)

in which \(I^+_{bkt}\)is a variable, and use a positive real-valued root feasible for constraint (27d). Section “Charge current given power input” of Appendix 3 details the derivation of Eq. (22b), and Algorithm 2 demonstrates how we assign the remaining battery decision variables for battery b, twin k in period t.

figure b

5 Results

The nonlinear model proves to be intractable for a time horizon greater than 300 h, even using the nonlinear-feasible heuristic solution as a “warm start.” To solve the model for longer time horizons, we linearize (\({\mathcal{C}}\)) using exact reformulations and good approximations (see, e.g., Scioletti et al. 2017), summarized in section “Linearization” of Appendix 1. We implement the MILP in the AMPL modeling language (Fourer et al. 2003) and solve it using CPLEX (IBM 2013), Version 12.7.0.0 on Linux Quad-Quad core CPUs running at 2.93 GHz, on a Dell Power Edge R430 server with 32 GB of RAM.

Hereafter, we refer to the linearized version of (\({\mathcal{C}}\)) simply as (\({\mathcal{C}}\)); the “no-fade” case of (\({\mathcal{C}}\)) represents the solution obtained from the linearized version of (\({\mathcal{P}}\)), which is representative when battery lifecycles have not been exhausted, a reasonable assumption over a time horizon of a year. The mathematical optimization model (\({\mathcal{C}}\)) uses hourly energy demand (Wh), temperature (ºC), and solar irradiance values (\(W/m^2\)) as input. We examine the results from running the linearized version of (\({\mathcal{C}}\)) using simulated loads for FOBs in Bagram and Buenos Aires obtained from the SAGE study (Engels et al. 2014) conducted by Pacific Northwest National Labs (see Fig. 5). We compare the base case of “no fade” with output from \(({\mathcal{C}})\) using various levels of fade from “regular fade,” which we term “1\(\times \),” up to eight times the regular fade, which we term “8\(\times \).” These heightened cases of fade represent: (1) system behavior under harsher-than-usual operations in which, for example, the ambient conditions are very hot; and (2) the amount of fade that might be expected over time horizons longer than the year for which we run our model instances.

Fig. 5
figure 5

Plots of Bagram (left) and Buenos Aires (right) energy demand, \(\sum _{t \in {\mathcal{T}}} (1+\bar{k}) d^P_t\), over a time horizon of 8760 h, |\({\mathcal{T}}\)|

5.1 Capacity fade effects

Table 3 shows the output from (\({\mathcal{C}}\)) for Bagram and Buenos Aires, for 8760 h, with no capacity fade (\(m_{b1} = 0\) and \(m_{b2} = 0\)), the regular capacity fade effect (1\(\times \) fade), the regular effect accelerated by a factor of four (4\(\times \)), and by a factor of eight (8\(\times \)). All instances are solved to within approximately 5% of optimality, although some require more than 16 h of runtime. The results demonstrate that the objective function value increases with fade, as expected, although at low values of fade, the increase is negligible. Instances with higher fade values and smaller batteries (which are used to a greater extent) can yield differences of more than 1.5%. Other expected trends borne out by the results are an increase in fuel use (for which contradictions are attributed to the optimality gap) and also in cumulative capacity loss. The results for each case are obtained via optimized strategies with respect to the specific fade case we consider. Empirical tests show that the solutions from the cases with less aggressive fade are not, in fact, feasible in the models with more aggressive fade, demonstrating the need for models that capture this degradation in the battery.

Fig. 6
figure 6

Histogram showing the state of charge, \(B^{soc}_{bkt}\), of the 250 kWh battery for different model configurations over 8760 h for the Bagram location

Table 3 Output from (\({\mathcal{C}}\)) for Bagram and Buenos Aires for 8760 h for a 250 kWh battery and, for Buenos Aires, also with a 100 kWh battery

Figure 6 demonstrates the battery state-of-charge behavior for different levels of fade. For the case of 8\(\times \) fade, the distribution of the state of charge exhibits a less pronounced peak than for the cases with lower levels of fade. Additionally, the higher state-of-charge values are more prevalent for cases in which the fade is greater. For these cases, the battery capacity is effectively reduced; therefore, in order to fulfill the power demand for a given time period, the battery capacity required is a greater fraction of its effective capacity for that time period, i.e., it must operate at a higher state of charge.

5.2 Temperature effects

We run the optimization model for the 1\(\times \)-fade case, increasing the input temperature for the Bagram site by 10 °C and 20 °C, to show the effect of temperature on the model output. We use battery temperatures higher than those of the surroundings because, during battery use, a fraction of energy is dissipated in the form of heat, which keeps the temperature of the battery at a higher value than that of its surroundings (unless the battery system possesses an active cooling system); furthermore, because the aging of a battery depends on its temperature, incorporating the higher temperatures into the study more accurately captures aging (Karimi and Li 2013). To this end, we consider the effect of temperature on the variables \(R^{int}_{bkt}\), \(Q_{bkt}\), \(C^-_{bkt}\) and \(B^{soc}_{bkt}\). The temperature variation is shown in Fig. 7, and the results from the optimization model, using those temperatures as input, are given in Table 4. As expected, fuel use and objective function value increase with increasing temperature, i.e., increasing fade; because the fade values are not as pronounced as those in Sect. 5.1, the differences between the runs are not as stark.

Fig. 7
figure 7

Temperatures used as input to the optimization model. The original temperature used for Bagram (average temperature of 5.15 °C) is given as \(\theta \); \(\theta +10\) and \(\theta +20\) are the temperatures increased by 10 °C and 20 °C for each time period, respectively

Table 4 Model output: objective function value (OFV), MIP gap, fuel use and percentage capacity fade \(Q_{bkt}\) for 8760 h and a 250 kW battery using varied input temperatures for Bagram and Buenos Aires
Fig. 8
figure 8

Internal resistance (left) and capacity fade (right) of a 250 kW battery for varying temperatures from an average of 5.15 °C to 25.15 °C for 8760 h

Figure 8 shows the effect of temperature on the internal resistance (left) and percentage capacity loss (right) of a 250 kW battery over 8760 h. As temperature increases, battery internal resistance decreases because the diffusion processes related to lithium ions and lithium accelerate; this acceleration leads to diminished transport resistance, hence, less internal resistance, as shown by Eq. (2). Decreased internal resistance leads to better round-trip energy efficiency at higher temperatures, whereas at lower temperatures, the higher internal resistance leads to less energy efficiency per cycle. However, at high temperatures, the rate of capacity fade causing side reactions also increases, leading to higher loss of active material (i.e., lithium), and, hence, higher capacity fade, as shown by Eqs. (9) and (10). Figure  8 (right side) indicates that a 10 °C increase in temperature profile increases the capacity fade from 3.69% to 5.81%, and that a 20 °C increase in temperature profile increases the capacity fade to 8.86% over the course of a year. Similar effects occur with a load from Buenos Aires. A temperature increase of 10 °C leads to a percentage capacity loss change from 6.02 to 9.17. However, the battery is oversized for our instances, as evidenced by the fact that the maximum power out of the battery (127.82 kW) is 51.1% of the maximum capacity of the battery (250 kW). As a result, we do not see any appreciable change in power output because it never nears the capacity of the battery, even after degradation.

There is evidence that if the battery capacity is more closely sized to the battery power output, there is lower power generation from the battery as it fades. Indeed, to this end, Fig. 9 shows the power output from a 100 kWh battery for the 8\(\times \)-fade, 4\(\times \)-fade and 1\(\times \)-fade cases; due to the time-compressed nature of the graph, the power variance is difficult to discern. Additionally, greater variance would be apparent at finer, e.g., one-minute, time granularity, but incorporating this detail is beyond the scope of the paper. See Husted et al. (2018) for a similar model with one-minute time fidelity in which rapid changes in power are apparent.

Fig. 9
figure 9

Power output from a 100 kW battery for Buenos Aires for 8760 h for the cases of 1\(\times \) fade (orange), 4\(\times \) fade (grey) and 8\(\times \) fade (yellow). (Color figure online)

6 Conclusion

The capacity fade model given in (\({\mathcal{C}}\)) provides a realistic update to the lifecycle counting approach present in (\({\mathcal{P}}\)). The results from (\({\mathcal{C}}\)) show that there is an increase in: (1) objective function value (total microgrid costs), (2) fuel use, and (3) capacity loss with increasing battery fade. Moreover, at best, this increase is more pronounced if solutions from a model that does not consider fade are evaluated in a model that does; at worst, said solutions are infeasible. Capacity fade in smaller batteries has a greater effect on microgrid costs and fuel use, because these batteries are used to a greater extent and/or more often at their maximum capacity. We also document the effect of temperature on battery capacity and performance. More specifically, we show that higher temperatures lead to lower resistance and discharge capacity which, in turn, cause faster battery capacity loss. We have developed a model that combines the complexities of battery chemistry with the optimization of a microgrid that contains a battery. This type of model will allow researchers to explore the effects of various sizes and types of batteries in a microgrid or even a grid-connected setting with much greater detail than was previously possible. Future work might employ the decomposition techniques from Zolan et al. (2018) to more quickly solve linear versions of our model, and to capture the approximations we make to the nonlinearities, although extensive modifications would be necessary to incorporate battery fade.