Power Management Control Strategy Based on Artificial Neural Networks for Standalone PV Applications with a Hybrid Energy Storage System

Standalone microgrids with photovoltaic (PV) solutions could be a promising solution for powering up off-grid communities. However, this type of application requires the use of energy storage systems (ESS) to manage the intermittency of PV production. The most commonly used ESSs are lithium-ion batteries (Li-ion), but this technology has a low lifespan, mostly caused by the imposed stress. To reduce the stress on Li-ion batteries and extend their lifespan, hybrid energy storage systems (HESS) began to emerge. Although the utilization of HESSs has demonstrated great potential to make up for the limitations of Li-ion batteries, a proper power management strategy is key to achieving the HESS objectives and ensuring a harmonized system operation. This paper proposes a novel power management strategy based on an artificial neural network for a standalone PV system with Li-ion batteries and super-capacitors (SC) HESS. A typical standalone PV system is used to demonstrate and validate the performance of the proposed power management strategy. To demonstrate its effectiveness, computational simulations with short and long duration were performed. The results show a minimization in Li-ion battery dynamic stress and peak current, leading to an increased lifespan of Li-ion batteries. Moreover, the proposed power management strategy increases the level of SC utilization in comparison with other well-established strategies in the literature.


Introduction
Fossil fuels cause emissions that contribute to an increased greenhouse effect, leading to overall environmental deterioration [1].To reverse these undesirable scenarios, there is a remarkable growth in the development and use of new and cleaner energy sources.The use of this type of energy, obtained through the direct transformation of natural resources, is currently studied with great interest by the scientific community, due to its complexity, variability, and unpredictability.However, this unpredictability could be mitigated by resource complementarity (hybrid energy systems) or the introduction of electrical Energy Storage Systems (ESS), recognized as one of the most promising approaches [2,3].However, these systems suffer from some operational problems and degradation of performance, especially when subjected to high charge/discharge currents, irregular load patterns, or frequent deep cycles [4,5].Regular ESSs are the most expensive systems in a common standalone power application, but only last a few hundred charge/discharge cycles, making them economically unsustainable [6,7].To mitigate these disadvantages, Hybrid Electric Storage Systems (HESS) began to Energies 2019, 12, 902 2 of 24 emerge [8], combining the benefits of two or more technologies.Recently, several studies have included super-capacitors (SC) in HESSs due to their characteristics: high power density, absence of memory effect, and relatively low cost.The combination of SC and Li-ion batteries is the most used topology in HEES, combining the high power density of SCs with the high energy density of Li-ion batteries.The purpose of this combination is to avoid severe fluctuations in the charging/discharging current of the Li-ion batteries, making it possible to increase the life of the Li-ion batteries and consequently increase the profitability of the HESSs [9].Many combinations of ESSs integrating a HESS have been proposed to take advantage of the different benefits of each ESS.
HESSs have different architectures that can couple the ESSs to the power network via AC, DC, or hybrid coupling with the help of different types of power converters that control the power flow of HESS components.For standalone applications, coupling ESSs through a common DC bus is the preferred choice, because is a simple and robust architecture that requires no synchronization for the integration of the various ESSs.HESSs with DC coupling can be configurated in passive, active, or a combination of both architectures, either in parallel or in series.In the passive architecture, the terminals of the ESSs are directly connected to the DC bus, and power sharing is purely determined by the ESS's electrical characteristics.The disadvantage of passive HESS architecture is that it cannot utilize the full capacity of different technologies of ESSs in the same HESS, because of the different electrical characteristics of each ESS technology.To overcome the drawbacks of HESSs passive architecture, an active architecture has emerged.In active HESS architecture, bi-directional DC/DC are employed between ESSs and the DC bus voltage to control the power flow to and from other ESSs.In this architecture, all the ESSs can be operated within a wider range of voltages, enabling the connection of different ESS technologies in the same system.However, this has some disadvantages, for example, it requires a sophisticated control algorithm to actively allocate power between ESS elements and maintain the stability of the grid at the same time [10,11].In contrast, the architecture with AC coupling is much more flexible than the DC coupling, although it requires a more sophisticated control and conditioning system, so power converters can operate in parallel [7].
In addition to HESS architecture design, the use of an appropriated power management strategy is another critical aspect that determines the effectiveness of HESS in mitigating charge/discharge stress on ESSs.These strategies can be divided into two broad categories: based on rules (RB) or on optimization algorithms.The RB strategies are heuristic methods, which follow a set of rules determining control action.This type of strategy has the main advantage that it requires a small computational cost, making it the solution most often applied in commercial systems.The RB strategies fall into two categories: Deterministic (based on deterministic rules) and Fuzzy (based on diffuse rules).In deterministic strategies, decisions are made according to a set of predefined fixed rules based on the parameters of the system.The deterministic strategies can be defined as On-Off, Power Follower and Frequency-Based.The On-Off strategy is the most classic, establishing its rules on the operating limits for each of the HESS components.This strategy is widely used because of the reduced need of computational and physical resources.In this type of strategy, the best efficiency of the system is not considered, but rather the main objective is operating within the working parameters [12].The Power Follower strategy is an evolution of the On-Off strategy, modifying the operating rules to not only operate within the limits of each ESS, but also maximize the efficiency of the system.Decisions are usually made based on the state of charge (SOC) of all HESS elements.This strategy is also widely used commercially, mainly in HESSs present in electric vehicles [13].The Frequency-Based strategy is based on the decomposition of electric energy demand into high-and low-frequency components.High-frequency components are attributed to HESS elements with high power density and lower energy density, such as SC, whereas low-frequency components are attributed to elements with lower power density and higher energy density, such as Li-ion batteries or fuel cells.Thus, it is possible to mitigate the transients of the load, removing stress to elements such as the batteries, increasing their useful life [14].In [15], the authors presented a HESS power management strategy based on frequency control, which was tested with a HESS composed of lead acid batteries and SC.The study concluded Energies 2019, 12, 902 3 of 24 there was a reduction in battery stress and a consequent increase of its useful life.In comparison with the RBC strategy, it was possible to improve the system's response time to disturbances in the DC bus and it was almost possible to suppress the initial overshoot.In [16], authors proposed a HESS power management strategy based on frequency control.Li-ion batteries were used to fill low-frequency load components, while SC was used to fill components of demand with high frequency.As with the RBC strategy, there was an improvement in stress to Li-ion batteries and a consequent increase in their useful life.In [17], the authors proposed a new power management strategy of HESS applied to electric vehicles: the adaptive frequency strategy.In this strategy, a simplified digital adaptive filter was used in order to guarantee the convergence of the solution and to decrease the computational cost associated with control in real time.This power management strategy was successfully tested using a commercially available half-bridge interleaved DC/DC converter.This strategy increased the operational efficiency of the DC/DC converter, especially in low load regimes.
In Fuzzy strategies, decisions are taken within a defined range of a set of rules.Thus, it is possible to obtain the decisions for different system's operating conditions, thereby decreasing errors [18].Fuzzy strategies can be defined as Classic Fuzzy, Adaptative Fuzzy and Fuzzy with predictive models.The Classic Fuzzy strategy is based on classic Fuzzy logic.Entries are fuzzified and entered into functions with the purpose of filtering them using an if-then rule set.These rules were defined a priori, when the system was designed, based on human experience.Finally, the signal is defuzzified to obtain the system control signals.In [19], the SOC and the state of power (SOP) of the Li-ion batteries and SC were estimated based on the Kalman filtering algorithm and then introduced in the fuzzy logic algorithm to calculate the optimum power to be supplied by the Li-ion batteries.In this method, when the SOC of the batteries is low, Fuzzy logic is applied and the SCs charge the Li-ion batteries to avoid low SOC states and therefore increase their service life.When the SC SOC is low and the SOC of the batteries is high, the batteries then charge the SC.The Adaptative Fuzzy strategy is similar to the classic Fuzzy strategy, but the rules are fixed a priori.In this strategy, rules are constantly being switched, adapting to the current operating conditions of the system, thus refining the control outputs to make them more precise for each condition [20].The Fuzzy strategy with predictive models, besides having dynamic rules influenced by the operating conditions of the system, integrates prediction algorithms in order to get an approximation of the future operating scenarios.Thus electricity or fuel prices can be predicted in order to best manage the HESS [21].A Fuzzy HESS power management strategy based on Markov random prediction was introduced in [22].Thus, the management of HESS takes into account the forecasts of future load and can execute a division of powers more successfully.
Strategies based on optimization algorithms aim to minimize an objective function.Generally, the minimization of this objective function has the purpose of reducing the operating cost during a certain period, or increasing the useful life of the HESS elements.This category encompasses two types of strategies: global optimization strategies, real-time optimization strategies [23].Global optimization strategies are designed to achieve the optimal global solution, based on prior knowledge about future operating conditions.The real-time application of this method is limited due to high computational costs; usually it is only used to find a reference solution to analyze and adjust.The global optimization strategies can also be divided into: Linear Programming [24], Dynamic Programming [25], Genetic Algorithms [26], Optimal Controllers [27] or based on Particles Swarms Optimization (PSO) [28].On the other hand, real-time optimization strategies apply instant power-handling decisions in order to minimize an objective function.In general, the mathematical formulation of this strategy must be adequate for real-time application in terms of computational requirements and memory resources.Real-time optimization strategies can also be divided into: Equivalent Cost Minimization Strategy (ECMS) [27], Pontryagin Minimum Principle (PMP) [29], Model predictive control (MPC) [30,31], Adaptive Dynamic Programming (ADP), Extreme Search (ES) [32], Robust Control (RC) [33] and Artificial Neural Networks (ANN) [34].
In [35], a dynamic power management strategy was presented for an autonomous system with a HESS consisting of Li-ion batteries and SC, and with a second storage source, a fuel cell.The power management strategy generates real-time references to the converter current controllers associated with the fuel cell, Li-ion batteries and SC, using a moving average filter.The simulations and experimental tests reinforce the efficiency of the moving average filter, dividing the average current reference to the Li-ion batteries and fuel cell, while efficiently assigning the transient and oscillatory demand components to the SC.In [31], a MPC power management strategy was implemented in order to control the SOCs of the batteries and the SCs to keep them within the standards.This is a valid strategy despite the inconvenience of relying on discrete system models and the considerable computational cost.
Strategies based on optimization algorithms are more robust and efficient when compared with classical control strategies [36], because the latter, including RBC and frequency-based strategies, are usually sensitive to parameter variation and need an exact mathematical model of the system [36,37].Hence, optimization strategies based on artificial neural network (ANN) are developed to reduce the impact of parameter variation and to optimize the control techniques.These can be usefully applied in control systems due to their advantageous generalization capability and their nonlinear and adaptive structure, which can enhance the dynamic behavior of the system without requiring an exact model.
In [38] ANN-based power management was proposed for an off-grid wind/PV power system with a HESS composed by an electrolyzer/fuel cell and a lead-acid battery.The implemented power management aims to control the electrolyzer and fuel cell outputs in order to maintain a constant battery SOC.The simulation tests showed that the proposed system has a fast response capability when compared to conventional methods.
In [39], a wavelet transformation was used to distinguish the high-frequency and low-frequency components of a microgrid with a HES composed of Li-ion batteries and SC.Additionally, an Adaline ANN was implemented to calculate the current reference of the Li-ion batteries in order to maintain a constant DC bus voltage.The simulation results demonstrated that the proposed power management is capable of compensating the variation in power from renewable sources, while maintaining the DC voltage stable.
An ANN-based power management strategy for electric vehicles was proposed in [40].The system has a HES with the Li-ion batteries directly connected to the DC bus and SCs connected through a DC/DC converter.The implemented ANN has the aim of controlling the SCs DC/DC current reference in order to support the Li-ion batteries and extend their lifespan.The performed simulations indicated an extension of the Li-ion batteries lifespan by 64.8%, in comparison to battery-only ESSs.
This paper presents a new power management strategy for HESSs based on ANN with a reduced computational cost, able to manage the power flow of all HESS elements and increase Li-ion batteries lifespan by reducing dynamic stress and peak current demand, while continuously supplying the load with the requested power.The proposed power management strategy analyses the SOC of each ESS in real time and changes its charge/discharge orders to ensure their security and lifespan.To validate the performance of the proposed power management strategy, a typical standalone PV system with DC coupling and centralized control architecture was simulated and assembled.
This paper is organized as follows: Section 2 presents the proposed and implemented system structure.Section 3 describes the proposed control scheme and the proposed power management strategy.Section 4 presents the results obtained through computational simulations.Section 5 shows the results obtained by the experimental simulations and finally Section 6 concludes the paper and discusses the results.

Proposed System Structure
Figure 1 shows the block diagram of the implemented system: a standalone PV system consisting of a PV unit, Li-ion batteries and SC, with DC coupling and centralized control architecture.The PV unit (DC SL 500-5.2programmable source and its Photovoltaic Power Profile Emulation control software) is coupled to the DC bus using a Buck-Boost converter.The Buck-Boost converter is used to extract maximum power from the PV unit using the maximum power point tracking (MPPT) algorithm.The energy transfer between the ESSs and the DC bus is performed by two cascaded Energies 2019, 12, 902 5 of 24 DC/DC Buck-Boost converters.The main purpose of the system is to extract, at any time, the maximum available power from the PV unit to the DC bus, and control and manage the power flow between all the HESS elements, while satisfying the load at any time point.
TMS320F28069.This 32-bit fixed-point microcontroller is used in mathematical tasks with some complexity, and is capable of performing parallel processing.It has a working frequency of 90 MHz with 100 kb and 2 kb of RAM and ROM memory respectively, and a flash memory of 256 kb.In addition, it contains 16 PWM channels and 16 ADC channels with 12 bits of resolution with a minimum conversion time of about 333 ns.It also has I 2 C, CAN and SPI communication features.
The HESS is formed by Li-ion batteries and SC.Both these ESSs are composed of 12 cells connected in series.The BMS is implemented in a centralized architecture with a passive balancing method called the switched shunt resistor [41].This method is used widely by the automotive industry due to its simplicity, cost, efficiency, volume, weight, robustness and reliability.Figure 2 depicts a general view of the implemented system in a laboratory environment.The real-time control unit consists in a Texas Instruments (Dallas, TX, USA) microcontroller TMS320F28069.This 32-bit fixed-point microcontroller is used in mathematical tasks with some complexity, and is capable of performing parallel processing.It has a working frequency of 90 MHz with 100 kb and 2 kb of RAM and ROM memory respectively, and a flash memory of 256 kb.In addition, it contains 16 PWM channels and 16 ADC channels with 12 bits of resolution with a minimum conversion time of about 333 ns.It also has I 2 C, CAN and SPI communication features.
The HESS is formed by Li-ion batteries and SC.Both these ESSs are composed of 12 cells connected in series.The BMS is implemented in a centralized architecture with a passive balancing method called the switched shunt resistor [41].This method is used widely by the automotive industry due to its simplicity, cost, efficiency, volume, weight, robustness and reliability.Figure 2 depicts a general view of the implemented system in a laboratory environment.converter is used to extract maximum power from the PV unit using the maximum power point tracking (MPPT) algorithm.The energy transfer between the ESSs and the DC bus is performed by two cascaded DC/DC Buck-Boost converters.The main purpose of the system is to extract, at any time, the maximum available power from the PV unit to the DC bus, and control and manage the power flow between all the HESS elements, while satisfying the load at any time point.The real-time control unit consists in a Texas Instruments (Dallas, TX, USA) microcontroller TMS320F28069.This 32-bit fixed-point microcontroller is used in mathematical tasks with some complexity, and is capable of performing parallel processing.It has a working frequency of 90 MHz with 100 kb and 2 kb of RAM and ROM memory respectively, and a flash memory of 256 kb.In addition, it contains 16 PWM channels and 16 ADC channels with 12 bits of resolution with a minimum conversion time of about 333 ns.It also has I 2 C, CAN and SPI communication features.
The HESS is formed by Li-ion batteries and SC.Both these ESSs are composed of 12 cells connected in series.The BMS is implemented in a centralized architecture with a passive balancing method called the switched shunt resistor [41].This method is used widely by the automotive industry due to its simplicity, cost, efficiency, volume, weight, robustness and reliability.Figure 2 depicts a general view of the implemented system in a laboratory environment.

DC-DC Converter
The non-isolated cascaded bidirectional DC/DC Buck-Boost converter associated with each ESS is represented in Figure 3.This Buck-Boost converter is capable of operating in four quadrants [42].

DC-DC Converter
The non-isolated cascaded bidirectional DC/DC Buck-Boost converter associated with each ESS is represented in Figure 3.This Buck-Boost converter is capable of operating in four quadrants [42].There are several modulation strategies that allow different efficiency levels of the DC/DC converter.The most common modulation strategies are soft switching and hard switching.A soft switching modulation strategy is usually implemented with an auxiliary circuit, including auxiliary switches, coils and/or capacitors [42,43].However, the generally implemented modulation strategy is hard switching, because it has the advantages of being relatively fast, easy to implement, does not require auxiliary circuits and its control structure is simpler.Therefore, in this study, a hard switching modulation strategy was used because it is a straightforward switching modulation and does not compromises the converter's high efficiency.Table 1 indicates the hard switching possibilities for each mode of operation for ESS discharge and charge mode.

BOOST BUCK BUCK-BOOST Discharge Charge Discharge Charge Discharge Charge
Figure 4 shows the non-insolated unidirectional DC/DC Buck-Boost converter responsible for the maximization of energy extracted from the PV at any instant of time.This converter is able to change its operation mode (Buck or Boost), just by adjusting its PWM duty cycle, i.e., when the PWM duty cycle is within 0 and 0.5, the converter operates in Buck mode, but when the PWM duty cycle is within 0.5 and 1 its operation mode changes to Boost.There are several modulation strategies that allow different efficiency levels of the DC/DC converter.The most common modulation strategies are soft switching and hard switching.A soft switching modulation strategy is usually implemented with an auxiliary circuit, including auxiliary switches, coils and/or capacitors [42,43].However, the generally implemented modulation strategy is hard switching, because it has the advantages of being relatively fast, easy to implement, does not require auxiliary circuits and its control structure is simpler.Therefore, in this study, a hard switching modulation strategy was used because it is a straightforward switching modulation and does not compromises the converter's high efficiency.Table 1 indicates the hard switching possibilities for each mode of operation for ESS discharge and charge mode.
Figure 4 shows the non-insolated unidirectional DC/DC Buck-Boost converter responsible for the maximization of energy extracted from the PV at any instant of time.This converter is able to change its operation mode (Buck or Boost), just by adjusting its PWM duty cycle, i.e., when the PWM duty cycle is within 0 and 0.5, the converter operates in Buck mode, but when the PWM duty cycle is within 0.5 and 1 its operation mode changes to Boost.

Storage Systems
Figure 5 is a Ragone's plot representing the characteristics of different storage technologies in terms of power density versus energy density.As we can see, among the batteries, Li-ion batteries have a higher energy and power densities [44,45].However, Li-ion batteries cannot respond to rapid fluctuations.To size a storage system using only Li-ion batteries, which respond to rapid transitions in load and do not compromise service life, a very high storage capacity would be required, leading to high costs for the consumer.Hybrid storage systems emerged to mitigate these disadvantages, combining the benefits of two or more different storage technologies.One of the most common combinations are Li-ion batteries and Super-Capacitors (SC), which store electrical energy through a static charge.These have a power density comparable to electrolytic capacitors, but with higher energy density.Compared to batteries, SCs have high power density but low energy density, high charge/discharge rates and a lifespan of about 500,000 cycles.Therefore, SCs can be used to satisfy the rapid fluctuations of load that reduce the lifespan of Li-ion batteries [46,47].

Storage Systems
Figure 5 is a Ragone's plot representing the characteristics of different storage technologies in terms of power density versus energy density.As we can see, among the batteries, Li-ion batteries have a higher energy and power densities [44,45].However, Li-ion batteries cannot respond to rapid fluctuations.To size a storage system using only Li-ion batteries, which respond to rapid transitions in load and do not compromise service life, a very high storage capacity would be required, leading to high costs for the consumer.Hybrid storage systems emerged to mitigate these disadvantages, combining the benefits of two or more different storage technologies.One of the most common combinations are Li-ion batteries and Super-Capacitors (SC), which store electrical energy through a static charge.These have a power density comparable to electrolytic capacitors, but with higher energy density.Compared to batteries, SCs have high power density but low energy density, high charge/discharge rates and a lifespan of about 500,000 cycles.Therefore, SCs can be used to satisfy the rapid fluctuations of load that reduce the lifespan of Li-ion batteries [46,47].

Storage Systems
Figure 5 is a Ragone's plot representing the characteristics of different storage technologies in terms of power density versus energy density.As we can see, among the batteries, Li-ion batteries have a higher energy and power densities [44,45].However, Li-ion batteries cannot respond to rapid fluctuations.To size a storage system using only Li-ion batteries, which respond to rapid transitions in load and do not compromise service life, a very high storage capacity would be required, leading to high costs for the consumer.Hybrid storage systems emerged to mitigate these disadvantages, combining the benefits of two or more different storage technologies.One of the most common combinations are Li-ion batteries and Super-Capacitors (SC), which store electrical energy through a static charge.These have a power density comparable to electrolytic capacitors, but with higher energy density.Compared to batteries, SCs have high power density but low energy density, high charge/discharge rates and a lifespan of about 500,000 cycles.Therefore, SCs can be used to satisfy the rapid fluctuations of load that reduce the lifespan of Li-ion batteries [46,47].Balancing System To form an ESS and obtain the required voltage levels it is necessary to interconnect several cells in series.Given this fact and due to the intrinsic and extrinsic differences in the cells, the resulting lack of uniformity reduces the usable capacity, the useful life, and the performance of the ESS.So it is mandatory to monitor the pack's Li-ion batteries and SC with a Battery Management System (BMS), and control the charging in order to extend its life [41].
BMS architectures can be classified as centralized or decentralized and their structure (BMS electrical circuit) can be classified as static or dynamic.The main advantages and disadvantages of each architecture and structure can be found in [48].One of the main functions of the BMS is to balance/equalize the cells that integrate the pack to maximize the usable capacity in each charge and discharge cycle.In addition to maximizing the usable capacity, balancing avoids overloading and over-discharge problems that result in reduced cell life and, in extreme cases, complete destruction, possibly an explosion [48].
Figure 6 illustrates the implemented BMS: a centralized architecture with a balancing methodology called switched shunt resistor.It is a passive methodology, frequently used in the automotive industry due to its simplicity, cost, efficiency, volume, weight, robustness and reliability [41].It consists of a cell bypass methodology, where each cell in the pack is associated with a balancing resistor and a switch controlled by the BMS.Cells are balanced by discharging through a R bal resistor when they are not being used, or by also providing them an alternative path through a R bal that enables current flow during charging periods, until all cells have reached the same voltage or SOC.The main disadvantage of this method is that the energy is dissipated in the form of heat.Both BMS units communicate with the control unit via the Serial Peripheral Interface (SPI) protocol.Balancing System To form an ESS and obtain the required voltage levels it is necessary to interconnect several cells in series.Given this fact and due to the intrinsic and extrinsic differences in the cells, the resulting lack of uniformity reduces the usable capacity, the useful life, and the performance of the ESS.So it is mandatory to monitor the pack's Li-ion batteries and SC with a Battery Management System (BMS), and control the charging in order to extend its life [41].
BMS architectures can be classified as centralized or decentralized and their structure (BMS electrical circuit) can be classified as static or dynamic.The main advantages and disadvantages of each architecture and structure can be found in [48].One of the main functions of the BMS is to balance/equalize the cells that integrate the pack to maximize the usable capacity in each charge and discharge cycle.In addition to maximizing the usable capacity, balancing avoids overloading and over-discharge problems that result in reduced cell life and, in extreme cases, complete destruction, possibly an explosion [48].
Figure 6 illustrates the implemented BMS: a centralized architecture with a balancing methodology called switched shunt resistor.It is a passive methodology, frequently used in the automotive industry due to its simplicity, cost, efficiency, volume, weight, robustness and reliability [41].It consists of a cell bypass methodology, where each cell in the pack is associated with a balancing resistor and a switch controlled by the BMS.Cells are balanced by discharging through a Rbal resistor when they are not being used, or by also providing them an alternative path through a Rbal that enables current flow during charging periods, until all cells have reached the same voltage or SOC.The main disadvantage of this method is that the energy is dissipated in the form of heat.Both BMS units communicate with the control unit via the Serial Peripheral Interface (SPI) protocol.The BMS unit is centered on the ISL94212 device (Intersil's, Milpitas, CA, USA), which can connect in series up to 14 devices, supporting systems up to 168SnP (168 cells in series and n cells in parallel), as well as extensive diagnostic functions.Figure 7 shows the BMS implemented in a laboratory environment.The BMS unit is centered on the ISL94212 device (Intersil's, Milpitas, CA, USA), which can connect in series up to 14 devices, supporting systems up to 168SnP (168 cells in series and n cells in parallel), as well as extensive diagnostic functions.Figure 7 shows the BMS implemented in a laboratory environment.

HESS Power Management Strategy
The purpose of the implemented HESS power management strategy is to manage the hybrid storage system, solving, in real time, the problem synthesized by Equation ( 1): where Pdc pv is the power extracted from the PV unit, Pdc bat is the power that flows to/from the Li-ion batteries, Pdc SC is the power that flows to/from the SC, Pload is the power supplied to the load, and Pdump is the power dumped by the system when PV production is excessive and the HESS elements have no remaining storage capacity.Overcharging the HESS elements is thereby prevented.The power management strategy was implemented using an ANN that determines in real time the current references (Iref bat and Iref SC) considering the current SOC condition of the two packs and the mismatch between the power generated by the PV production and the load power.ANNs are highly dynamic systems of adaptive computing, capable of parallel information processing.They are inspired in the information processing of biologic neurons and their interconnections, capable of learning complicated nonlinear relationships from the input and the output patterns presented and not requiring any physical knowledge of the modeled system.This makes them a good choice for complex systems.There are many different architectures, training methods, and working principles, while maintaining the basic building block (artificial neuron) and parallel processing.
The implemented architecture uses a Multi-Layer Feed-Forward Neural Network (FFNN), as illustrated in Figure 8.In this architecture, the information flows in the neuron layers without any type of feedback, i.e., the output information does not feedback to any of the neuron inputs.According to Figure 8, the output layer that determines the reference currents (Iref bat and Iref SC) can be represented by Equations ( 2) and (3), respectively:

HESS Power Management Strategy
The purpose of the implemented HESS power management strategy is to manage the hybrid storage system, solving, in real time, the problem synthesized by Equation (1): where P dc pv is the power extracted from the PV unit, P dc bat is the power that flows to/from the Li-ion batteries, P dc SC is the power that flows to/from the SC, P load is the power supplied to the load, and P dump is the power dumped by the system when PV production is excessive and the HESS elements have no remaining storage capacity.Overcharging the HESS elements is thereby prevented.The power management strategy was implemented using an ANN that determines in real time the current references (I ref bat and I ref SC ) considering the current SOC condition of the two packs and the mismatch between the power generated by the PV production and the load power.ANNs are highly dynamic systems of adaptive computing, capable of parallel information processing.They are inspired in the information processing of biologic neurons and their interconnections, capable of learning complicated nonlinear relationships from the input and the output patterns presented and not requiring any physical knowledge of the modeled system.This makes them a good choice for complex systems.There are many different architectures, training methods, and working principles, while maintaining the basic building block (artificial neuron) and parallel processing.
The implemented architecture uses a Multi-Layer Feed-Forward Neural Network (FFNN), as illustrated in Figure 8.In this architecture, the information flows in the neuron layers without any type of feedback, i.e., the output information does not feedback to any of the neuron inputs.According to Figure 8, the output layer that determines the reference currents (I ref bat and I ref SC ) can be represented by Equations ( 2) and (3), respectively: Energies 2019, 12, 902 10 of 24 where i represents the number of inputs; x i the input data vector; j represents the number of neurons in the hidden layer (in this case 7 neurons); f 1 and f 2 represent the activation functions; Iw represents the weights of the connection between the input layer and the hidden layer; Lw represents the weights of the connection between the hidden layer and the output layer; and b 1 and b 2 represents the bias of the neurons of the respective layers.The activation function, which works as a threshold, must be chosen appropriately for each layer from the several commonly used functions, such as: the Heaviside function, the symmetric saturating linear function, the sigmoid function, the Gaussian function, the hyperbolic tangent function, and the spline function.In this study was used the symmetric saturating linear function in both layers (output and hidden layers).One of the most important features of an ANN is the training method, which can be divided in two fundamental classes: supervised training method and unsupervised training methods [49].The implemented training approach was an offline supervised method, wherein the Levenberg-Marquardt backpropagation algorithm was used to optimize the FFNN internal states (weights and bias).In order to increase ANN learning accuracy and improve their capacity to generalize, input datasets were created with artificial data, taking into account several rules.

SOC
Imc bat < E(t) < 0 The input dataset was generated and normalized between −1 and 1 with the Min-Max normalization method, ensuring that the mean of the dataset was 0 and the standard deviation was 1. Subsequently, the input dataset was divided into two sets: the training set and the validation set, corresponding to 75% and 25% of the input dataset, respectively.There were two kinds of stopping criteria: the maximum number of iterations or the test using the validation set.The test using the validation set was based on the calculation of the MSE of the validation set in each iteration.If this error presented an increasing behavior in a pre-determined number of verifications (20 iterations), the training was finalized.The intent of this technique was to find the exact moment when the FFNN started to lose the ability to generalize.

Control Scheme
The implemented control scheme can operate in two different modes, i.e., with closed-loop current control or closed-loop voltage control, as shown in Figure 9.The operating modes were selected before starting the system.

Output Layer Input Layer
Hidden Layer The set of rules applied in the design of ANN for charging or discharging were based on the rated nominal capacity of the Li-ion batteries, to ensure correct use within the manufacturer's specifications.A limit for the maximum battery charging current allowed (I mc bat ) and for the maximum Li-ion battery discharging current allowed (I md bat ) were defined, to minimize Li-ion battery dynamic stress and peak currents.These limits were based on a percentage of the rated nominal capacity of the Li-ion batteries.Additionally, a working range of SOC were defined (SOC bat min and SOC bat max ), to guarantee the safe operation of Li-ion batteries and extend their lifespan.The Lion-batteries SOC working range was to set between 20% and 90%, described in [50] as the ideal interval.There is no such restriction concern regarding the SOC working range of SCs, due to their intrinsic characteristics; therefore the defined limits of SOC sc min and SOC sc max were defined as 20% and 100%, respectively.
When the power generated by the PV is less than the requested load power (P load -P dc pv > 0) to solve the problem synthesized by Equation (1), the discharging currents of each ESSs will depend Energies 2019, 12, 902 11 of 24 on three factors: SOC bat (t), SOC sc (t) and the error E(t) between the reference and the feedback signal.The designed set of rules that determine the discharging currents are shown in Table 2, where I max is the absolute value of the maximum current allowed in the system.Table 3 shows the designed set of rules to determine the ESS charging currents when the power generated by the PV is more than the requested load power (P load -P dc pv < 0).
Each ESS must be correctly dimensioned to remain within the respective safe operating regions during normal functioning of the system.Nevertheless, safety conditions were implemented in order to avoid system failure and ensure security, namely: if the SOC of both technologies was lower than the pre-defined working range (SOC bat min and SOC sc min ) and the PV production wasn't sufficient to supply the load, the system was unavailable to supply the load and consequently the load was disconnected, and the PV generated power used to charge the ESSs.On the other hand, if PV production was excessive and the HESS elements above the pre-defined SOC working range, a dump load was activated to prevent overcharging of the HESSs elements.
The input dataset was generated and normalized between −1 and 1 with the Min-Max normalization method, ensuring that the mean of the dataset was 0 and the standard deviation was 1. Subsequently, the input dataset was divided into two sets: the training set and the validation set, corresponding to 75% and 25% of the input dataset, respectively.There were two kinds of stopping criteria: the maximum number of iterations or the test using the validation set.The test using the validation set was based on the calculation of the MSE of the validation set in each iteration.If this error presented an increasing behavior in a pre-determined number of verifications (20 iterations), the training was finalized.The intent of this technique was to find the exact moment when the FFNN started to lose the ability to generalize.

Control Scheme
The implemented control scheme can operate in two different modes, i.e., with closed-loop current control or closed-loop voltage control, as shown in Figure 9.The operating modes were selected before starting the system.
The implemented control schemes are similar and include a power management strategy and three proportional integral controllers with Anti-Wind-Up mechanism (PI-awu).The power management strategy between ESSs is implemented with a FFNN that determines, in real time, the current references (I ref bat and I ref SC ) considering the SOC of the two packs, obtained by the Coulomb counting method that measures the charging/discharging current of a battery/SC pack and integrates current over time.The other FFNN input is the output from the PI ref controller.For the closed-loop voltage control scheme, it acts to eliminate the error signal between the reference voltage (V dc ref ) and the DC bus voltage (V dc ), whereas for the closed-loop current control scheme, it acts to eliminate the error signal between the reference current (I dc ref ) and load current (I load ).Once the currents (I ref bat and I ref SC ) have been determined through the ANN, the two controllers, PI bat and PI sc , operate by adjusting the PWM duty-cycle of the DC/DC converters (detailed in Tables 1 and 2 The implemented control schemes are similar and include a power management strategy and three proportional integral controllers with Anti-Wind-Up mechanism (PI-awu).The power management strategy between ESSs is implemented with a FFNN that determines, in real time, the current references (Iref bat and Iref SC) considering the SOC of the two packs, obtained by the Coulomb counting method that measures the charging/discharging current of a battery/SC pack and integrates current over time.The other FFNN input is the output from the PIref controller.For the closed-loop voltage control scheme, it acts to eliminate the error signal between the reference voltage (Vdc ref) and the DC bus voltage (Vdc), whereas for the closed-loop current control scheme, it acts to eliminate the error signal between the reference current (Idc ref) and load current (Iload).Once the currents (Iref bat and Iref SC) have been determined through the ANN, the two controllers, PIbat and PIsc, operate by adjusting the PWM duty-cycle of the DC/DC converters (detailed in Tables 1 and 2) to control the output current of each converter and eliminate the error signal between the reference currents (Iref bat and Iref SC) and the ESS currents (Ibat and Isc).

MPPT Algorithm
The implemented MPPT algorithm was the Perturb and Observe (P&O) algorithm [51], illustrated in Figure 10a.This algorithm is characterized by low computational cost, simplicity of implementation and control.It consists of measuring the amount of power extracted from the PV unit (Pk) at instant (tk) and introducing a perturbation (∆d) in the DC/DC converter PWM duty-cycle.Then the extracted amount of power (Pk+1) is measured again, at instant (tk+1), and compared with the power extracted in the previous instant (tk).If the perturbation results in an increase of power, the algorithm adjusts the new operating point of the converter in the same direction, otherwise it changes the direction of the perturbation.This process is repeated until the maximum power point is reached.After the MPP is reached, the converter operation point oscillates around it, as shown in Figure 10b.

MPPT Algorithm
The implemented MPPT algorithm was the Perturb and Observe (P&O) algorithm [51], illustrated in Figure 10a.This algorithm is characterized by low computational cost, simplicity of implementation and control.It consists of measuring the amount of power extracted from the PV unit (P k ) at instant (t k ) and introducing a perturbation (∆d) in the DC/DC converter PWM duty-cycle.Then the extracted amount of power (P k+1 ) is measured again, at instant (t k+1 ), and compared with the power extracted in the previous instant (t k ).If the perturbation results in an increase of power, the algorithm adjusts the new operating point of the converter in the same direction, otherwise it changes the direction of the perturbation.This process is repeated until the maximum power point is reached.After the MPP is reached, the converter operation point oscillates around it, as shown in Figure 10b.The implemented control schemes are similar and include a power management strategy and three proportional integral controllers with Anti-Wind-Up mechanism (PI-awu).The power management strategy between ESSs is implemented with a FFNN that determines, in real time, the current references (Iref bat and Iref SC) considering the SOC of the two packs, obtained by the Coulomb counting method that measures the charging/discharging current of a battery/SC pack and integrates current over time.The other FFNN input is the output from the PIref controller.For the closed-loop voltage control scheme, it acts to eliminate the error signal between the reference voltage (Vdc ref) and the DC bus voltage (Vdc), whereas for the closed-loop current control scheme, it acts to eliminate the error signal between the reference current (Idc ref) and load current (Iload).Once the currents (Iref bat and Iref SC) have been determined through the ANN, the two controllers, PIbat and PIsc, operate by adjusting the PWM duty-cycle of the DC/DC converters (detailed in Tables 1 and 2) to control the output current of each converter and eliminate the error signal between the reference currents (Iref bat and Iref SC) and the ESS currents (Ibat and Isc).

MPPT Algorithm
The implemented MPPT algorithm was the Perturb and Observe (P&O) algorithm [51], illustrated in Figure 10a.This algorithm is characterized by low computational cost, simplicity of implementation and control.It consists of measuring the amount of power extracted from the PV unit (Pk) at instant (tk) and introducing a perturbation (∆d) in the DC/DC converter PWM duty-cycle.Then the extracted amount of power (Pk+1) is measured again, at instant (tk+1), and compared with the power extracted in the previous instant (tk).If the perturbation results in an increase of power, the algorithm adjusts the new operating point of the converter in the same direction, otherwise it changes the direction of the perturbation.This process is repeated until the maximum power point is reached.After the MPP is reached, the converter operation point oscillates around it, as shown in Figure 10b.

Proportional Integral Controller with Anti-Wind-Up Mechanism
Figure 11 shows the schematic of the implemented Proportional integral Anti Wind-Up (PI-awu) controller.The output of the controller u(t) is given by the sum of the proportional p(t) and integral i(t) terms.The proportional term p(t), calculated by Equation ( 4), is the error between the reference value and the value of the feedback signal y(t), weighed by the K p parameter.
Energies 2019, 12, 902 13 of 24 The integral term, calculated through Equation ( 5), equals a discrete integrator multiplied by a term w(k) expressed by Equation ( 6).The term w(k) assumes the value zero, or one, providing a mechanism to deactivate the integral part when output saturation occurs, improving the response time and recovery dynamics.

Proportional Integral Controller with Anti-Wind-Up Mechanism
Figure 11 shows the schematic of the implemented Proportional integral Anti Wind-Up (PI-awu) controller.The output of the controller u(t) is given by the sum of the proportional p(t) and integral i(t) terms.The proportional term p(t), calculated by Equation ( 4), is the error between the reference value and the value of the feedback signal y(t), weighed by the Kp parameter.

𝑢 𝑡 𝑘 𝑟 𝑡 𝑦 𝑡 (4)
The integral term, calculated through Equation ( 5), equals a discrete integrator multiplied by a term w(k) expressed by Equation ( 6).The term w(k) assumes the value zero, or one, providing a mechanism to deactivate the integral part when output saturation occurs, improving the response time and recovery dynamics.

PI Controllers Optimization
In order to determine the optimal parameters of the PI controllers, the Particle Swarm Optimization (PSO) [52] was used for both control schemes.The particle swarm algorithm is inspired by the principles of cooperation and behavior in society.The algorithm has a particles population (np), where each particle represents a possible solution.The idea is to force the particles to explore the multidimensional search space (d) to find an optimal solution.Each i particle of the population np has a velocity (vi) and a position (xi) that are adjusted through Equations ( 7) and ( 8), respectively.At each iteration t, the algorithm evaluates the performance of each particle through a predefined objective function (OF) and changes the velocity of each particle (vi) as a function of the three terms of Equation (7).The first term represents the inertia (factor of inertia w) of the particle in maintaining its previous velocity.The second term moves each particle towards its best performance so far (pbest) taking into account the cognitive parameter c1.Lastly, the third term moves the particle towards the best performance of the other particles present in the population (gbest) taking into account the social parameter c2.
To optimize controller performance, the system described in Figure 1 was implemented in Matlab/Simulink (2012, Mathworks, Natick, MA, USA).For the control scheme with closed-loop

PI Controllers Optimization
In order to determine the optimal parameters of the PI controllers, the Particle Swarm Optimization (PSO) [52] was used for both control schemes.The particle swarm algorithm is inspired by the principles of cooperation and behavior in society.The algorithm has a particles population (np), where each particle represents a possible solution.The idea is to force the particles to explore the multidimensional search space (d) to find an optimal solution.Each i particle of the population np has a velocity (v i ) and a position (x i ) that are adjusted through Equations ( 7) and ( 8), respectively.At each iteration t, the algorithm evaluates the performance of each particle through a predefined objective function (OF) and changes the velocity of each particle (v i ) as a function of the three terms of Equation (7).The first term represents the inertia (factor of inertia w) of the particle in maintaining its previous velocity.The second term moves each particle towards its best performance so far (pbest) taking into account the cognitive parameter c 1 .Lastly, the third term moves the particle towards the best performance of the other particles present in the population (gbest) taking into account the social parameter c 2 .
To optimize controller performance, the system described in Figure 1 was implemented in Matlab/Simulink (2012, Mathworks, Natick, MA, USA).For the control scheme with closed-loop voltage control, the optimization problem consists in minimizing the OF given by Equation (9), which consists of the Integral Absolute Error (IAE) between the reference currents (I ref bat and I ref SC ) and the output currents of each converter (I dc bat and I dc SC ) with the absolute error between the voltage reference (V dc ref ) and the DC bus voltage (V dc ).For the current closed-loop control scheme, the performance of controllers is evaluated through the OF given by Equation (10), which is similar to previous one, but with the absolute error between current reference (I dc ref ) and the current load (I dc ).
Energies 2019, 12, 902 14 of 24 For both control schemes, the search space (Γ) was defined by the proportional and integral gains of the various associated controllers, i.e., Γ = kp ki The PSO was implemented with a social group of 10 particles with an initial random positioning within the range of 0.0001 < k p < 5 and 0.00005 < k i < 2. The PSO control parameters were defined with a cognitive constant of (c 1 = 2) and a social constant of (c 2 = 2).Moreover, for the inertia factor, a linear decreasing strategy was implemented with a range between [0.9-0.4].Table 4 presents the results of optimization of the parameters associated to each controller.

Computational Simulations
To evaluate the performance of the system shown in Figure 1 and the proposed power management strategy, simulations were performed in Simulink software, from MathWorks ® .The system has two PV units with 60 cells in series and was characterized by a V oc = 36 V, I oc = 7.34 A, V MPP = 30.5V and an I MPP = 6.7 A, which corresponds to a P MPP = 204.35Wp under standard test conditions (irradiance of 1000 W/m 2 and a temperature of 25 • C).The HESS system is composed of 12 Li-ion battery cells, connected in series, with a nominal capacity of 50 Ah, and 12 SC, connected in series, with a nominal capacitance of 3400 F. The initial SOC for both technologies was assumed to be 50%, with the remainder of each ESS within the respective safe operating regions during the simulations.Two different control schemes were validated: closed-loop voltage control and closed-loop current control.The system was subjected to three different computational simulations for each control scheme, using with different conditions of irradiation and load.For each control scheme, three scenarios were defined: (A) constant irradiance of 1000 W/m 2 with load disturbance between 0 Ohm and 2 k Ohm; (B) variable irradiance between 200 W/m 2 and 1000 W/m 2 with constant load of 40 Ohm; (C) variable irradiance between 200 W/m 2 and 1000 W/m 2 with a load disturbance between 0 Ohm and 2 k Ohm.

Computational Simulations with Voltage Closed-Loop Controller
In this computational simulation, the system was controlled with a voltage closed-loop controller and the DC bus voltage reference was set to 60 V. Figure 12 shows the voltage, current, and power evolution in each system unit (ESSs, PV panel and DC bus).From Figure 12, we can conclude that: (i) the MPPT algorithm has good performance in the MPP search, regardless of operating conditions.As can be seen in all scenarios, the MPP is reached in less than 1 s, after which the MPPT algorithm continuously oscillated around that point; (ii) when load power was lower than the PV power generation (P load < P dc pv ) and the maximum Li-ion batteries charging current had not been reached the maximum limit (2 A), the remaining current was allocated entirely to the Li-ion batteries, as can be seen in scenario (b).However, if the current (I dc pv − I load ) exceeds the maximum charging current of the batteries, the remaining current flowed to the SC pack, as verified in the interval 8-10 s for scenarios (a) and (c); (iii) when the PV power generation was lower than the load power (P dc pv < P load ) and the current (I dc pv − I load ) did not exceed the maximum battery discharging current, the PV production was assisted by the Li-ion batteries.This can be seen in interval 5-7 s for scenario (b).However, when the current exceeded the maximum battery discharging current, the SC was used to support the Li-ion batteries to satisfy the load demand.This can be seen in interval 5-8 s for scenario (a); (iv) the DC bus voltage remained at the predetermined value (60 V) during all tests, revealing the excellent performance of the implemented controllers and of the proposed power management strategy.
operating conditions.As can be seen in all scenarios, the MPP is reached in less than 1 s, after which the MPPT algorithm continuously oscillated around that point; (ii) when load power was lower than the PV power generation (Pload < Pdc pv) and the maximum Li-ion batteries charging current had not been reached the maximum limit (2 A), the remaining current was allocated entirely to the Li-ion batteries, as can be seen in scenario (b).However, if the current (Idc pv − Iload) exceeds the maximum charging current of the batteries, the remaining current flowed to the SC pack, as verified in the interval 8-10 s for scenarios (a) and (c); (iii) when the PV power generation was lower than the load power (Pdc pv < Pload) and the current (Idc pv − Iload) did not exceed the maximum battery discharging current, the PV production was assisted by the Li-ion batteries.This can be seen in interval 5-7 s for scenario (b).However, when the current exceeded the maximum battery discharging current, the SC was used to support the Li-ion batteries to satisfy the load demand.This can be seen in interval 5-8 s for scenario (a); (iv) the DC bus voltage remained at the predetermined value (60 V) during all tests, revealing the excellent performance of the implemented controllers and of the proposed power management strategy.

Computational Simulations with Current Closed-Loop Controller
In this simulation, the system was controlled with a closed-loop current controller and variable load current reference to make the system follow different profiles.Figure 13 shows the voltage, discharge of the Li-ion batteries; (ii) in the interval 7-10 s for scenario (a) and intervals 3, 5 s and 9, 10 s for scenario (c), the load voltage was lower than PV production voltage, V dc < V pv .Therefore, the DC/DC converter, responsible for PV extraction, had to switch operation mode, from Boost to Buck, in order to extract the necessary power.This type of sudden change in converter operation mode leads to an abrupt drop in extracted PV power, reducing effectiveness and efficiency of the MPPT algorithm; (iii) the excellent response of the controllers following the current reference was proven during the simulations.

Performance under Long-Term Operation Scenario
To evaluate the performance and the effectiveness of the proposed power management strategy when operating under realistic conditions, a long-term scenario was performed, with a duration of 336 h, corresponding to 15 days.This simulation mimics an application with PV production and a common load demand profile, as can be seen in Figure 14a.Figure 14b shows the daily SOC variation of each ESS.In the simulation, the proposed power management strategy was effective in managing the intermittent PV production and at the same time was able to satisfy the load demand.During most of the simulation, the current of the load demand did not exceed the maximum discharging current allowed for the Li-ion batteries and, therefore, the Li-ion batteries were the ESS most often used to supply the load.Another peculiarity that can be highlighted from the simulation is the support given by the SC to satisfy the load demand when the Li-ion battery SOC is much lower than the SC SOC, as can be seen in the interval 53-63 h.However, this contribution decreases as SOCs of both ESSs match.In contrast, when the PV production is greater than load demand and the SOC of both ESSs are within the working range, two different situations may occur: (i) If the charging current does not exceed the maximum charging current allowed for the Li-ion batteries, these are the most used ESS; (ii) If the charging current exceeds the maximum charging current allowed for the Li-ion batteries, the SC receive the remaining current in order to support the Li-ion batteries.However, when there is excessive PV production and the ESSs SOCs exceed the SOCs working range, there is a surplus current that is dissipated in the dump load, thus avoiding the overcharging of the ESSs.This situation can be observed in the interval between 235-236 h, because the SC are fully charged and the maximum charging current allowed for the Li-ion batteries is exceeded.We can verify that during the simulation, both ESSs worked within the safety working range previously defined for the proposed power management strategy.The proposed power management strategy was compared to another strategy presented in the literature, a RBC strategy detailed in [53].This strategy was implemented and subjected to the same test scenario shown in Figure 14a.The defined Li-ion batteries current thresholds were −2 A and 2 A, with a slope gradient of 50%.When the battery current was within the thresholds, the Li-ion The proposed power management strategy was compared to another strategy presented in the literature, a RBC strategy detailed in [53].This strategy was implemented and subjected to the same test scenario shown in Figure 14a.The defined Li-ion batteries current thresholds were −2 A and 2 A, with a slope gradient of 50%.When the battery current was within the thresholds, the Li-ion batteries were the only source to supply the load demand.When the battery current demand exceeded the pre-defined thresholds, the excessive current demand was shared among the Lion-batteries and the SC with a ratio of 50%. Figure 15 shows a graphical representation of the performance in terms of the accumulated ampere-hours (amount of charge), comparing the proposed power management strategy (Figure 15a) with the conventional RBC (Figure 15b) in terms of each ESS technology utilization level.The proposed power management strategy shows a higher SC utilization, resulting in higher system efficiency because the SC has small internal resistance leading to a reduction in Li-ion battery dynamic stress, lower heating of the Li-ion batteries, as well as a longer Li-ion battery lifespan.

Experimental Results
To evaluate the performance of the system shown in Figure 1, real hardware tests were performed.The system was an emulated PV, with a PMPP = 106 Wp, and all the hardware tests were made under the standard test conditions (irradiation of 1000 W/m 2 at 25 °C).The HESS of the system was composed by 12 Li-ion battery cells, connected in series, with a nominal capacity of 2 Ah, and 12 SC, connected in series, with a nominal capacitance of 500 F.

Photovoltaic Energy Extraction Results
In order to test the MPPT algorithms for PV production, we used a programmable source, DC SL 500-5.2 from Magna Power ® , and its control software, Photovoltaic Power Profile Emulation ® .Figure 16 shows the P-V and I-V curves of the emulated PV, characterized by a Voc = 63 V, Isc = 2 A, VMPP = 55.53V and a IMPP = 1.911A, which corresponds to a PMPP = 106 Wp under the standard test conditions (irradiance of 1000 W/m 2 and a temperature of 25 °C).

Experimental Results
To evaluate the performance of the system shown in Figure 1, real hardware tests were performed.The system was an emulated PV, with a P MPP = 106 Wp, and all the hardware tests were made under the standard test conditions (irradiation of 1000 W/m 2 at 25 • C).The HESS of the system was composed by 12 Li-ion battery cells, connected in series, with a nominal capacity of 2 Ah, and 12 SC, connected in series, with a nominal capacitance of 500 F.

Photovoltaic Energy Extraction Results
In order to test the MPPT algorithms for PV production, we used a programmable source, DC SL 500-5.2 from Magna Power ® , and its control software, Photovoltaic Power Profile Emulation ® .Figure 16 shows the P-V and I-V curves of the emulated PV, characterized by a V oc = 63 V, I sc = 2 A, V MPP = 55.53V and a I MPP = 1.911A, which corresponds to a P MPP = 106 Wp under the standard test conditions (irradiance of 1000 W/m 2 and a temperature of 25  Figure 17b represents the power extracted from the PV, where red represents the MPP line.As can be observed, the power extracted from the PV throughout the test is very close to the maximum power available in the PV.The MPPT had a good time response, requiring only a few seconds to find the MPP.This can validate the excellent performance of the implemented MPPT algorithm, as well as that of its associated DC/DC converter.Figure 17a,c depict the extracted voltage from the PV production during the whole test.It can be concluded that the implemented MPPT P&O algorithm is a simple, robust and quite efficient algorithm.Figure 17b represents the power extracted from the PV, where red represents the MPP line.As can be observed, the power extracted from the PV throughout the test is very close to the maximum power available in the PV.The MPPT had a good time response, requiring only a few seconds to find the MPP.This can validate the excellent performance of the implemented MPPT algorithm, as well as that of its associated DC/DC converter.Figure 17a,c depict the extracted voltage from the PV production during the whole test.It can be concluded that the implemented MPPT P&O algorithm is a simple, robust and quite efficient algorithm.Figure 17b represents the power extracted from the PV, where red represents the MPP line.As can be observed, the power extracted from the PV throughout the test is very close to the maximum power available in the PV.The MPPT had a good time response, requiring only a few seconds to find the MPP.This can validate the excellent performance of the implemented MPPT algorithm, as well as that of its associated DC/DC converter.Figure 17a,c depict the extracted voltage from the PV production during the whole test.It can be concluded that the implemented MPPT P&O algorithm is a simple, robust and quite efficient algorithm.

HESS Controllers and Power Management Strategy Performance Test
Several tests were conducted to experimentally validate the proposed power management strategy and the system performance under different operation scenarios.In these tests, the HESS is formed by 12 Li-ion batteries ICR18650-26F (Samsung, Seocho-gu, South Korea) and 12 SC of 500F (Green-Cap) each, both connected in series.The aim of the realized tests was to replicate the possible scenarios faced by the system in a normal standalone application.To mimic a real standalone application, the performed tests used a voltage closed-loop controller.In this way, it was possible to

HESS Controllers and Power Management Strategy Performance Test
Several tests were conducted to experimentally validate the proposed power management strategy and the system performance under different operation scenarios.In these tests, the HESS is formed by 12 Li-ion batteries ICR18650-26F (Samsung, Seocho-gu, South Korea) and 12 SC of 500F (Green-Cap) each, both connected in series.The aim of the realized tests was to replicate the possible scenarios faced by the system in a normal standalone application.To mimic a real standalone application, the performed tests used a voltage closed-loop controller.In this way, it was possible to guarantee a constant voltage on the DC bus during the system operation.The performed test scenarios focused on two aspects to test the implemented power management strategy performance: (i) the PV production was less than the requested load power (P load -P dc pv > 0); (ii) the PV production was greater than the requested load power (P load -P dc pv < 0).Therefore, it was possible to test the behavior of the system when there was an excess or deficit power in the DC bus.Finally, to test the system's ability to follow a reference voltage on the DC bus, two more scenarios were performed: (i) the system followed a DC bus voltage reference during its normal operation; (ii) the system followed a variable DC bus voltage reference during its normal operation.This test ensured the system's ability to maintain a reference voltage in the DC bus regardless of PV production power and the load connected to the system.
In the performed tests, each ESSs had a SOC of approximately 50%.However, due to hardware limitations in terms of power and to ensure the integrity of the system, the maximum Li-ion batteries charge/discharge during the realized tests was defined to 0.4 A.
In the first scenario, the power extracted from PV production was greater than the requested load power (P load -P dc pv < 0).Therefore, excess power in the HEES had to be allocated.However, during the test, the current exceeded the maximum current allowed charging the Li-ion batteries, so it was necessary to redirect the excess current to the SCs to support the Li-ion batteries in receiving the excess current.In Figure 18a, we can observe the Li ion battery and SC charging currents.In the second scenario, the power extracted from PV production was less than the requested load power (Pload-Pdc pv > 0).Therefore, it was necessary to discharge the Li-ion batteries in order to complement the PV production satisfying the load.However, during the test, the current needed to satisfy the load exceeded the maximum current allowed for the Li-ion battery discharge.Consequently, it was necessary to discharge the SCs in order to assist the PV production and the Li-ion batteries satisfying the system load.In Figure 18b, we can observe the Li-ion batteries and SC discharging currents.
Figure 19a illustrates the DC bus voltage during the test performed with a closed-loop voltage In the second scenario, the power extracted from PV production was less than the requested load power (P load -P dc pv > 0).Therefore, it was necessary to discharge the Li-ion batteries in order to complement the PV production satisfying the load.However, during the test, the current needed to satisfy the load exceeded the maximum current allowed for the Li-ion battery discharge.Consequently, it was necessary to discharge the SCs in order to assist the PV production and the Li-ion batteries satisfying the system load.In Figure 18b, we can observe the Li-ion batteries and SC discharging currents.
Figure 19a illustrates the DC bus voltage during the test performed with a closed-loop voltage controller.The DC bus voltage was kept at the pre-defined value (60 V) throughout the test revealing great stability of the power management strategy and implemented controllers.Figure 19b shows the voltage evolution in the DC bus during the performed test with variable voltage reference.As can be seen, the system presented a good capacity to follow a voltage reference, evidencing a good response time of the control scheme.The experimental tests corroborated the previously performed computational simulations showing the excellent response of the implemented power management strategy and the associated control scheme.As in the previous computational simulations, the power management strategy successfully requested the SC in the following situations: (i) during the system transient responses; (ii) when the requested power exceeded the maximum power for the Li-ion batteries.Consequently, dynamic stress and the peak current demand of the Li-ion batteries were minimized, and their lifespan extended.Finally, the computational simulations and the experimental results showed the best performance of the proposed power management strategy.

Conclusions
This paper proposed a novel HESS power management strategy based on an Artificial Neural Network with the aim of mitigating Li-ion batteries stress under dynamic power exchange conditions, often experienced in standalone renewable microgrids.The proposed power management strategy is able to manage the power flow of the ESSs, managing their charging or discharging power depending on their SOC state, satisfying the system load throughout the system operation.A Simulink ® model of a typical standalone photovoltaic microgrid, with a HESS composed by Li-ion batteries and SC, was developed to analyze the performance of the proposed system.With this method, there was a reduction in dynamic stress and peak current demand of the Li-ion batteries, without loss of efficiency in the supply of the load during all the performed tests.In order to test the practical executability of the proposed power management strategy, the presented system was assembled in real hardware, and practical tests were carried out.The results confirm the computational simulation tests and guarantee the good protection of the Li-ion batteries, as well as The experimental tests corroborated the previously performed computational simulations showing the excellent response of the implemented power management strategy and the associated control scheme.As in the previous computational simulations, the power management strategy successfully requested the SC in the following situations: (i) during the system transient responses; (ii) when the requested power exceeded the maximum power for the Li-ion batteries.Consequently, dynamic stress and the peak current demand of the Li-ion batteries were minimized, and their lifespan extended.Finally, the computational simulations and the experimental results showed the best performance of the proposed power management strategy.

Conclusions
This paper proposed a novel HESS power management strategy based on an Artificial Neural Network with the aim of mitigating Li-ion batteries stress under dynamic power exchange conditions, often experienced in standalone renewable microgrids.The proposed power management strategy is able to manage the power flow of the ESSs, managing their charging or discharging power depending on their SOC state, satisfying the system load throughout the system operation.A Simulink ® model of a typical standalone photovoltaic microgrid, with a HESS composed by Li-ion batteries and SC, was developed to analyze the performance of the proposed system.With this method, there was a reduction in dynamic stress and peak current demand of the Li-ion batteries, without loss of efficiency in the supply of the load during all the performed tests.In order to test the practical executability of the proposed power management strategy, the presented system was assembled in real hardware, and practical tests were carried out.The results confirm the computational simulation tests and guarantee the good protection of the Li-ion batteries, as well as an excellent response of the implemented controllers.This suggests that an improvement of Li-ion batteries' lifespan can be achieved by using the proposed system.

Figure 1 .
Figure 1.Block diagram of the implemented system.

Figure 2 .Figure 1 .
Figure 2. General view of the implemented system.

Figure 1 .
Figure 1.Block diagram of the implemented system.

Figure 2 .
Figure 2. General view of the implemented system.

Figure 2 .
Figure 2. General view of the implemented system.

Figure 5 .
Figure 5. Different storage technologies in terms of power density versus energy density. μ

Figure 5 .
Figure 5. Different storage technologies in terms of power density versus energy density.

Figure 5 .
Figure 5. Different storage technologies in terms of power density versus energy density.

Figure 6 .
Figure 6.Implemented BMS architecture with the passive balancing method-switched shunt resistor.

Figure 6 .
Figure 6.Implemented BMS architecture with the passive balancing method-switched shunt resistor.

Figure 7 .
Figure 7. Implemented BMS architecture in laboratory environment.

Figure 7 .
Figure 7. Implemented BMS architecture in laboratory environment.

26 Figure 12 .
Figure 12.Computational simulations for the voltage closed-loop controller: (a) Constant irradiance with load perturbation; (b) variable irradiance with constant load; (c) variable irradiance with load perturbation.

Figure 12 .
Figure 12.Computational simulations for the voltage closed-loop controller: (a) Constant irradiance with load perturbation; (b) variable irradiance with constant load; (c) variable irradiance with load perturbation.

Figure 15 .
Figure 15.Graphical representation of the performance comparison between: (a) proposed power management strategy; (b) conventional RBC.

Figure 16 .
Figure 16.P-V and I-V curves under the standard test conditions.

Figure 16 .
Figure 16.P-V and I-V curves under the standard test conditions.

Energies 2018 , 26 Figure 16 .
Figure 16.P-V and I-V curves under the standard test conditions.

Figure 19 .
Figure 19.DC bus voltage during: (a) constant voltage reference experimental test; (b) variable voltage reference experimental test.

Table 1 .
Hard switching possibilities for ESS charge/discharge.

Table 1 .
Hard switching possibilities for ESS charge/discharge.

Table 3 .
Rules for ESS charge mode.

Table 2 .
Rules for ESS discharge mode.SOC bat < SOC bat min & SOC sc < SOC sc min Safety condition SOC bat < SOC bat min & SOC sc > SOC sc min E(t) × I max 0 E(t) × I max 0 SOC bat > SOC bat min & SOC sc > SOC sc min 0 E(t) × I max (E(t) − I max bat ) × I md bat I md bat × I max SOC bat > SOC bat min & SOC sc < SOC sc min

Table 3 .
Rules for ESS charge mode.