Open Access
This article is

- freely available
- re-usable

*Energies*
**2019**,
*12*(23),
4598;
https://doi.org/10.3390/en12234598

Article

Multi-Period Newsvendor Problem for the Management of Battery Energy Storage Systems in Support of Distributed Generation

^{1}

Department of Mechanical and Industrial Engineering, Università degli Studi di Brescia, via Branze 38, I-25123 Brescia, Italy

^{2}

Department of Information Engineering, Università degli Studi di Brescia, via Branze 38, I-25123 Brescia, Italy

^{*}

Author to whom correspondence should be addressed.

Received: 28 October 2019 / Accepted: 29 November 2019 / Published: 3 December 2019

## Abstract

**:**

Stakeholders’ interests on renewable and clean energy sources experienced a huge increase in the last decades, thanks to the remarkable benefits on climate, economic, and social issues. The integration of flexible energy storage systems represents a great chance for a further increased penetration as they support the mitigation of renewables’ main drawbacks (i.e., stochastic behavior) and guarantee the balance between energy supply and demand enabling non-simultaneous production and consumption. The increased focus on distributed generation and storage was also of interest to the research community which investigated both the economic and technical performances of the integrated systems. The operations management branch addressed this topic, since storage devices present many similarities with traditional inventory management applied to regular commodities. At a user level, the relation between energy production and storage can be studied by analogy with inventory models. Specifically, this study presents a multi-period newsvendor model for the management and optimal sizing of a battery energy storage system installed to increase the self-consumption rate by allowing loads shifting. This work aims to extend the traditional inventory management applying its concepts to energy systems operations in order to minimize the total energy cost. A numerical study is provided to show the behavior of the model.

Keywords:

energy storage; batteries; newsvendor; operations management; inventory model## 1. Introduction

Last decades experienced a fast increase in the penetration of renewable and clean energy resources around the world. In particular, the greatest improvement is due to photovoltaic (PV) and wind systems. The main reasons that justify this growth of interest in these distributed generation (DG) resources are the remarkable benefits introduced on the environmental, economic, and social topics. For instance, they lead to lower global warming emissions, improved environmental quality, more stable energy supply, and lower energy prices. However, the growing rate, in terms of installed capacity, of renewable energy sources (RES) has recently slowed sharply. This phenomenon was triggered by regulation and economic issues, coming with the ending of the incentives which were mainly introduced in the developing phase of the technologies, and by the technical drawbacks of their integration in the energy system, mainly because of the high uncertainty and intermittency of the energy generation and to the low forecast reliability caused by the strong dependence on external conditions (e.g., weather). Prosumers (i.e., users generating and consuming energy) may require flexible practices (e.g., demand response schemes) and/or technologies in order to maintain the balance between renewable energy production and loads, mitigating the drawbacks generated by the output fluctuations and unpredictability. Electrical energy storage systems (ESSs) represent one of the most promising ways to increase the host capacity of RES, thus providing a relevant contribution in achieving the energy targets imposed to the European members by 2020 and 2050, and to reduce the issues generated on the power system operation and control. These devices enable the storage of energy and release it whenever needed by the user, decoupling energy production and consumption in order to increase the share of self-consumption and to reduce peak loads.

ESSs can provide different services: short-term, long-term, and for distributed generation. Their main applications within a DG background are load shifting, which allows the time shifting of the energy generated to better matching the loads, and peak shaving for the reduction of power peaks. The application of ESS in support of DG from RES, by increasing their self-consumption, could allow the increase of revenues from those power plants which are characterized by missing or decreasing feed in tariffs. ESSs can be installed at various levels of the electricity system (i.e., global, national, and user) introducing different benefits [1]. On the global energy system, storage units can stabilize the energy generation from renewables, enabling the mitigation of the intermittency and non-programmability issues and limiting the power imbalances faced by the distributor system operator (DSO). ESSs installed at customer-side substations can avoid power flow mitigating congestion and maintain the voltage in an appropriate range. In this way, they can support the creation of smart grids based on distributed energy generation, bi-directional energy flows, and active participation of prosumer in the system. Moreover, electrical storage systems are expected to play a fundamental role to support the large penetration of electric vehicles (EVs) in urban areas, by allowing advanced energy flow management strategies at EV charging stations [2]. At the national level, ESSs can increase the share of the energy demand covered by renewables reducing the energy price and its fluctuation and can also limit surplus energy production. While, at the user level, storage units can allow the growth of the self-consumption rate and the peak shaving, consequently, enabling the reduction of the contractual power. ESSs can also act as an emergency power supply and as a medium for energy management systems (EMS). However, even ESSs presents some issues that hinder their wide adoption; i.e., they suffer from technical limitations, entail high investment costs, and pose relevant challenges on the operation of the electrical power grids. Hence, the management of ESS and the interactions with the surrounding systems is an important precondition to guarantee their economic and technical feasibility.

Currently several works are focused on the optimization and management of energy storage systems. Typically, energy storage optimization methods proposed by the literature are based on physical models which simulate the real behavior of system components. However, such simulations require quite complex numerical approaches, and are not suitable for general analytic solutions. Moreover, uncertainty is rarely considered while it represents one of the main aspects of renewable energy systems integrated with storage units [3]. The use of well-established inventory theories can allow to gain several managerial insights into the problem and support decision-makers in both the sizing and management stages. The operation management of energy storage systems presents similarities with the concepts of inventory and supply chain management applied to regular commodities, where products (energy) are purchased and kept in stock at the warehouse (storage device) and consumed to satisfy the customer demand (user’s loads). In the micro-perspective, i.e., considering the decentralized decisions related to energy generation and demand at the user level, the daily operating policies of the storage devices can be managed by applying the inventory theory models, such as the economic order quantity (EOQ) and the newsvendor problem. In particular, in the latter, a decision-maker facing random demand for a perishable product decides how much of it to stock for a single selling period in order to minimize the expected costs. This model with its simple structure allows to obtain optimal solutions by using a closed-form formulation while considering all the main characteristic of real renewable energy systems integrated with storage units. The key aspects captured with the proposed model are the uncertain demand and production rates, the deterioration of the storage device, and the self-discharge losses.

The present work aims at extending the application area of the traditional inventory theory adapting the newsvendor problem to battery operation modeling. The focus in on battery energy storage systems (BESS) that is those systems that store energy in the form of electrochemical energy, since they are widely used for the support of distributed generation and have been applied in many different installations [4], from small to medium size applications (from few kWh to several MWh), thanks to their wide flexibility. In this study, we consider the use of BESS to increase the self-consumption of PV systems installed at end-users’ premises. Considering this application, which aims at storing the excess of energy generation from the user’s PV system and decreasing the energy consumption from the grid, it is apparent that only the energy flows between the user and the distribution grid are involved and a user-centric approach must be considered [5]. Even if the use of distributed energy storage systems in more complex scenarios, such as smart communities and applications involving aggregators or other independent system operators (e.g., [6]) is of interest, its analyses is out of the scope of the proposed study.

The novelty and main contributions of this work are:

- Investigating the analogy between the inventory management of regular commodities and the management of energy storage system;
- Developing a novel variant of the classical newsvendor model for the management of the storage device in the presence of intermittent sources and uncertain loads. A single user’s perspective has been considered in order to optimize the use of the battery energy storage system minimizing its energy cost.

The remainder of this paper is organized as follows. Section 2 provides a brief literature analysis on the main topics addressed in this work (i.e., economic and technical models for the electrical energy storage systems and inventory models with energy considerations). In Section 3, the operating model of the battery and the analogy with the inventory theory are developed. Section 4 introduces a numerical study in order to investigate the behavior of the model. Finally, Section 5 outlines the concluding remarks and possible future developments of this work.

## 2. Literature Review

Because of the interdisciplinary of the proposed approach, the developed model focuses on traditional ESS sizing and management approaches as well as on classical inventory models. Section 2.1 identifies the relevant papers on the economic and technical models for ESSs. Subsequently, Section 2.2 outlines the evolution of inventory management theory and refers to interdisciplinary applications of inventory models with energy considerations.

#### 2.1. Economic Models for the Electrical Energy Storage Systems

Energy storage systems have been characterized by a continuously growing interest also from the scientific community. Specifically, several research streams can be found in literature which model and simulate the performance of these systems, in particular of BESS. Fares and Webber [7] provided a classification of the models describing the physical and chemical processes occurring in the battery during the operation. They identified two main groups: i.e., first-principles electrochemical models and empirical behavioral models. The first uses physical equations to describe the transport and reaction of active species inside a battery, while, the latter uses mathematical equations or physical analogs (e.g., electric circuits) to describe the system-level characteristics of a battery, such as capacity, efficiency, and voltage. Recently, Yang et al. [8] presented a comprehensive review of battery sizing criteria, methods, and its applications in various renewable energy systems. Main focus of this study was on the economic evaluation of the performance in order to find the optimal size and operation management of BESS. Remarkable works which focus on the economic evaluation of the savings that can be introduced exist. For instance, Hoppmann et al. [9] provided an overview of studies on the economics of BESS in distributed PV systems and investigates through a simulation model the economic viability of battery storage for a residential PV in Germany. Nottrott et al. [10] proposed a linear programming routine to optimize the energy storage dispatch schedules for peak net load management and demand charge minimization in a grid-connected, combined photovoltaic-battery storage system. Yang et al. [11] proposed an effective sizing strategy and a cost-benefit analysis for distributed BESS in the distribution networks under high PV penetration level for voltage regulation and peak load shaving. In Ref. [12], a techno-economic analysis of lithium-ion batteries supporting distributed generation from PV systems was proposed. In Ref. [13] investigated how the electricity tariffs could affect the diffusion of electrical energy storage systems in support of distributed generation based on the renewable energy sources for different loads of end-users. Recently, some works start to consider the life cycle approach from an economic and environmental point of view, taking into account the impact that the introduction of BESS has on life cycle cost (i.e., investment, operation, maintenance, and disposal costs) and GHG emissions. Dufo-López et al. [14] proposed a multi-objective optimization of a stand-alone PV-wind-diesel system with batteries storage aiming at minimizing the levelized cost of the electricity (LCOE) and the equivalent carbon dioxide (CO

_{2}) life cycle emissions. Bortolini et al. [15] evaluated the optimal energy storage sizing and management strategy to minimize the LCOE of a PV-BESS system taking into account the national grid as the backup source. Marchi et al. [16] investigated the life cycle cost of three different BESS technologies, by considering investment, operation, maintenance, and disposal costs. Lai and Mcculloch [17] defined a new metric, i.e., levelized cost of delivery (LCOD), to calculate the LCOE for a solar PV equipped with an EES. Their study shows that the marginal LCOE and LCOD indices can be used to assist policymakers to consider the discount rate, the type of storage technology and sizing of components in a PV-EES hybrid system.#### 2.2. Inventory Models with Energy Considerations

Inventory is one of the most visible and tangible aspects of doing business. If inventories are not under control, they only represent an amount of immobilized cash that cannot be invested in other options to generate additional financial resources, generating inefficiency because of the high holding cost and unreliability. For that reason, inventory theory is one of the most developed fields of operations management and it still plays a central role as a research stream. The optimal lot size models determine the optimal quantity that a company has to order (or produce) to minimize the total costs over a given period, balancing the inventory holding cost and fixed order (or setup) cost. In 1913, Harris with a seminal work [18], initiated the research on the lot sizing problems developing the economic order quantity (EOQ) model. Then, few years later, Traft [19] extended the EOQ model with the economic production quantity (EPQ) model, which considers a manufacturing firm that has to optimize the quantity of products to be produced in a given period of time. In this model, the units are available incrementally while the products are being produced and they are shipped to the buyer only when the lot is completed. In the following years, the optimal lot sizing model became a well-known and commonly used inventory technique. The recent review of [20] shows that many other researchers have developed extensions of the seminal work by considering different background and parameters (e.g., shortages, deterioration, quality of product and process, etc.,). Specifically, a great attention has been focused on deteriorating and perishable items. Misra [21] first studied the EPQ model for deteriorating items with a constant and variable demand rate; while, Bakker et al. [22] proposed an interesting overview on the EOQ and EPQ models for a continuously deteriorating inventory. A recent trend deals with considerations of the energy consumptions in the inventory models [23] and some works integrate the use of energy storage in order to support the energy-oriented lot sizing and scheduling [24]. Another relevant model in the inventory theory is the newsvendor problem, also known as the newsboy problem, which involves the determination of the order quantity which maximizes the expected profit in a single period probabilistic demand framework, comparing overstock and understock costs. Many extensions have been proposed in the last decades. Worth to mention the work of [25], in which re-ordering opportunities are permitted in a two-period problem, and the one of [26] which considers a newsvendor model with uncertain demand and supply. Recently, few works have begun to introduce inventory theory models applied to energy storage. Saran et al. [27] evaluated the decisions related to a wind plant equipped with an energy storage system by applying concepts from supply chain management including both network design (i.e., facility role, facility location, capacity allocation, …) and inventory management by using concepts from the newsvendor problem to formulate operating policies. Later, Schneider et al. [28] adopted a single-period newsvendor model with supply uncertainties to optimally size the electrical energy storage system for a residential use integrated with a photovoltaic system.

## 3. Model Development

#### 3.1. Notation

The notation of the multi-period newsvendor model proposed for the BESS operation is the following:

${c}_{BESS}$ | Levelized cost of energy for the BESS (€/kWh) |

${c}_{PV}$ | Levelized cost of energy for the photovoltaic system (€/kWh) |

$\gamma $ | Battery degradation per cycle (-) |

${D}_{i}$ | Energy demand rate at period $i$ with probability distribution ${f}_{{D}_{i}}$ (kWh) |

$DOD$ | Depth of discharge (-) |

${E}_{max}\left(\tau \right)$ | Maximum level of energy stored (kWh) |

${E}_{min}\left(\tau \right)$ | Minimum level of energy stored (kWh) |

$E\left(t\right)$ | Amount of energy stored at time $t$ (kWh) |

${I}_{i}$ | Inventory level at the end of period $i$ (kWh) |

${\eta}_{c}$ | Charging efficiency of the BESS (-) |

${\eta}_{d}$ | Discharging efficiency of the BESS (-) |

${p}_{e}$ | Energy price for purchasing a kWh from the grid (€/kWh) |

${p}_{PV}$ | Energy price for selling a kWh from the PV system to the grid (€/kWh) |

${R}_{BESS}$ | Quantity of energy charged in the BESS (kWh) |

${R}_{PV,i}$ | Energy production rate of the PV system at period $i$ distributed with ${f}_{{R}_{PV,i}}$ (kWh) |

$SoC\left(t\right)$ | State of charge (-) |

$\tau $ | Number of cycles already performed by the BESS (cycles) |

$\theta $ | Deteriorating rate due to self-discharge (-) |

${X}_{i}$ | Inventory level at the beginning of period $i$ (kWh) |

#### 3.2. Problem Definition

The behavior of BESSs presents many analogies with the inventory management. Batteries operate as a warehouse in which energy is the product that is stored and subsequently sold. In the present work, the inventory theory, usually used to manage physical products, has been applied in the management of the battery’s operation in order to determine the optimal energy quantity that should be charged in the device to minimize the related cost. In particular, a multi-period newsvendor model has been developed; in the first period, the surplus energy is used to charge the BESS when the production from renewables is greater than the loads, while in the second, the BESS is discharged to meet the excess load requirements. The BESS operation characteristics should be translated into the language of the inventory management [28]. A single-product (i.e., energy), single-stage (i.e., the BESS consists of a single battery) inventory model is provided. The choice to develop a probabilistic inventory model is motivated by the fact that the newsvendor problem allows to overcome, in a simple way, the main limitation of the standard deterministic EOQ. In fact, it assumes that both renewable energy production and load are defined through stochastic distributions which represents the uncertainty and intermittency of these variables. As BESS operations determine complex physical and chemical reaction mechanisms and dynamics, taking into account all of them in an inventory model is quite complex. In the present study, the most significant aspects have been considered; i.e., self-discharge losses, capacity degradation, and incomplete discharge.

The efficiency of a storage device can be calculated through two efficiency indicators: the primary efficiency measure is the ratio between the output energy and the input energy for a charge-discharge cycle which evaluates the conversion losses, while the secondary measure is related to losses in the idle time and evaluates the self-discharge losses. BESS should have relatively high round trip efficiency and low standby losses in order to limit the inefficiency introduced in the energy system. The capacity degradation of BESS is the phenomenon in which the voltage and the capacity of the batteries decreases as a result of various degradation mechanisms and the interactions among these mechanisms. The causes of the capacity deterioration can be grouped into two main categories [29], i.e., cycle and storage deteriorations. Cycle deterioration occurs at each charge-discharge cycle and depends on the number of cycles. While, storage deterioration occurs in batteries in a charged status and it is a function of the storage time and the state of charge (SoC). Furthermore, storage systems should not be completely discharged in order to not worsen their global performance and to prolong their lifetime. These specific phenomena have been taken into account in the model as follow:

- The conversion losses can be considered into the definition of the relationship between the demand and the production rate as for the production of defective items. Moreover, the energy stored in the BESS continues to perish at a constant rate because of the self-discharge losses and, thus, the model should consider deteriorating items.
- BESS capacity degradation can be modeled as inventory models with space restrictions [30], which may degrade over time.
- Safety stock (SS) are taken into account to prevent issues related to the complete discharge.

To keep the model simple enough to allow analytic study, we considered an end-user perspective in order to increase the self-consumption of its renewable energy source equipped with an energy storage system. Other assumptions necessary for the development model are hereafter defined:

- Uncertain and intermittent energy demand, ${D}_{i}$, and production, ${R}_{PV,i},$ rates defined through stochastic distributions;
- BESS parameters are fixed over time (i.e., static model);
- The amount of safety stocks corresponds to the lower threshold of energy stored, ${E}_{min};$
- Demand can be satisfied, at least partly, through the energy stored in the BESS and the unsatisfied demand is not backlogged which means that the excess demand cannot be met in a sequent period;
- Shortages are considered as lost sales and should be met with different energy source, such as through energy purchase from the grid. Furthermore, the shortage cost is proportional to the size of the shortage (i.e., the amount of energy demand exceeding the energy available in the BESS);
- Production and order costs are not considered as they are not differential;
- Every cycle can start without delay and thus no lead time are considered;
- Self-discharge losses are linearly proportional to the amount of energy stored in the BESS, $E\left(t\right)$, and are evaluated in the model as holding costs;
- The energy produced is first used to meet the demand and, then, the surplus energy is used to charge the BESS;
- The energy stored in the battery in period $t$, $E\left(t\right)$ , is limited between two limits (i.e., ${E}_{min}$ and ${E}_{max}$ which are defined in Equations (1) and (2), respectively), where the maximum energy that can be stored reduces every cycle because of BESS capacity degradation.

$${E}_{min}\left(\tau \right)=\left(1-DOD\right){E}_{max}\left(\tau \right)$$

$${E}_{max}\left(\tau \right)={\left(1-\gamma \right)}^{\tau}\cdot {E}_{max}\left({\tau}_{0}\right)$$

#### 3.3. Model Formulation

In the inventory theory, the newsvendor model is traditionally used in a domain with an uncertain demand in order to determine the optimal lot size quantity that minimizes the total costs by balancing the underage and the overage unit costs [31]. Specifically, the unit underage (overage) cost represents the cost of having in stock one unit less (more) than the demand during the period. For the specific case, the underage cost corresponds to the cost of having one kWh less in the battery, hence, it is evaluated at the costs of purchasing electricity from the grid, ${p}_{e}$, to meet the user’s load. While, the overage cost represents the opportunity cost of having one kWh more in stock than the user could have sold to the grid at the price ${p}_{PV}$. In order to better fit the basic charge and discharge cycle of the BESS, a two-periods newsvendor model have been developed, where the two cycles are represented by the two periods defined. In the first period, the energy production is greater than the demand and thus the BESS is charged (from ${t}_{0}$ to ${t}_{1}$); while, in the second period, the demand exceeds the production and, consequently, the BESS is discharged (from ${t}_{1}$ to ${t}_{2}$). The inventory level (i.e., the amount of energy in the BESS, $E\left(t\right)$) is assumed to be a linear function of the time as shown in Figure 1.

The objective function of the model involves minimization of the total cost which is given by the sum of the total costs of the two different periods considered ($T{C}_{1}$ and $T{C}_{2}$). The total costs of the two periods are defined in Equations (3) and (4) and consist of the following contributions: levelized cost of energy (LCOE) for both the integrated system PV and BESS; the opportunity cost of storing an amount of energy, which value is given by the sum of the LCOE of the PV and the one of the BESS, that is then lost; the revenues from selling the excess energy produced by the PV once the BESS is full (for $0\le {D}_{1}\le {R}_{PV,1}$ and $0\le {D}_{2}\le {R}_{PV,2}+{\eta}_{c}{\eta}_{d}{R}_{BESS}$); and the cost of purchasing additional energy from the grid to meet the loads (for ${R}_{PV,1}\le {D}_{1}\le \infty \text{}\mathrm{and}\text{}{R}_{PV,2}+{\eta}_{c}{\eta}_{d}{R}_{BESS}\le {D}_{2}\le \infty $).
where

$$\begin{array}{cc}T{C}_{1}=& {c}_{PV}{{\displaystyle \int}}_{0}^{\infty}{R}_{PV,1}{f}_{{R}_{PV,1}}d{R}_{PV,1}+{c}_{BESS}{\eta}_{c}{R}_{BESS}+\left({c}_{PV}+{c}_{BESS}\right)\theta {{\displaystyle \int}}_{{t}_{0}}^{{t}_{1}}E\left(t\right)dt\hfill \\ & -{p}_{PV}{{\displaystyle \int}}_{0}^{\infty}\left[{{\displaystyle \int}}_{0}^{{R}_{PV,1}}\left({R}_{PV,1}-{D}_{1}-{R}_{BESS}\right){f}_{{D}_{1}}d{D}_{1}\right]{f}_{{R}_{PV,1}}d{R}_{PV,1}\hfill \\ & +{p}_{e}{{\displaystyle \int}}_{0}^{\infty}\left[{{\displaystyle \int}}_{{R}_{PV,1}}^{\infty}\left({D}_{1}-{R}_{PV,1}\right){f}_{{D}_{1}}d{D}_{1}\right]{f}_{{R}_{PV,1}}d{R}_{PV,1}\hfill \end{array}$$

$$\begin{array}{l}T{C}_{2}={c}_{PV}{{\displaystyle \int}}_{0}^{\infty}{R}_{PV,2}{f}_{{R}_{PV,2}}d{R}_{PV,2}+\left({c}_{PV}+{c}_{BESS}\right)\theta {{\displaystyle \int}}_{{t}_{1}}^{{t}_{2}}E\left(t\right)dt\\ -{p}_{PV}{{\displaystyle \int}}_{0}^{\infty}\left[{{\displaystyle \int}}_{0}^{{R}_{PV,2}+{\eta}_{c}{\eta}_{d}{R}_{BESS}}\left({R}_{PV,2}+{\eta}_{c}{\eta}_{d}{R}_{BESS}-{D}_{2}\right){f}_{{D}_{2}}d{D}_{2}\right]{f}_{{R}_{PV,2}}d{R}_{PV,2}\\ +{p}_{e}{{\displaystyle \int}}_{0}^{\infty}\left[{{\displaystyle \int}}_{{R}_{PV,2}+{\eta}_{c}{\eta}_{d}{R}_{BESS}}^{\infty}\left({D}_{2}-{R}_{PV,2}-{\eta}_{c}{\eta}_{d}{R}_{BESS}\right){f}_{{D}_{2}}d{D}_{2}\right]{f}_{{R}_{PV,2}}d{R}_{PV,2}\end{array}$$

$${{\displaystyle \int}}_{{t}_{0}}^{{t}_{1}}E\left(t\right)dt=\left(\frac{{\eta}_{c}{R}_{BESS}}{2}+SS\right)\left({t}_{1}-{t}_{0}\right)$$

$${{\displaystyle \int}}_{{t}_{1}}^{{t}_{2}}E\left(t\right)dt=\left(\frac{{\eta}_{c}{R}_{BESS}}{2}+SS\right)\left({t}_{2}-{t}_{1}\right)$$

The demand and production rate can fit different probability distributions depending on the specific user. In the following, the analytical solution for the uniform distribution is presented for simplicity in order to investigate the behavior of the model proposed. The probability distributions defined in Equations (7) and (8) were considered for the energy demand and production, respectively.

$${f}_{{D}_{i}}=\{\begin{array}{cc}\frac{1}{{b}_{i}-{a}_{i}}& for{a}_{i}\le {D}_{i}\le {b}_{i}\\ 0& for{D}_{i}{a}_{i}\wedge {D}_{i}{b}_{i}\end{array}$$

$${f}_{{R}_{PV,i}}=\{\begin{array}{cc}\frac{1}{{d}_{i}-{c}_{i}}& for{c}_{i}\le {R}_{PV,i}\le {d}_{i}\\ 0& for{R}_{PV,i}{c}_{i}\wedge {R}_{PV,i}{d}_{i}\end{array}$$

Substituting Equations (7) and (8) in the equation of the total cost (i.e., $TC=T{C}_{1}+T{C}_{2}$), it is possible to find the optimal quantity of energy that should be charged in the BESS. Equations (9) and (10) provides the study of the total costs function, demonstrating the existence of a global optimum. Equation (11) defines the optimal value for ${R}_{BESS}^{*}$.

$$\begin{array}{c}\frac{\partial TC}{\partial {R}_{BESS}}={c}_{BESS}{\eta}_{c}+\frac{{\eta}_{c}\theta}{2}\left({c}_{PV}+{c}_{BESS}\right)\left({t}_{2}-{t}_{0}\right)+{p}_{PV}\frac{{a}_{1}-\left({c}_{1}+{d}_{1}\right)/2}{{a}_{1}-{b}_{1}}\\ +\frac{{\eta}_{c}{\eta}_{d}}{{a}_{2}-{b}_{2}}\left[-{a}_{2}{p}_{PV}+{b}_{2}{p}_{e}+\frac{{p}_{PV}-{p}_{e}}{2}\left({c}_{2}+{d}_{2}+2{\eta}_{c}{\eta}_{d}{R}_{BESS}\right)\right]\end{array}$$

$$\frac{{\partial}^{2}TC}{\partial {R}_{BESS}^{2}}=\frac{\left({p}_{PV}-{p}_{e}\right){\left({\eta}_{c}{\eta}_{d}\right)}^{2}}{{a}_{2}-{b}_{2}}>0$$

$$\begin{array}{ll}{R}_{BESS}^{*}=& \frac{{a}_{2}{p}_{PV}-{b}_{2}{p}_{e}-\frac{{a}_{2}-{b}_{2}}{{\eta}_{d}}\left({c}_{BESS}+\frac{\theta}{2}\left({c}_{PV}+{c}_{BESS}\right)\left({t}_{2}-{t}_{0}\right)+{p}_{PV}\frac{{a}_{1}-\left({c}_{1}+{d}_{1}\right)/2}{{\eta}_{c}\left({a}_{1}-{b}_{1}\right)}\right)}{{\eta}_{c}{\eta}_{d}\left({p}_{PV}-{p}_{e}\right)}\\ & \hspace{1em}\hspace{1em}-\frac{{c}_{2}+{d}_{2}}{{\eta}_{c}{\eta}_{d}}\end{array}$$

As the battery presents a minimum and a maximum of energy that could be stored, the optimal quantity to be charged ${R}_{BESS}^{*}$ is constrained in the range of $\left[{E}_{min};{E}_{max}\right]$.

## 4. Numerical Example

In the present section, a numerical example has been conducted in order to observe the behavior of the model proposed. The scope of this study is to gain managerial insights on different policies for the operation and sizing of the BESS. Hence, real data from the eLUX laboratory at the engineering campus of the University of Brescia have been aggregated and defined through uniform probability distributions, for both the energy demand and the PV production. eLUX is an open lab aiming at developing and testing open solutions for the integration and management of distributed energy resources and sustainability concepts in a real environment [32].

A user equipped with a photovoltaic system, integrated with a battery energy storage device is considered. The energy demand rate is defined by the user’s loads profiles; while, the production rate is defined by the energy production of the PV system since in the scenario considered batteries can be charged only from the PV system. The parameters for the probability distributions, depicted in Figure 2a,b, were set to: ${a}_{1}=1000$ kWh,${a}_{2}=2500$ kWh, ${b}_{1}=1500$ kWh, ${b}_{2}=3000$ kWh, ${c}_{1}=2000$ kWh, ${c}_{2}=500$ kWh, ${d}_{1}=3000$ kWh, and ${d}_{2}=750$ kWh.

The energy storage device consists of a new lithium-ion battery with the following parameters: ${E}_{max}\left({t}_{0}\right)=3500$ kWh, $DOD=0.8$, $\gamma =0.01$%/cycle, ${\eta}_{c}=90$%, ${\eta}_{d}=92$%, and $\theta =3$%/kWh. The other input parameters that should be defined in the model are set to: ${c}_{BESS}=0.12$ €/kWh, ${c}_{PV}=0.06$ €/kWh, ${p}_{PV}=0.1$ €/kWh, ${p}_{e}=0.25$ €/kWh, ${t}_{0}=0$, ${t}_{1}=10$, ${t}_{2}=24$. The results show that the optimal lot size quantities (R

_{BESS}*) is equal to 1003.67 kWh, which corresponds to a total cost of € 1271.50.Since the optimal results are strictly dependent on the specific values used, different analyses on the uniform distribution are then provided in order to verify the sensitivity of the model to the main parameters. A higher mean and a lower variance of the energy demand $-\left({a}_{i}+{b}_{i}\right)/2$ and ${\left({b}_{i}-{a}_{i}\right)}^{2}/12$, respectively, lead to a higher optimal lot size quantity and a higher total cost because of the greater energy demand (Figure 3a,c). In order to cover the additional demand, a greater charge of the BESS results convenient instead of selling energy to the grid and then purchasing it back at a higher cost. While, the greater the variance the lower the use of the storage unit, since in this way it is possible to reduce the uncertainty effects as the energy purchasing from the grid is a more flexible resource. Conversely, positive variations in the mean of the energy production from the PV, $\left({c}_{i}+{d}_{i}\right)/2$, lead to lower optimal lot size (Figure 3b). This could appear counterintuitive; however, it is justified by the fact that higher production allows to cover a higher share of the demand immediately and thus the necessity to store energy is lower. As a consequence, the impact of time shifting is lower when the energy production increases. While, the optimal lot size is insensitive to changes in the standard deviation of the energy production, ${\left({d}_{i}-{c}_{i}\right)}^{2}/12$ (Figure 3d).

In next years, the installation cost of BESS is expected to face a high decrease, thus we have conducted a sensitivity analysis on the levelized cost of the energy storage device (${c}_{BESS}$) in order to observe the price variations effects on its utilization. From Figure 4, it is possible to observe that for lower LCOE of the storage unit the optimal lot size is greater: reduction in the devices cost leads to higher economic benefits from the energy storage investment.

Figure 5 shows the effects of different efficiency of the storage system. As it could be guessed, higher performance reached through higher conversion efficiencies (${\eta}_{c},{\eta}_{d}$) and lower self-discharge rate ($\theta $), leads to higher performance of the device in terms of utilization and costs, i.e., higher optimal lot size of energy charged into the device, and lower total costs.

Finally, Figure 6 analyses the effects of variations in the unit energy prices for the energy purchased from the grid and for the energy produced by the PV and then sold, since the great volatility of these parameters. Higher price for purchasing energy from the grid, ${p}_{e}$, increases the profitability of the BESS. In fact, the user has a greater incentive to store energy in order to reduce the purchased energy. Hence, also ${R}_{BESS}{}^{*}$ is greater. However, even the total cost increases due to the higher energy cost and higher investment in storage units. Conversely, higher price for the energy generated by the PV and then sold to the grid, ${p}_{PV}$, reduces the convenience to store energy since a great profit can be achieved by selling the surplus kWh. The total cost presents a maximum. This is due to two contributions oppositely affected by the changes in ${p}_{PV}$: (i) higher values of ${p}_{PV}$ increases the profit by selling energy at higher price, while, at the same time, (ii) lower values increases the amount of energy stored leading to save money instead of selling it at inconvenient prices. Furthermore, Figure 6b highlights how the lower ${p}_{PV}$, the higher ${R}_{BESS}{}^{*}$. Consequently, in a future where no more feed-in-tariff are expected for renewable energy, the ESS acquires greater relevance.

## 5. Conclusions

Electrical energy storage systems are experiencing a fast development thanks to the great benefits that they introduce, e.g., they can stabilize the energy production of renewable energy sources, increase self-consumption and allow time shifting supporting the development of distributed generation. There is also another major emerging market needs for EES systems as a key technology: the future smart grid. However, the management of energy storage system still represents an open issue. This study aims to extend traditional inventory theory applying a multi-period newsvendor model to the ESS in order to exploit the similarities of the two process for determining its optimal management. Since batteries are the most promising technology for the future, because of their high flexibility and responsiveness, the focus is on battery energy storage system (BESS). The probabilistic approach tries to overcome the limit of the deterministic models, assuming that the uncertain energy load and renewables production can be defined through stochastic distributions. In the model developed, the most significant characteristics have been considered; i.e., conversion efficiency, self-discharge losses, battery capacity degradation, and incomplete discharge. Conversion efficiency were taken into account in the determination of the actual production rate. Self-discharge losses were represented as holding costs. Battery capacity degradation was modelled as space restrictions which decrease over time. Safety stock were introduced to prevent issues related to the complete discharge. In the numerical study and sensitivity analyses, it was possible to gain some managerial insights on the behavior of BESS under different scenarios. The results showed that the optimal lot size, i.e., the optimal amount of energy that should be charged into the storage unit, is higher for increased and less variable values of the energy demand, lower PV production, reduced levelized cost of energy, increased efficiency, higher prices of the energy purchased from the grid, and lower revenues from selling the PV energy production to the grid. Under normal circumstances self-discharge of batteries is reasonably steady throughout its service life; however, high temperatures, amount of cycles, and aging increase the self-discharge. Hence, a future development of this work can include variable losses and degradation. Moreover, it can be also interesting to apply the model to a more detailed case study in order to find the optimal operation of the energy storage system for each day characterized by different weather conditions. Finally, since the study is limited to a user-centric approach, a possible extension involves the inclusion of interactions with other active grid participants, such as independent system operator, neighboring power users, and aggregators.

## Author Contributions

Conceptualization, B.M. and S.Z.; methodology, B.M.; supervision, S.Z.; writing–original draft, B.M.; writing—review and editing, S.Z. and M.P.

## Funding

This research received no external funding.

## Acknowledgments

This research activity has been supported by the research activities of the eLUX laboratory— “energy Laboratory as University eXpo” (University of Brescia) which provided the data for the numerical study.

## Conflicts of Interest

The authors declare no conflict of interest.

## References

- International Electrotechnical Commission (IEC). Electrical Energy Storage; International Electrotechnical Commission: Geneva, Switzerland, 2011. [Google Scholar]
- Marchi, B.; Zanoni, S.; Pasetti, M.; Zavanella, L.E. A queuing theory decision support model and discrete event simulations for the smart charging of electric vehicles. In Proceedings of the Summer School Francesco Turco, Palermo, Italy, 12–14 September 2018. [Google Scholar]
- Weitzel, T.; Glock, C.H. Energy management for stationary electric energy storage systems: A systematic literature review. Eur. J. Oper. Res.
**2018**, 264, 582–606. [Google Scholar] [CrossRef] - Office of Electricity Delivery & Energy Reliability DOE Global Energy Storage Database. Available online: http://www.energystorageexchange.org/ (accessed on 01 October 2019).
- Chang, H.H.; Chiu, W.Y.; Sun, H.; Chen, C.M. User-centric multiobjective approach to privacy preservation and energy cost minimization in smart home. IEEE Syst. J.
**2019**, 13, 1030–1041. [Google Scholar] [CrossRef] - Muñoz-Delgado, G.; Contreras, J.; Arroyo, J.M. Distribution System Expansion Planning Considering Non-Utility-Owned DG and an Independent Distribution System Operator. IEEE Trans. Power Syst.
**2019**, 34, 2588–2597. [Google Scholar] [CrossRef] - Fares, R.L.; Webber, M.E. A flexible model for economic operational management of grid battery energy storage. Energy
**2014**, 78, 768–776. [Google Scholar] [CrossRef] - Yang, Y.; Bremner, S.; Menictas, C.; Kay, M. Battery energy storage system size determination in renewable energy systems: A review. Renew. Sustain. Energy Rev.
**2018**, 91, 109–125. [Google Scholar] [CrossRef] - Hoppmann, J.; Volland, J.; Schmidt, T.S.; Hoffmann, V.H. The economic viability of battery storage for residential solar photovoltaic systems—A review and a simulation model. Renew. Sustain. Energy Rev.
**2014**, 39, 1101–1118. [Google Scholar] [CrossRef] - Nottrott, A.; Kleissl, J.; Washom, B. Energy dispatch schedule optimization and cost benefit analysis for grid-connected, photovoltaic-battery storage systems. Renew. Energy
**2013**, 55, 230–240. [Google Scholar] [CrossRef] - Yang, Y.; Li, H.; Aichhorn, A.; Zheng, J.; Greenleaf, M. Sizing Strategy of Distributed Battery Storage System With High Penetration of Photovoltaic for Voltage Regulation and Peak Load Shaving. IEEE Trans. Smart Grid
**2014**, 5, 982–991. [Google Scholar] [CrossRef] - Marchi, B.; Zanoni, S.; Pasetti, M. A techno-economic analysis of Li-ion battery energy storage systems in support of PV distributed generation. In Proceedings of the Summer School Francesco Turco, Naples, Italy, 13–15 Septemebr 2016. [Google Scholar]
- Marchi, B.; Pasetti, M.; Zanoni, S. Effect of Demand Tariff Schemes in Presence of Distributed Photovoltaic Generation and Electrical Energy Storage. In Advances in Intelligent System and Computing; Murgul, V., Pasetti, M., Eds.; Springer International Publishing: Berlin, Germany, 2020; Volume 982, pp. 201–215. [Google Scholar]
- Dufo-López, R.; Bernal-Agustín, J.L.; Yusta-Loyo, J.M.; Domínguez-Navarro, J.A.; Ramírez-Rosado, I.J.; Lujano, J.; Aso, I. Multi-objective optimization minimizing cost and life cycle emissions of stand-alone PV -wind-diesel systems with batteries storage. Appl. Energy
**2011**, 88, 4033–4041. [Google Scholar] [CrossRef] - Bortolini, M.; Gamberi, M.; Graziani, A. Technical and economic design of photovoltaic and battery energy storage system. Energy Convers. Manag.
**2014**, 86, 81–92. [Google Scholar] [CrossRef] - Marchi, B.; Pasetti, M.; Zanoni, S. Life Cycle Cost Analysis for BESS Optimal Sizing. Energy Procedia
**2017**, 113, 127–134. [Google Scholar] [CrossRef] - Lai, C.S.; Mcculloch, M.D. Levelized cost of electricity for solar photovoltaic and electrical energy storage. Appl. Energy
**2017**, 190, 191–203. [Google Scholar] [CrossRef] - Harris, F.W. How many parts to make once. Fact. Mag. Manag.
**1913**, 10, 135–136. [Google Scholar] [CrossRef] - Traft, E.W. The most economical production lot. Iron Age
**1918**, 101, 1410–1412. [Google Scholar] - Ardak, P.S.; Borade, A.B. A State of Art on Economic Production Quantity Models. Int. J. Eng. Res. Technol.
**2014**, 3, 520–523. [Google Scholar] - Misra, R.B. Optimum production lot size model for a system with deteriorating inventory. Int. J. Prod. Res.
**1975**, 13, 495–505. [Google Scholar] [CrossRef] - Bakker, M.; Riezebos, J.; Teunter, R.H. Review of inventory systems with deterioration since 2001. Eur. J. Oper. Res.
**2012**, 221, 275–284. [Google Scholar] [CrossRef] - Zavanella, L.E.; Marchi, B.; Zanoni, S.; Ferretti, I. Energy considerations for the economic production quantity and the joint economic lot sizing. J. Bus. Econ.
**2019**, 89, 845–865. [Google Scholar] [CrossRef] - Wichmann, M.G.; Johannes, C.; Spengler, T.S. Energy-oriented Lot-Sizing and Scheduling considering energy storages. Int. J. Prod. Econ.
**2019**, 216, 204–214. [Google Scholar] [CrossRef] - Abdel-malek, L.; Zanoni, S. Application of the newsvendor model with re-ordering opportunity in two-echelon supply chains. Int. J. Integr. Supply Manag.
**2011**, 6, 270–283. [Google Scholar] [CrossRef] - Käki, A.; Liesiö, J.; Salo, A.; Talluri, S. Newsvendor decisions under supply uncertainty. Int. J. Prod. Res.
**2015**, 53, 1544–1560. [Google Scholar] [CrossRef] - Saran, P.; Goentzel, J.; Siegert, C.W. Economic Analysis of Wind Plant and Battery Storage Operation using Supply Chain Management Techniques. Policy
**2010**, 1–8. [Google Scholar] [CrossRef] - Schneider, M.; Biel, K.; Pfaller, S.; Schaede, H.; Rinderknecht, S.; Glock, C.H. Using inventory models for sizing energy storage systems: An interdisciplinary approach. J. Energy Storage
**2016**. [Google Scholar] [CrossRef] - International Energy Agency (IEA). Technology Roadmap-Energy Storage; International Energy Agency: Paris, France, 2014. [Google Scholar] [CrossRef]
- Xu, K.; Leung, M.T. Stocking policy in a two-party vendor managed channel with space restrictions. Int. J. Prod. Econ.
**2009**, 117, 271–285. [Google Scholar] [CrossRef] - Khouja, M. The single-period (news-vendor) problem: Literature review and suggestions for future research. Omega
**1999**, 27, 537–553. [Google Scholar] [CrossRef] - Flammini, A.; Pasetti, M.; Rinaldi, S.; Bellagente, P.; Ciribini, A.C.; Tagliabue, L.C.; Zavanella, L.E.; Zanoni, S.; Oggioni, G.; Pedrazzi, G. A Living Lab and Testing Infrastructure for the Development of Innovative Smart Energy Solutions: The eLUX Laboratory of the University of Brescia. In Proceedings of the 2018 110th AEIT International Annual Conference, Bari, Italy, 3–5 October 2018; pp. 1–6. [Google Scholar] [CrossRef]

**Figure 1.**Inventory level defining the amount of energy in the battery energy storage systems (BESS), $E\left(t\right)$, as a linear function of time, $t$.

**Figure 2.**Probability distributions for the energy demand and PV production: (

**a**) period 1, and (

**b**) period 2.

**Figure 3.**Sensitivity analyses varying the: (

**a**) the mean value of the demand rate, (

**b**) the mean value of the production rate, (

**c**) the variance of the demand rate, and (

**d**) the variance of the production rate.

**Figure 5.**Sensitivity analyses varying the different efficiency measures of the BESS: i.e., (

**a**) charging efficiency of the BESS, (

**b**) discharging efficiency of the BESS, and (

**c**) Deteriorating rate due to self-discharge.

**Figure 6.**Effects of variations in the energy price (

**a**) from the grid, and (

**b**) of selling PV production.

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).