## 3 The Role of Energy Storage in Micro-Grids
### Advanced Battery Management Systems  
As pointed out in Section 3.1, the BMS plays a fundamental role in every energy storage system [61], particularly those based on Li-ion technology. Besides the basic monitoring and management functions mentioned above, there are advanced functions that updated BMS is required to perform. First of all, the BMS architecture must be designed to fit to different configurations of the battery, that usually consists of cells, modules (usually series connected), and strings (usually parallel connected). The BMS functions may be spread among the various layers of the BMS architecture [62]. Typical architectures span from a single master BMS that controls the entire battery, to hierarchical distributed ones, by which the BMS hardware is distributed over the battery modules and even down the individual battery cells [63; 64]. Figure 5 shows a typical BMS hierarchical architecture that matches the parallel/series structure of the battery cells [49; 65]. Figure 4: Main functions performed by a Battery Management System (BMS). The State of Charge (SoC) of a battery is a fundamental quantity as it indicates the residual charge remaining in the battery, and thus, gives indications on the residual support provided by the ESS to the application. Moreover, the SoC estimate must be carried out on every cell of the battery, as the battery cells may be mismatched, and that mismatch may increase with ageing. Unfortunately, SoC is a quantity not directly measurable, but it must be calculated from other quantities, e.g., by integrating, in time, the current flowing in the battery. As in every non-ideal integration process, offsets or inaccuracies in the current sensor readings rapidly lead to a calculation of the integral that is affected by increasing and unacceptable errors. Many alternative approaches to the so-called Coulomb counting technique have been proposed [66, 67]. Most of them are based on a model of the battery that is subjected to the same load and operating conditions of the real battery. The status of the battery, estimated from the model calculation, resembles the status of the real battery. Therefore, the SoC and other battery parameters can be estimated by the model. The most popular models are electrical models. They provide acceptable accuracy, together with affordable computation complexity. The battery is represented by an electromotive force (the so-called Open Circuit Voltage) that varies as a function of SoC, a series resistance, that models the internal losses, as well as a series of some resistor-capacitor parallel groups, which model the relaxation phenomena in the battery. The BMS is, thus, required to solve the model-based circuit to obtain an accurate estimate of the SoC. A further effect, that makes the SoC estimate tougher, is the variation of the model parameters. In fact, the values of the electrical components, which make up the battery model, vary in time, according to the state of charge, temperature, the environmental conditions, and the health status of the battery. A further challenge for an advanced BMS is, thus, to identify and track the parameter changes, only by observing the current, voltages, and temperatures of the battery cells. Several state estimation and parameter identification techniques have been applied in the literature, starting from the moving window least square methods, to filtering, such as Extended Kalman Filters and Particle Filters. In any case the choice of the estimation technique must be traded off between the computation complexity required and the accuracy needed. Figure 5: Hierarchical architecture of a BMS matching the battery structure consisting of four paralleled strings of 6 series connected modules each. The Pack Management Unit (PMU) is the master BMS, connected to the lower layer slave BMSs (MMUs) [49]. An even tougher task for a BMS is the evaluation of the health status of a battery [68; 69].