Energy Management in PV Based Microgrids Designed for the Universidad Nacional de Colombia

: Stand-alone Electrical microgrids (MGs) require power management strategies to extend the life-time of their devices and to guarantee the global power balance of non-critical loads such as lighting of small sections of an university campus or individual air conditioning systems. This paper proposes an energy management strategy (EMS) for an isolated DC microgrid formed by a photovoltaic system (PVS), an energy storage system (battery), and a noncritical load. This conﬁguration enables the photovoltaic system to control the power generation and ensures that the storage element does not exceed the safe limits of the state of charge. To control the generation of the photovoltaic system, two operating modes based on the perturb and observe (P&O) algorithm are implemented. The ﬁrst one performs a maximum power point tracking (MPPT) action, while the second one regulates the power generated by the PVS to match the load requirement (power demand tracking, PDT). The management strategy also considers different operating states for ensuring the battery safety: normal operation, overcharge (at the maximum state of charge), and bulk charge (at the minimum state of charge); in those states the disconnection/connection of both the battery and the load is also considered. The main contribution of this work is to design and test a control strategy for an EMS aimed at regulating a standalone microgrid based on a PV system and an energy storage device. This solution is validated using detailed MG circuital simulations, which includes the PV source model (single-diode model), lithium-ion battery model, constant power load model and the DC/DC converters equations; moreover, realistic power generation and demand from Universidad Nacional de Colombia, located at Medellín-Colombia, are considered. The results obtained demonstrate the effectiveness of the energy management strategy, and in this way, enable to extend the battery lifetime and reduce the costs associated to the maintenance and disconnection of the microgrid in educational buildings or other applications focused on this type of DC microgrid.


Introduction
The integration of renewable energy sources (RES) into electrical power systems has been an active field of study for more than ten years, which is usually oriented to reduce the environmental impact of energy generation and to increase the coverage of electrical networks [1,2]. Microgrids (MGs) have been used to integrate multiple RES, fossil fuels, energy storage systems (ESSs), electrical loads, and the electrical grid [3]; this by using AC or DC buses to exchange electrical power in two modes: stand-alone or connected to the grid [4]. As presented in [5,6], the integration of ESS into a microgrid mitigates the energy production intermittency of renewable sources caused by the night and weather conditions (cloudy operation, solar irradiance, temperature, wind speed, etc.); moreover, the ESS helps to control the power flows inside the MG to achieve the global power balance and maximize the benefits for the operator or proprietary. In addition, to manage the intermittency of renewable energy resources and load demand characteristics, an EMS is an essential part of the MGs for optimal use of the distributed energy resources in reliable and coordinated ways [5,6].
DC microgrids have advantages over AC MGs in terms of efficiency and connection simplicity; for example, as reported in [7], the DC MG avoids performing a frequency control for the main bus; which reduces the installation complexity. Moreover, DC MGs are formed by distributed generators (DGs), ESS, and electrical loads [8][9][10][11]. In particular, photovoltaic systems (PVSs) are commonly included in DC MGs as DGs due to the wide availability of solar energy [12]; and the integration of a PVS, an ESS, and loads is known as a stand-alone photovoltaic system (SPVS) [13]. Those SPVSs are used in multiple applications for attending non-critical loads, such as plug-in chargers for electrical vehicles, lighting systems, television sets, data centers (facility lighting or non-critical workstations used for log files inspection), air-conditioning, home applications, among others [14][15][16][17]. Many of the SPVS applications described above are present in educational buildings, e.g., schools, universities, among others [18]. In this sense, a correct energy management of the SPVS allows to reduce the operational cost and improve the quality of the electrical service of the educational building; thus improving the life conditions of the users in those spaces [19]. For example, in [20] a EMS for stand-alone DC microgrid based on a photovoltaic source, electrochemical storage, a supercapacitor, and a diesel generator was proposed. The proposed strategy allows to control the system to balance the power injection accounting the slow start-up characteristic of the diesel generator by means of a supercapacitor dynamics. A similar solution was published in [21], where an EMS is proposed for a stand-alone hybrid AC/DC microgrid formed by a PV system, a fuel cell as a secondary power source, and a battery and a supercapacitor as hybrid ESS. The proposed EMS allows to manage the system under different modes and SOC limits of the hybrid energy storage when all devices are connected to the DC bus. For the reasons discussed above, this paper is aimed to design an energy management strategy for PV based microgrids that consider the environmental conditions and power demand of the Universidad Nacional de Colombia, located at Medellín-Colombia.
SPVS devices must be integrated using a DC-bus interfaced with DC/DC converters, which enable the operation of each device in the corresponding safe and optimal operating condition [22]. For example, the DC/DC converter associated with the PVS is regulated using algorithms and/or control strategies aimed at tracking the maximum power point (MPP); hence, such algorithms are known as MPP tracking (MPPT) solutions. The ESS integration with the DC-bus is performed using bidirectional converters and control strategies [23,24] to regulate the DC-bus voltage and to guarantee the global power balance in the standalone MG when excess or shortage power exists. However, additional conditions can also be considered; for example, a limitation to the power generated by the PVS [25][26][27], which is applied when the ESS reaches the maximum state of charge (SOC) during low power demand, or a load disconnection when the ESS reaches the minimum SOC during high power demand [25,28]. Those protections are needed to prevent an accelerated reduction of the ESS lifetime [29][30][31], hence reducing costs.
Energy management systems (EMSs) used in SPVSs consider a load shedding strategy for preventing the ESS from violating the minimum SOC only when noncritical loads are connected to the MG [32][33][34]. However, this requires an oversizing of both the generators and the ESS when critical loads are present. The main challenge in EMS design concerns the limitation of the maximum SOC condition because traditional control techniques are unable to supply power to the load without using the ESS; therefore, ESS are constantly discharged and charged with small amounts of power. This situation produces charge/discharge sub-cycles, which are integrated as full cycles that reduce the lifetime of the battery [35]. Therefore, this paper proposes a new EMS based on operating states for controlling a SPVS without violating both the maximum and minimum SOC of the ESS. For that purpose, the EMS considers three operating regions for the ESS: overcharge, normal operation, and bulk charge; and two operating modes for the PVS are also defined: MPPT and power demand tracking (PDT) [36]. The proposed EMS also includes a capacitor connected in parallel with the battery as backup ESS. The function of this capacitor is to enable the disconnection of the battery in both overcharge (high SOC) and bulk charge (low SOC) conditions, hence avoiding charge/discharge sub-cycles in the battery. Therefore, the main paper contribution is the design and test of a control strategy for an EMS aimed at regulating a microgrid based on a PV system and ESS. The solution is also intended to avoid the sub-cycles problem present in power demand tracking operation, which causes an accelerated aging of the battery pack due to the integration of charge/discharge sub-cycles into full charge/discharge cycles. This is done by inserting an auxiliary capacitor into the ESS to support the PDT operation, which enables to disconnect the battery to avoid the sub-cycles problem. Moreover the EMS also considers all the states needed to protect battery, including the load disconnection when the power balance is not achievable due to both low SOC and low PV power production. This document is organized as follows: Section 2 presents the background of SPVSs based on DC microgrids. Then, Section 3 introduces the structure, control strategies, and energy management system used in the proposed solution. The results and simulations analysis are reported in Section 4, and the conclusions close the paper. Figure 1 shows the SPVS architecture adopted in this work, which is formed by a PVS, an ESS (lithium-ion battery in parallel with a capacitor), the controlled DC/DC converters, and the load [37,38]. Such microgrid structure is commonly used in several applications that require a global power balance [39][40][41].  Equation (1) formalizes the global power balance of the SPVS, where P ESD represents the power supplied or stored by the external storage device (ESD), P PV is the power generated by the PVS, and P Load is the power demanded by the load. In this balance, the supplied power is positive and the consumed power is negative.

PVS
EMSs should consider the fact that batteries have two SOC limits: a maximum state of charge (SOC Max ), i.e., overcharge, and a minimum state of charge (SOC Min ), i.e., bulk charge. If the battery operates outside those limits, the ESS lifetime could be significantly reduced [42][43][44]. Therefore, EMSs should also integrate two operating modes: (1) constraining the power generated by the PVS so that it equals the power demanded by the load (P PV ≈ P Load ), which is needed when SOC Max is achieved; and (2) disconnecting the load when the ESS reaches the SOC Min . In the second mode, the PVS must be operated at the MPP until the battery reaches an acceptable SOC value to reconnect the load [36].
An example of this kind of EMSs is presented in [40], where a multi-loop and multi-segment adaptive droop-controller is used to manage the energy flow in a PV/battery hybrid system for a stand-alone DC MG. That solution controls the power generated by the PVS to regulate the charge/discharge battery power. However, since the battery is used to regulate the voltage in the DC-bus, such an action produces charge/discharge sub-cycles, which reduce the lifetime of the battery. Similarly, in [45] the authors proposed a double-layer hierarchical controller to ensure the global power balance of a DC MG. In such EMS, both the generators and the ESS can operate as voltage source converters or current source converters, which enable both types of devices to regulate the DC-bus voltage. This solution requires a virtual batteries disconnection when the SOC Max is reached, which is performed by controlling the power generated by the PVS. Such a strategy may cause voltage instability due to the absence of a storage device because no device is capable of storing the small amount of excess power that could be produced by the PVS due to quantization or controller errors.
Other solutions have been focused on regulating the power generation of the PVS to prevent the batteries from operating outside the SOC limits. This is the case in [36], where PVS generation is constrained depending on battery SOC and grid availability. Similarly, in [46] is reported a real-time rule-based algorithm for the power management of an MG that considers a constraint to the power generated by the PVS. Different authors [47] have also proposed an EMS based on multiple MG operating states: MPPT mode and constant voltage (CV) mode. The CV mode is used when the battery SOC reaches the maximum limit; hence the PVS power generation is constrained to ensure a constant battery voltage. The same strategy has been applied by other authors to avoid an excessive SOC condition [36,40,45,46]. However, in those solutions the batteries are not disconnected; therefore, the small amount of excess power that could be produced by the PVS (due to quantization or controller errors) is stored or supplied by the battery, generating charge/discharge sub-cycles, which reduce the battery's lifetime.
The problem associated with the charge/discharge sub-cycles of the ESS is illustrated in Figure 2, which considers the control of PVS generation reported in [36]. That control strategy was implemented following the flowcharts reported in [36], but modifying the power profiles reported in that paper since those profiles do not illustrate the sub-cycles problem. Such solution has MPPT and PDT modes, where both modes are based on the Perturb and Observe algorithm. This simulation includes a single BP585 PV module with a constant irradiance of 1000 W/m 2 , a constant power load of 40 W, and an initial battery SOC equal to 0.99995, which is near SOC Max . The simulation considers constant power profiles for both the photovoltaic source and load to illustrate the sub-cycles problem in an easy way: those constant profiles enable to visualize the source of the sub-cycles problem without the action of other controller transitions. The results presented in Figure 2a show that the PVS operates in MPPT mode at the beginning of the simulation to provide the power required by the load, while charging the battery. The MPPT mode is active for 0.34 s; at that moment, the battery SOC reaches SOC Max . From that moment on, the system operates in PDT mode to reduce the power generated by the PVS. In PDT mode, two different waveforms can be observed in the PVS power curves: (1) when the battery SOC is higher than SOC Max (between 0.34 s and 0.63 s) and (2) when the SOC is almost equal to SOC Max (from 0.63 s on). In the first part of this PDT operation, the control strategy uses the excess power from the battery to supply part of the load power, thus discharging the battery to respect the SOC limit. However, when the SOC is almost equal to SOC Max , small errors of the PDT control produce small charge/discharge sub-cycles in the battery (observed in Figure 2b), which are integrated as full charge/discharge cycles that reduce the battery's lifetime. In this simulation, the PDT errors are caused by the discretization of the Perturb and Observe algorithm that is used to track the load power, which is an unavoidable condition. Similar errors will occur in other tracking solutions, such as incremental conductance, extremum seeking or linear and non-linear controllers. The following section proposes both a circuital structure and a control strategy to address this problem.

Circuital Structure and Control Strategy for the EMS
To solve the problem described in Section 2, this paper proposes an EMS for a SPVS that considers battery SOC limits, PVS power generation control, and the integration of a backup capacitor to avoid charge/discharge sub-cycles in the battery. The backup ESS (capacitor) is used to support the power balance when the main ESS (battery) is disconnected, which occurs when the battery SOC falls outside safe limits. Such procedure avoids charge/discharge sub-cycles in the battery and, hence, artificial battery degradation.
The EMS proposed in this work is based on three operating regions (OR), defined by the SOC limits, and two control modes for the PVS; a graphic representation of those regions is provided in Figure 3. Region 1 (OR1) covers the normal battery operation and PVS; hence, the PVS works in MPPT mode and the battery is connected to the EMS. The second operating region (OR2) occurs when the battery SOC reaches the maximum limit (SOC ≥ SOC Max ), which forces the PVS to operate in PDT mode and disconnect the battery. OR2 uses the capacitor as backup ESD to ensure a correct power balance, thus eliminating the charge/discharge sub-cycles described in the previous section. The EMS remains in OR2 while the MPP of the PVS is higher than the power demanded by the load.
The third operating region (OR3) occurs when the battery SOC reaches the minimum limit (SOC ≤ SOC Min ), which forces the battery disconnection and the use of the backup capacitor for ensuring the global power balance. Moreover, if the capacitor is discharged (hence the capacitor voltage reaches a safe minimum value), the load is disconnected to force the capacitor to charge until the capacitor voltage reaches the battery voltage, which enables the EMS to reconnect the battery. Finally, the load is reconnected when the battery has been charged to a safe SOC value.

Devices and Control Strategies
The components of the proposed EMS are depicted in Figure 4: PV panel, battery, capacitor, DC/DC converters, control strategies, and common DC-bus. The PVS is connected to the DC-bus using an unidirectional DC/DC boost converter, which is regulated using the sliding-mode controller (SMC) proposed in [48]. Such a SMC regulates the DC/DC converter to impose a desired PV voltage despite the environmental and DC-bus voltage conditions, hence the voltage of the PV source is always equal to the voltage reference (V PV−REF ); the design and stability proof of the SMC are reported in [48]. The reference of such a SMC is provided by the Perturb and Observe (P&O) algorithm proposed in [36], which has two operation modes: the MPPT mode tracks the optimal PV voltage that ensures the maximum power generation, while the PDT mode tracks the PV voltage to produce a given power reference. Therefore, the used strategy to control the power generation of the PVS does not require the implementation of forecasting methods, since the combined action of the P&O and SMC algorithms ensures the production of the maximum power possible (MPPT mode) or a lower power level to match the load demand (PDT mode) depending on the microgrid requirements. In addition, the proposed structure also has adjustable parameters to control the power generated by the PV sources, with one limitation: the maximum power that can be delivered is constrained by the environmental conditions, while the minimum power is controllable. This section of the power system is modeled using the electrical equations of both the PV panel and the unidirectional DC/DC converter given in Equations (2)-(4): Equation (2) describes the PV current i pv and voltage v pv imposed by the unidirectional DC/DC converter, the photo-induced current i ph , which is almost proportional to the irradiance level, the inverse saturation current i o , the series and shunt resistances R s and R h , the electron charge q, the Bolzmann constant k, the quality factor η, the number of cells N c and the temperature in kelvins T c . Equation (3) describes the dynamic behavior of the PV voltage, where C pv is the capacitor in parallel with the PV source, L pv is the inductance of the unidirectional DC/DC converter and i L pv is the current of that inductor. Finally, Equation (4) describes the dynamic inductor current behavior, where v dc corresponds to the bus voltage and u pv is the activation signal of the converter MOSFET, which is generated by the SMC. The backup capacitor C of the structure is used in OR2 and OR3 for supporting the power balance and, at the same time, enabling the control of the DC-bus voltage in both OR2 and OR3. The capacitor is always connected to the EMS, while the battery is disconnected in OR2 and OR3 using the switch SW Bat . It must be noted that, independent of the size or the selected technology of the battery bank, the sub-cycles problems will remain; the quantization errors of the PDT control strategy will produce small charge/discharge sub-cycles, which are integrated as full charge/discharge cycles. The solution to avoid that problem is to disconnect the battery bank when the PV system must operate in PDT mode. A larger battery bank will suffer a small impact of the sub-cycles problem, since each sub-cycle will be divided into the batteries forming the bank, but the solution proposed in this paper is intended to remove the sub-cycles degradation independent of the battery size or selected technology.
The capacitor size is calculated using the average power values obtained when the system operates in PDT. Equation (5) calculates the average current in the capacitor, where P c is the maximum allowable power for the capacitor, and V Bat is the battery nominal voltage. Equation (6) can be used to calculate the capacity of the capacitor, where t represents the selected discharging time and ∆V is the maximum voltage drop allowed for those t seconds; both values are assigned by the MG designer according to the generator and load characteristics.
The hybrid ESS is connected to the DC-bus using the bi-directional converter depicted in Figure 4, which is controlled to regulate the DC-bus voltage. The control strategy adopted here was proposed in [49]; it consists in a SMC for the charger/discharger that ensures a stable DC-bus voltage in any operating condition: charging, discharging, or stand-by. This control strategy is active in all the operating regions by using the battery or capacitor as ESS, thus ensuring the global power balance of the system. This section of the model is represented by Equation (7), where v ESD corresponds to the ESD voltage, L ESD corresponds to the inductor of the bidirectional DC/DC converter and i L ESD is the current of that inductor; finally, u ESD is the activation signal of the MOSFETs generated by the SMC of this charger/discharger.
To evaluate the proposed EMS, constant power load (CPL) [50] models were selected due to their widely use in DC MGs analyses [51][52][53][54][55]. That representation has the main characteristic of changing both the load current and voltage to keep the load consumption constant; therefore, when the bus voltage exhibited perturbations, the load current changed accordingly. This is different from the constant impedance load (CIL) representation, in which perturbations in the bus voltage causes a different load power consumption. In practical applications of DC Microgrids CPL is an accurate representation of the loads due to the presence of DC/DC converters interfacing the loads with the DC bus: the load current changes according to the perturbations in the bus voltage (load voltage) to consume the power requested by the load [51][52][53]. Therefore, CIL is not an accurate representation of the loads in DC Microgrids with commercial loads. In any case, CPL models can be used to represent loads interfaced with DC/DC converters having variable power consumptions. In that case the power requested by the load is just updated in the model, but the load keeps behaving as a CPL: the current changes according to the bus voltage perturbations to ensure the desired power consumption.
In addition, the load voltage was considered equal to the DC-bus voltage; hence, there was no need for an additional DC/DC converter for the load interface. Finally, since the load was disconnected in OR3, a switch SW Load was included in the EMS circuit to disconnect and reconnect the load from the DC-bus. Figure 3 presents the operating regions defined around the technical operating limits established for the battery SOC. Such regions should consider the different operating modes of the PVS (MPPT and PDT) and the battery and load connection/disconnection depending on the requirements of each operating region. The following subsections explain the types and operating ranges of the battery SOC and the control strategies applied to the regions proposed in this work: overcharge, normal charge, and bulk charge. It also describes the requirements to move from one region into another and connect/disconnect the battery and the load so that voltage fluctuations are as small as possible.

Energy Management System Proposed to Control the SPVS
To provide a better explanation of the EMS, the three regions are described in the following order: Region 1 (normal operation); Region 2 (overcharge); and Region 3 (bulk charge).

Region 1 (Normal
In this region, the PVS should always operate in MPPT in order to utilize its maximum power generation. Because the battery is responsible of the global power balance at all times, it should always be connected (SW Bat = 1). Additionally, the load is always connected in this region (SW Load = 1) because the PVS and the battery, combined, can produce sufficient power to supply the power demanded by the load. The restrictions and considerations to enter this operating region are detailed in the subsections describing Regions 2 and 3. To leave this operating region, the battery just needs to reach its SOC limits. The state diagram in Figure 5 enables a better interpretation of those interactions.

Bat Load
Region 2 (Over charge)

Region 2 (Overcharge
This operating region occurs when the power generated by the PVS is higher than that consumed by the load and the battery reaches SOC Max . For that reason, the backup ESS (in this case, the capacitor) must replace the battery and take control of the power balance and the voltage at the DC-bus, keeping the load connected at all times (SW Load = 1). It should be noted that, for the EMS to operate in this region, the battery SOC should be equal to or higher than the maximum limit (SOC ≥ SOC Max ). In this OR, there are different operating scenarios depending on the values of the power generated by the PVS, the power demanded by the load, and the maximum and minimum voltage limits assigned to the capacitor, which are explained below and presented in the state diagram of Figure 6.

•
(P pv ≥ P Load ): In this operating state, the battery must be disconnected (SW Bat = 0) and, at the same time, the PVS should operate in PDT. As a result, the capacitor is in charge of supplying and storing the power required by the system to perform the PDT and to control the DC-bus voltage. In order to prevent the capacitor from fully discharging and the system from collapsing due to the lack of power to control the DC-bus, the system operates in PDT mode until the capacitor reaches a voltage below (Vc < V Bat − ∆Vc), being ∆Vc the maximum allowable voltage drop for the capacitor. In the case that this limit is violated, the PVS should change to MPPT mode so that the capacitor is charged until it reaches the battery voltage (V Bat ), thus exploiting the excess power generated by the PVS. Note that, in the management system, the voltage of both the capacitor and the battery should always be sensed to perform this control action. Additionally, the capacitor should be protected against over voltage conditions. For that reason, if during the operation in PDT mode the capacitor reaches the maximum allowable voltage (Vc Max ), then the PVS is operated in open circuit voltage (Voc) until the capacitor reaches a safe voltage (Vc = Vc Max − ∆Vc). This is achieved because the capacitor is forced to supply the power required by the load, thus enabling the reduction of its voltage. When the capacitor reaches a safe voltage, the PVS starts to operate in MPPT to provide power. As a result, the operating mode can change to PDT if the power conditions are met (P pv ≥ P Load ); otherwise, the PVS continues operating in MPPT in Region 1 as long as the power generated by the panel is lower than that required by the load (P pv < P Load ) and the capacitor's voltage is lower than or equal to that of the battery (Vc ≤ V Bat ). This forces the capacitor to discharge before changing operating regions (from 2 to 1), thus reducing the voltage fluctuations at the DC-bus when the battery is connected. • (P pv < P Load ): In this state, the PVS power reaches a lower value than that of the load. This is due to the decrease in Solar Radiation (SR), the variation of T, or higher power demanded by the load; therefore, the PVS should increase the delivered power and start to operate in MPPT, maintaining the battery disconnected (SW Bat = 0). The system continues operating in Region 2 as long as the condition to change to OR1 (described in the previous paragraph) is not met. If that condition is not satisfied and the condition (P pv ≥ P Load ) remains, the capacitor is charged up to the battery nominal voltage and the PVS operates in PDT once again.

Region 3 (Bulkcharge : SOC ≤ SOC Min )
When the battery reaches the minimum allowable SOC, it should not supply power to the load. For that reason, the battery is disconnected when the operating state SOC ≤ SOC Min is reached, while the capacitor is in charge of supplying the demanded power in such a way that the global power balance is satisfied and the voltage level at the DC-bus is controlled. The previous condition will be fulfilled as long as the capacitor does not reach the minimum voltage level established for its operation (Vc Min ). At the same time of the battery disconnection, a warning signal is sent to indicate that the system is operating in Region 3 and it might be de-energized. Such signal takes a value of one (Warning = 1) when the battery reaches its minimum SOC and continues that way until the SOC achieves a safe operating level, at which point it changes to zero (Warning = 0). That warning signal is adapted in the management system to alert users of the equipment that they should store their data because the system will stop supplying power for a period of time.
When the system is operating in Region 3, two operating conditions can be created: (1) The generated power is higher to or equal than the power demanded by the load (P PV ≥ P Load ); therefore, the system should charge the capacitor until its voltage reaches or exceeds the battery voltage in order to connect the latter (SW Bat = 1), while charging the battery until it reaches a safe recovery level (SOC Rec ). Only when this condition is met, the warming is off (Warning = 1) and the system starts to operate in Region 1. (2) The generated power is lower than the power demanded by the load (P PV < P Load ). If the capacitor reaches its minimum voltage in this condition, the load is disconnected, while the battery is kept disconnected until the capacitor reaches a voltage level equal or higher than the battery voltage. When this condition is satisfied, the battery is connected, and its charge cycle is started until its SOC is equal to or higher than SOC Rec . Only when this condition is met, the load is reconnected, the warming signal is off and the system can start to operate in OR1. It is important to highlight that, by using the hysteresis band generated between SOC Min and SOC Rec , it is possible to avoid the connection and disconnection of the battery for short periods of time and the load connection and disconnection when the second operating condition is fulfilled. In an operating state of variable demand, this prevents fluctuations and continuous transients in the system. Additionally, in OR3 the PVS operates in MPPT at all times so that the maximum power is generated. The state diagram in Figure 7 is a graphic representation of this strategy.

Simulation Results
This section describes the simulations that were conducted to make sure that each one of the regions and operating states in the EMS are satisfied and enable the SPVS to operate adequately. In order to simulate the components of the SPVS and the control strategies, it was employed the specialized software PSIM. The BP585 single mono-crystalline PV panel, formed by 36 cells in series, was selected. Table 1 presents the module characteristics in standard conditions (STC-irradiance, 1 kW/m 2 ; and cell temperature, 25 • C). To estimate the module parameters, the mathematical formulation proposed in [56] and the data in standard conditions were used. Changes in the irradiance and temperature are also considered by changing the short-circuit current of the PV source model, which is a common simulation practice as it is reported in [56]. It must be highlighted that the adopted PV model is also valid for representing modules currently available at the market, which exhibit characteristics similar to the ones of the PB585 module, e.g., M36PCS (85 W), P36PCS (85 W), among others. The nominal voltage of the lithium-ion battery (used to form the ESS) was 12V, with three cells in series, one set of cells in parallel, and a nominal capacity of 5.2 Ah. The limits SOC Max = 0.9 and SOC Min = 0.1 were defined in the management strategy to extend the lifetime of the device [57]. Additionally, for an adequate transition from Region 3 to Region 1, the EMS implemented a SOC Rec , which was specified in each test scenario. The parameters of the different elements that formed the control strategies and the converters used to design this SPVS are described in the references cited in Section 3. For a better understanding and analysis of the results obtained by the proposed EMS, this section starts with the validation of each one of the operating regions considering the variation in photovoltaic generation and the power demanded by the load. For that purpose, it was necessary to use short simulation times and an analysis of the transients of each OR and their transitions, as well as the DC-bus voltage. Finally, a 24-h test scenario was defined (with load and solar irradiation variations sensed by a laboratory of the Universidad Nacional de Colombia, located in Medellín-Colombia) to evaluate the behavior of the SPVS in all the operating regions.

Simulation and Validation of the Proposed Operating Regions
This subsection analyzes each operating region in order to validate all the conditions and constrains considered in the proposed EMS. For that purpose, the EMS parameters were adjusted as follows.
The capacitor was calculated by analyzing the behavior of the PVS when PDT was applied in the presence of the battery and an irradiance of 1000 W/m 2 ; thus, obtaining the scenario of maximum power in which the capacitor will operate. After analyzing the results of this scenario (see Figure 2), P c = 10 W was defined so that the capacitor had sufficient power to assume the power excess generated in this operating mode. The maximum voltage drop of 1 V was also considered for a time of 1 s, which requires a 0.833 µF capacitor. Based on the capacitor calculation, the values Vc Max = 18 V, Vc Min = 5 V, and (∆Vc = 1 V) were assigned. It is considered a margin of 60% (upper limit) and 50% (lower limit) of the nominal voltage of the battery in order to establish the voltage levels in this EMS and offer an adequate power level in the capacitor. It is important to highlight that the capacitor voltage limits vary depending on the specific equipment and manufacturer. In addition, it was considered ∆V PV = 0.2 V as the voltage rate in the power control strategy of the PVS and assigned a value of SOC Rec = 0.10005 as the recovery SOC of the battery. These values were selected in order to validate the operating states in a short period of time and analyze the transients generated by the fulfillment of the conditions as well as transitions from one OR to the next. Finally, each one of the proposed scenarios has an initial load, PVS power generation, and variable power demanded by the load so that all the states and regions in the EMS can take place. Note that all the test scenarios in this work use the same minimum and maximum SOC limits previously defined.

Region 1 (Normal
This subsection describes different test cases in the same scenario, in which power generation and demand in the SPVS are changed to test the conditions established for the system operation in Region 1 (normal) and Region 2 (overcharge). Figure 8 presents this test scenario, describing the system dynamics under the proposed EMS. PVS power generation was divided into three levels. The first level was generated by a solar irradiance of 1000 W/m 2 , which resulted in approximately 84 W produced by the PVS. At t = 6.2 s, a 40% reduction (400 W/m 2 ) was applied, and the PV generated 50 W after that. Finally, another 40% reduction (400 W/m 2 ) was applied at t = 6.5 s, which generated a total drop of 80% in the maximum irradiation from the start of the test scenario until the time under analysis. Thus, the final power delivered by the PVS was approximately 16 W. Additionally, this scenario considered the variation in the power demanded by the load, which was 20 W at t = 0 s, 90 W at t = 2 s, and, finally, 30 W at t = 3 s. The time interval between seconds 4 and 5 presents a load increase with positive slope from 30 W to 50 W, which is maintained until t = 6 s. Finally, the load drops to 30 W from t = 6 s to the end of the period under analysis. The previous scenario of PVS generation and power demand by the load is defined in such way that transitions between ORs 1 and 2 occur and the PVS operates in PDT and MPPT. The test simulation was divided into 5 time intervals for a correct interpretation of the test scenario as well as the PVS behavior based on the different variations. The intervals represent a scenario where power generation and demand change, one exceeding the other. To validate the operation of the proposed EMS in OR1, the battery SOC started at 0.5 so that, during the entire simulation time, the EMS stayed within the ranges assigned to operate in this region. Figure 9 presents the behavior of the system when load and demand variations were applied. Remarkably, the PVS operated in MPPT at all times, keeping the battery and load connected throughout the simulation, while the battery was in charge of supplying and storing the excess power generated by the PVS so that a global power balance could be achieved. The subfigure that presents the voltage assigned to the PVS by the DC/DC converter shows the way the EMS modified that voltage as the irradiation on the panel varied (fell), always staying in MPPT mode. This validates the correct operation of the external control strategy applied to obtain the maximum power from the PVS. Moreover, it was proved that the management strategy selected to control the ESS could be used to control the DC-bus voltage, always keeping the voltage near its nominal value (V DC = 48 V), and the power demanded by the load is supplied and absorbed without affecting the MG operation. In this test system, the power flow supplied by the ESD is provided by the battery, since the switch of the ESD is closed (please refer to Figure 4 to check the switch). The voltage peaks in DC bus are associated with strong variations in the demand, which are mitigated by the control strategy. This test scenario does not consider the transition to other ORs because that is validated in ORs 2 and 3.

Region 2 (Overcharge : SOC ≥ SOC Max )
In order to validate the conditions proposed for OR2, the same test system presented in Figure 8 was used. The validation of the correct operation of the EMS is presented in Figure 10, which details the control actions performed by the EMS in different operating and demand scenarios of OR2 divided into time intervals based on variations in load and PVS generation. The waveforms of battery SOC and voltage demonstrate that, during most of the simulation time, the system operated with SOC ≥ SOC Max and the battery was disconnected, while the capacitor was in charge of supplying and storing the excess power required by the system to achieve the global power balance. As a result, the sub-cycles of the battery associated with the operation in PDT in this OR could be eliminated. In Interval 1, the generated power was higher than the demand of the system and, because the SOC level was lower than the maximum established limit, 0.9 (SOC = 0.89995), the system started operating in OR1. As the simulation progressed, the battery was charged until it reached the maximum allowable limit for the SOC at t = 0.36 s. When this happened, the operation of the system changed to OR2, the battery was disconnected, and the PVS system was operated in PDT. This can be observed in the graph that illustrates the voltage of the battery and the voltage assigned by the converter to the PVS (PV voltage). This operating mode continued until Interval 2. The capacitor voltage shows that this device was in charge of supplying and storing the excess power associated with the PDT during Interval 1, when the system operated in that mode. In Interval 2, the power state in the SPVS changed: the demanded power was higher than the power generated by the PVS. For that reason, the photovoltaic system changed to operate in MPPT at t = 2 s, reducing the PV voltage so that the power required by the load was delivered. Because the power generated by the PVS was not sufficient to cover the load demand, the capacitor should have compensated for that deficit. During this entire interval the battery was disconnected because the system did not meet the conditions to change operating regions. In Interval 3, the load conditions led the system to operate in PDT once again, increasing the voltage of the PVS until it reached an adequate power level. Because the capacitor should have delivered the power difference in this operating mode, its voltage started to drop (as can be seen from the voltage waveform), keeping the battery disconnected. Interval 4 presents different load levels, which were correctly managed by the EMS. In the simulation, the 4 s ≤ t ≤ 5 s interval exhibited a step-shaped load increase during which the PDT never lost control over the generation and immediately adapted to such an increase. This produces voltage dropped in V pv and, as a result, the power generated by the PVS rose in a controlled manner. In that interval, the DC-bus presented higher voltage fluctuations than in other intervals in the test scenario, to which the capacitor and the management strategy responded adequately. After t = 5 s, the load was constant (P Load = 50 W) until t = 6 s, while the system was operating in PDT with a disconnected battery without any problem. At t = 6 s, the demanded power dropped to 30 W, because the PDT conditions were maintained, and the system continued operating in this OR without any problem. Additionally, Interval 4 presented a drop in SR, which had an impact on the power generated by the PVS and resulted in an immediate reduction in power produced by the PV panel. During the first power reduction, which occurred in the 6.2 s ≤ t ≤ 6.4 s interval, the power generation stayed above the power demanded by the load; for that reason the PVS operateed in PDT mode at all times. Note that, although the reduction in power generated by the PVS was important, the EMS was not affected at all, correctly responding by reducing the reference voltage of the PVS. Nevertheless, charge and discharge power fluctuations were produced in the capacitor, although smaller than those generated during the step-shaped increase in the load in the 4 s ≤ t ≤ 5 s interval. Finally, a second drop in SR took place between Intervals 4 and 5, 6.5 s ≤ t ≤ 6.7 s, which caused the power generated by the PVS to drop below the power demanded by load at t = 6.6 s. The PVS then changed from PDT to MPPT mode. The EMS for OR2 maintained the system in that OR until the capacitor reached the battery voltage at t = 6.8 s, satisfying the condition for battery reconnection in Interval 5. For that reason, the SPVS started to operate in OR1, while the battery SOC noticeably fell since t = 6.8 s until the end of the simulation. Remarkably, in the entire test scenario, the operating voltage of the DC-bus was maintained near its nominal voltage (V DC = 48 V), with a maximum variation of 0.72%.
The test scenario in Figure 10 does not show the charge/discharge action of the capacitor when the maximum and minimum limits are reached. For that reason, Figures 11 and 12 present the behavior of the system when forced into these two operating states in order to demonstrate the adequate operation of the system and the satisfactory performance of the proposed EMS. Figure 11 illustrates a scenario where the capacitor reaches Vc Max when the PVS is operating in PDT. Thus, we assigned an initial voltage (Vc = 18.1), SOC ≥ SOC MAX , and the power demanded by the load (40 W). These conditions forced the system to discharge the capacitor to a safe voltage level (Vc = 17 V in this case). For that purpose, the EMS operated the system in Voc until the capacitor voltage reached the safe level established by the control strategy, thus generating P PV = 0 W and forcing the capacitor to supply all the power required by the load. When the capacitor reached the safe voltage level, the system switched modes to operate in MPPT at t = 0.388 s until it reached the required power level to continue operating in PDT at t = 0.397 s, which can be seen in the graph of PVS, load, and capacitor power. Figure 11 presents the voltage levels assigned by the control strategy (reference) and the converter to the PVS, as well as the stabilization of the capacitor voltage in the levels assigned by the EMS. Note that if (while the capacitor is being discharged) the system changed the load conditions and it was necessary to switch to OR1, this would only occur if the capacitor voltage equals that of the battery. This was guaranteed by the condition for the transition from OR 2 to OR1 in Figure 6. Figure 11. Control strategy to reduce the power generation in the PVS in order to discharge the capacitor when Vc ≥ Vc Max in PDT mode. Figure 12 illustrates the test scenario in which the capacitor reaches the minimum voltage limit allowable in OR1, with the PVS operating in PDT. In this scenario, the load power was 40 W and SOC = 0.91, thus generating V Bat = 11.94 V. In order to violate the minimum voltage limit (Vc < V Bat − ∆Vc), an initial voltage of 10.92 V was assigned to the capacitor so that the system charged it. Due to the previous conditions, the power graph of the devices in Figure 12 shows that the system, when the simulation started, immediately operateed in MPPT until the capacitor reached the minimum allowable voltage level to operate in PDT in OR2 at t = 0.242 s, when it d to PDT Vc ≥ V Bat . Importantly, the power to charge the capacitor was extracted from the excess power of PVS generation. Additionally, the figure of the voltage levels in this test scenario presented different voltage signals that can be used to interpret the way the system worked when the capacitor was charged in OR2. At the start of the simulation, the capacitor voltage was under the allowable level, i.e., a volt below that of the battery voltage (∆Vc = 1 V) . For that reason, the voltage assigned to the PVS by the control strategy resulted in the system operating in MPPT until the capacitor voltage equals that of the battery at the moment of the disconnection. After that point, the system operated in PDT again until the load and generation conditions in the SPVS changed. In order to validate the adequate system operation in OR3, this subsection proposes two test scenarios to study the conditions that can exist when the SPVS works in that region. Figure 13 shows the test scenario that represents the operating condition in which the battery reached the SOC min and the power of the PVS changed to P PV ≥ P Load . Such a scenario considered an initial SOC of SOC = 0.100025 and SOC Rec = 0.10005, and the system started to operate in OR1. Additionally, the power generated by the PVS (P PV = 84 W) was constant and the power demanded by the load was variable. More specifically, the load started with a demand of 120 W and, as a result, the system changed from OR1 to OR3 at t = 0.104s. When the SPVS changed to OR3, the warning signal took a value of 1, which indicated the users that the system may have been close to a complete load disconnection. After t = 0.2 s, the power demanded by the load decreased (P Load = 60 W) until t = 1.6 s. Due to that drop in the load, the power state of the system changed (P PV ≥ P Load ), and as a result, the capacitor started to charge. When the condition Vc ≥ V Bat was satisfied at t = 0.806 s, the EMS reconnected the battery and started the charging process. Importantly, only when the SOC reached the recovery level at t = 1.446 s the system started to operate in OR1. At that point, the warning signal took a value of zero, which indicated there was no risk of load disconnection anymore. Finally, in OR1 there was a load increase (P Load = 60) W, but the system continued operating without any problem and storing the generated excess power in the battery. Note that, during the entire test scenario, the system operated in MPPT to take advantage of the power generated by the PVS and escape the bulk charge condition.
In this simulation the EMS maintained the voltage level of the DC-bus approximately equal to the nominal voltage (V DC = 48) V, presenting maximum variations of 4.5% and 0.2% on average. Remarkably, the strongest voltage fluctuations were caused by variations in the power demanded by the load, under which the sliding-mode control strategy used for the batteries offered an excellent performance, as can be seen in Figure 14.  Figure 13. Test system in OR3 (operating condition (P PV ≥ P Load )).  Figure 14. Voltage of the DC-bus test system in OR3 (operating condition (P PV ≥ P Load )). Figure 15 presents a test scenario to validate the operating conditions when the load is disconnected. Such a scenario considers an initial SOC of 0.100025 and SOC Rec = 0.10005. As in the previous scenario, the power generated by the PVS (P PV = 84) W was considered to be constant and the power demand by the load, variable. The systems started its operation in OR1, with a power demand of P Load = 120 W; for that reason, it changed to OR3 at t = 0.036 s. Immediately after the SPVS changed operating regions, the battery was disconnected and the warning signal took a value of 1, indicating load disconnection risk. At the same time, the capacitor started its discharge process, which was accelerated at t = 0.4 s due to an increase in the power demanded by the load (P Load = 140 W). At t = '0.507 s, the capacitor reached its minimum voltage limit (Vc ≤ Vc Min ); for that reason, the load was disconnected and the charging process of the capacitor was started. When the capacitor reached the battery voltage at t = 1.021 s, the latter was reconnected and its charging process was started until it reaches the SOC Rec . When the recovery SOC was reached at t = 1.28 s, the load was reconnected with a value of P Load = '140 W, thus forcing the system to operate in OR1.
At that time the warning signal took a value of zero, indicating the end of the disconnection risk. During the remaining simulation time, the SPVS operated in OR1 while the battery was supplying the missing power to the load. In addition, the excess power produced by the reduction in the power demanded by the load (P Load = 80 W) at t = 1.6 s was stored. In this test scenario (as in the previous one), the PVS operated in MPPT all the time, correctly following the reference voltage assigned by the control strategy of the DC/DC converter.  Figure 15. Test system in OR3 (with disconnected load).
Regardless of the load and battery disconnection, the capacitor maintained the voltage level in the DC-bus constant. The bus exhibited high voltage variations when the load was connected and disconnected, which were correctly mitigated by the adopted control strategy. The capacitor dealt with the excess power associated to the control of the DC-bus when the load was disconnected (t = 0.507 s), and the battery was responsible for managing such power when the load was reconnected (t = 1.285 s). This situation can be seen in Figure 16.  Figure 16. Voltage of the DC-bus test system in OR3 (with disconnected load).

24-h Test Scenario
After the correct operation of the SPVS was validated in each one of the operating regions defined in the proposed EMS, a 24-h test scenario was defined using the irradiation values reported by NASA for the University Nacional de Colombia located in Medellín, Colombia, [58] and the same PVS and operating conditions as in the previous power generation tests. Moreover, such scenario uses a power curve that represents the typical behavior of a residential building in the location under study [59]. The power levels were adjusted to observe the different operating regions proposed in this work; Figure 17 presents those values. Because the simulation times in this scenario were longer than in the previous subsection, the EMS parameters were adjusted: for the calculation of the capacitor, P c = 10 W was considered, as well as a maximum voltage drop of 1 V, and a discharge time t = 60 s. Those values result in a 49.9 F (almost 50 F) capacitor. In addition, a Vc Max = 18 V, Vc Min = 5 V, and (∆Vc = 1) V were defined. For the PVS voltage rate, the control strategy considered δV PV = 1 V. Finally, SOC Rec = 0.2 was established to create an adequate hysteresis band (10% of the SOC) and to avoid multiple transitions between OR1 and OR3.  Figure 18 presents the results obtained when the EMS was applied in the power and demand scenario described in Figure 17. The analysis begins at hour 6, when the system started with SOC = SOC Min and, for that reason, it entered in OR3, disconnecting the battery and producing the load disconnection. Because the solar irradiance was not available, power was not generated at that time. Nevertheless, the PVS operated in MPPT mode waiting for an increase in irradiance. The previous operating condition was maintained until hour 7, when the PVS started to generate power due to an increase in the irradiance. First, it charged the capacitor and then connected the battery when Vc ≥ V bat at t = 7.67 h. The voltage waveforms of both the battery and the capacitor show that the battery charging process started after that point. At t = 8.64 h the battery reached SOC Rec = 0.2; therefore, the load was connected and the SPVS moved into OR1, keeping the PVS operating in MPPT. Noticeably, in this state, the excess power and power requirements were managed by the battery without any inconvenience. At t = 12.10 h the battery reached SOC Max = 0.9; for that reason, the system moved to OR2, which caused the PVS to switch modes to PDT and the immediate disconnection of the battery, while the capacitor was in charge of supplying and absorbing the excess power associated with PDT mode. At t = 12.60 h the capacitor reached the maximum voltage limit allowable in OR2; as a result, the EMS set the PVS to operate in open-circuit voltage so that the capacitor was forced to supply the power required by the load and reach an adequate operating voltage level using the ∆Vc previously established. This can be seen in the sub-figures of both battery and capacitor voltage and the power of the elements in the MG. In the 13.07 h ≤ t ≤ 13.93 h interval, it is observed that the EMS did not allow the capacitor to violate the voltage drop limit established above, (∆Vc = 1) V, forcing the capacitor to charge up to battery voltage every time that limit was reached. This was achieved using the transition of the PVS from PDT to MPPT, which led to an increase in the power generation in the PVS, and the excess power was injected into the capacitor to charge it (see Power sub-figure). In the 13.93 h ≤ t ≤ 16.09 h interval, the system operated in PDT, while the capacitor was responsible for guaranteeing the global power balance operating in accordance with the conditions defined for OR2. Due to the reduction in generation after hour 13, the system met the conditions to change to OR1 at t = 16.10 h; and in that instant the capacitor reached the voltage level of the battery, and the battery was reconnected. From that moment on, the PVS operated in MPPT, while the battery was responsible of supplying the excess power needed to serve the load due to the reduction in PVS generation. The battery SOC started to decrease until t = 18.53 h, when it reached the minimum allowable limit; consequently, the system changed to OR3. Due to the amount of power demanded by the load at that time, the capacitor was taken to the minimum allowable voltage limit and, as a result, the load was disconnected. After that instant, the capacitor started to charge by absorbing the small amount of energy generated by the panel, reaching the voltage of the battery at t = 19.23 h (when the latter is connected). When the battery was reconnected, the power generated by the PVS was limited by the low irradiance, and the battery did not reach the SOC Rec ; for that reason the load remained disconnected until hour 6. The bottom sub-figure in Figure 18 presented the warning signal of the system, which was activated every time the system entered OR3 and deactivated when the recovery SOC was reached, it forced the system to enter in OR1. The simulation demonstrated the correct operation of the warning signal in the scenario under analysis.

Conclusions
This work proposes an energy management strategy applied to a stand-alone DC microgrid formed by a PVS, a battery, a not-critical DC load, and a capacitor as a backup storage element. Such EMS manages the connection and disconnection of the battery and the load, as well as the generation of the photovoltaic system and the ESD charge/discharge process, in order to guarantee the power balance and the operation of the system within allowable technical limits, thus increasing the lifetime of the devices that form the MG. The validation of the proposed EMS demonstrated that, by implementing a backup energy storage element (in this case a capacitor) and PVS generation control, load disconnections and inappropriate use of the main storage device can be reduced. Furthermore, using the auxiliary capacitor, the charge and discharge sub-cycles produced by the PDT control strategy can be eliminated. Those advantages extend the battery lifetime and reduce the costs associated with the maintenance and disconnection of the microgrid. In addition, the installation of SPVSs with the proposed EMS, into education buildings, allow to reduce the energy purchasing from the utility grid, the dependency of fossil fuels to reduce the environmental impact, and also reduce the operational complexity of the system in comparison with systems based on other renewable resources, e.g., wind generation, small scale hydroelectric, among others. The main limitation of the proposed solution is the total load disconnection; hence as future work, the fragmentation of the load or the integration of multiple critical and non-critical loads into the microgrid will be considered. Those considerations allow the implementation of more complex load shedding strategies, multiple generation and storage systems integration to improve the energy storage capacity of the MGs. Moreover, microgrids could be connected to electrical grid where possible, thus enabling a cheaper energy dispatch that enhances the financial impact of the microgrid and improves the quality of the service provided to final users.