A Grid Connected Photovoltaic Inverter with Battery-Supercapacitor Hybrid Energy Storage

The power generation from renewable power sources is variable in nature, and may contain unacceptable fluctuations, which can be alleviated by using energy storage systems. However, the cost of batteries and their limited lifetime are serious disadvantages. To solve these problems, an improvement consisting in the collaborative association of batteries and supercapacitors has been studied. Nevertheless, these studies don’t address in detail the case of residential and large-scale photovoltaic systems. In this paper, a selected combined topology and a new control scheme are proposed to control the power sharing between batteries and supercapacitors. Also, a method for sizing the energy storage system together with the hybrid distribution based on the photovoltaic power curves is introduced. This innovative contribution not only reduces the stress levels on the battery, and hence increases its life span, but also provides constant power injection to the grid during a defined time interval. The proposed scheme is validated through detailed simulation and experimental tests.


Introduction
Energy Storage Systems (ESS) are urgently needed by the traditional electrical generation industry, which have almost no such storage capability. Traditional electricity transmission and distribution systems transport the electrical energy from large power plants to consumers in a unidirectional way. Due to this, electricity must be consumed by matching precisely the generation with demand, but the electricity demand fluctuates heavily and consequently power plants must be overdesigned which implies an inefficient and expensive electrical system [1].
Energy production could be made independent from the demand by means of ESS. With large-scale electricity storage capacity available, the generating capacity could be designed in electrical average terms rather than electrical peak terms. Subsequently, ESS could provide several advantages such as peaking power, standby reserve and load following. In addition, the harmful emissions of the thermal power sources could be reduced with the improved grid efficiency thanks to the fact ESS provide spinning reserves and dispatchable loads.
Furthermore, ESS is a needed technology for Distributed Energy Resource (DER) systems. A DER is meant to be as a sustainable and environmentally friendly alternative to the traditional energy system. DERs are usually installed in a distributed way, placed close to the consumers and designed on a scale of kW to MW, unlike conventional big power plants, which are installed in a centralized way. The energy system is evolving in a way the DERs have more presence, which implies the energy Battery versus Hybrid Energy Storage Systems (HESS) performance was studied in [7]. Passive, semi-active and fully active battery-supercapacitor hybridization improves battery only results when the load demands pulsed currents. On the one hand, passive hybrid is the simplest and cheapest solution but also carry some disadvantages, as it has no control. On the other hand, the fully active hybrids improve the performance, but the power stage needs two direct current/direct current (DC/DC) converters and the corresponding control circuitry.
One of the feasible solutions for photovoltaic renewable energy sources is hybridization of highenergy batteries with supercapacitors [8]. This energy source requires high power density plus high energy density. Modern battery technologies always lack one of them. Li-ion batteries present better power and energy density characteristics than others so they are the ones used for this kind of systems. Nevertheless, the power/energy trade-offs imply a non-optimized battery size as it provides the proper energy with excess of power and vice versa. Supercapacitor technology provides high power density and exhibits a rapid development at a reasonable cost. In addition, supercapacitors Battery versus Hybrid Energy Storage Systems (HESS) performance was studied in [7]. Passive, semi-active and fully active battery-supercapacitor hybridization improves battery only results when the load demands pulsed currents. On the one hand, passive hybrid is the simplest and cheapest solution but also carry some disadvantages, as it has no control. On the other hand, the fully active hybrids improve the performance, but the power stage needs two direct current/direct current (DC/DC) converters and the corresponding control circuitry.
One of the feasible solutions for photovoltaic renewable energy sources is hybridization of high-energy batteries with supercapacitors [8]. This energy source requires high power density plus high energy density. Modern battery technologies always lack one of them. Li-ion batteries present better power and energy density characteristics than others so they are the ones used for this kind of systems. Nevertheless, the power/energy trade-offs imply a non-optimized battery size as it provides the proper energy with excess of power and vice versa. Supercapacitor technology provides high power density and exhibits a rapid development at a reasonable cost. In addition, supercapacitors Sensors 2017, 17, 1856 3 of 18 feature a better charge/discharge performance than any battery, involving a decrease in the system losses, which increases the system life because of the lower operating temperature.

•
Load supply is the most used application for low power. Another common application is energy harvesting. An interesting hybridization was done in [28,29] by means for water harvesting coupled to a disconnected system. • Microgrids are the most used application for high power including energy management through global control with connection to grid when there is no energy stored. Some other applications are power injection regulation for tracking the forecasts, smoothing the fluctuating output power of the PV plant and power sharing.

•
The trend when using ESS is to implement independent power stages for each power source, which means a boost stage for photovoltaics [30]. Photovoltaic inverters with two or more stages are usually implemented in the low-medium power range in order to boost the PV array voltage [31,32]. For higher power ranges, the boost stage is avoided as the PV arrays provide enough voltage and the efficiency is higher [33]. However, the energy management advantages introduced by an ESS require independent stages for each energy source in order to be optimized [34]. • Also, the control scheme is more flexible and robust when each decoupled stage introduces its degrees of freedom, to include all the electrical functions the converter is supposed to have. That is why most of the topologies include boost and DC/DC stages, including high power oriented ones, despite being worse. In addition, the efficiency of the boost stages could be optimized for the design [35].

•
The main goal is usually to maintain the battery health, in addition to the particular application purpose. This is done using the supercapacitor for the sharp changes and developing control strategies that decrease the charge/discharge current rates of battery while maintaining a healthy state of charge (SOC) for both. These techniques also imply reduced current stress levels, less temperature and improved battery life span. Usually, the hybrid solution is done by using a low pass filter (LPF) which provides a high frequency reference for the supercapacitor and a low frequency reference for the battery.

Motivation and Objective
Photovoltaic panels are continuously improving and increasing their efficiency, but photovoltaics is still an intermittent energy generation form. A storage system is required to meet the load and function requirements of the applications. In general, lead acid batteries are used as a conventional storage technology for photovoltaics but suffer from a series of failures that reduce battery life increasing the cost of the system. Li-ion batteries solve the lead acid battery problems but the battery life cycle is affected by the drop in voltage that occurs during high discharge currents. The combination of a supercapacitor and a battery to form a HESS reduces the stress on the battery caused by the high discharge currents resulting in an increase in the life of the batteries. In this scenario, the main objective of the paper is to design and develop a photovoltaic converter with the addition of a HESS with Li-ion batteries for mid-range nominal power applications. The aim is to find solutions to cover a wide range of very necessary applications for the development of the current electric sector, such as the integration of renewable energies, smart grids, smart houses and electric vehicles (EVs).

Innovative Contribution
The main contribution of the paper is to develop a photovoltaic inverter in the power range of residential and large scale photovoltaic systems with the possibility of managing the power injection, in spite of being a renewable energy, by means of an energy storage system. As the limited lifetime of batteries represents a serious disadvantage, a hybrid combination of batteries and supercapacitors is implemented and studied for this power range. A method for sizing the energy storage system and the hybrid distribution based on the photovoltaic generation is also presented. The power sharing reduces the battery stress and increases its lifespan while providing constant power injection prior to grid necessities.
After the exhaustive literature review done in the previous section, the document is organized in the following manner: firstly, the topology is indicated together with the materials and methods developed for the experimental prototype. Secondly, the sizing of the ESS and the hybrid distribution based on sunny and cloudy day photovoltaic data is proposed. Then, the full control algorithm is presented, including as objectives the Maximum Power Point Tracking (MPPT) and reduced battery stress. Finally, the converter operation is validated via simulation and experimental results.

Topology
The topology selected for the photovoltaic inverter with battery-supercapacitor HESS consists of four converters that share the DC link. It is composed by a boost stage for the PV source for solving MPPT, two bidirectional DC/DC converters for both ESS, the battery and the supercapacitor, for maintaining a DC link voltage, and a traditional 3-phase inverter for injecting a reference power into the grid. A transformer or DC current injection detection must be added for avoiding DC current injection into the grid. Figure 2 shows the scheme of the topology, which contains all the electrical variables used in subsequent sections.

Innovative Contribution
The main contribution of the paper is to develop a photovoltaic inverter in the power range of residential and large scale photovoltaic systems with the possibility of managing the power injection, in spite of being a renewable energy, by means of an energy storage system. As the limited lifetime of batteries represents a serious disadvantage, a hybrid combination of batteries and supercapacitors is implemented and studied for this power range. A method for sizing the energy storage system and the hybrid distribution based on the photovoltaic generation is also presented. The power sharing reduces the battery stress and increases its lifespan while providing constant power injection prior to grid necessities.
After the exhaustive literature review done in the previous section, the document is organized in the following manner: firstly, the topology is indicated together with the materials and methods developed for the experimental prototype. Secondly, the sizing of the ESS and the hybrid distribution based on sunny and cloudy day photovoltaic data is proposed. Then, the full control algorithm is presented, including as objectives the Maximum Power Point Tracking (MPPT) and reduced battery stress. Finally, the converter operation is validated via simulation and experimental results.

Topology
The topology selected for the photovoltaic inverter with battery-supercapacitor HESS consists of four converters that share the DC link. It is composed by a boost stage for the PV source for solving MPPT, two bidirectional DC/DC converters for both ESS, the battery and the supercapacitor, for maintaining a DC link voltage, and a traditional 3-phase inverter for injecting a reference power into the grid. A transformer or DC current injection detection must be added for avoiding DC current injection into the grid. Figure 2 shows the scheme of the topology, which contains all the electrical variables used in subsequent sections.

Materials and Methods
The proposed grid-connected PV HESS converter concept has been implemented experimentally to validate its operation. The experimental prototype is shown in Figure 3 and, basically, it contains the same elements as the topology shown in Figure 2. Each arrow in the diagram is a voltage or a current magnitude measured in the prototype by Hall Effect transducers, LV 25-P (LEM, Geneva, Switzerland) and LA 55P/SP1 (LEM, Geneva, Switzerland) respectively. The STM32F407 microcontroller-based control board acquires the measurements at a sample rate of 10 kHz, while the

Materials and Methods
The proposed grid-connected PV HESS converter concept has been implemented experimentally to validate its operation. The experimental prototype is shown in Figure 3 and, basically, it contains the same elements as the topology shown in Figure 2. Each arrow in the diagram is a voltage or a current magnitude measured in the prototype by Hall Effect transducers, LV 25-P (LEM, Geneva, Switzerland) and LA 55P/SP1 (LEM, Geneva, Switzerland) respectively. The STM32F407 microcontroller-based control board acquires the measurements at a sample rate of 10 kHz, while the generated 5 kHz PWM signals to control the electronic switches are updated at the same rate, that is two times each period. The power semiconductor are two IGBT-IPM 6MBP50RA120 modules (Fuji Electric, Tokyo, Japan), where each of them includes three legs to implement the topology. MP 176065 Li-ion batteries (Saft, Bagnolet, France) and BMOD0165 P048 B01 supercapacitor (Maxwell Technologies, San Diego, CA, United States) are connected to the power stage by means of its filters. The PV array is emulated by the HP E4351B solar array simulator (Agilent Technologies, Santa Clara, California, United States) and the grid is emulated by the HP 6834B Power Source/Analyzer (Agilent Technologies, Santa Clara, CA, United States), both of them connected to the topology by the appropriate filter. generated 5 kHz PWM signals to control the electronic switches are updated at the same rate, that is two times each period. The power semiconductor are two IGBT-IPM 6MBP50RA120 modules (Fuji Electric, Tokyo, Japan), where each of them includes three legs to implement the topology. MP 176065 Li-ion batteries (Saft, Bagnolet, France) and BMOD0165 P048 B01 supercapacitor (Maxwell Technologies, San Diego, CA, United States) are connected to the power stage by means of its filters. The PV array is emulated by the HP E4351B solar array simulator (Agilent Technologies, Santa Clara, California, United States) and the grid is emulated by the HP 6834B Power Source/Analyzer (Agilent Technologies, Santa Clara, CA, United States), both of them connected to the topology by the appropriate filter. Voltage and current magnitudes are measured by Hall Effect transducers which provides galvanic isolation and both DC and AC components. For currents, the LA 55P/SP1 and for voltages the LV 25-P. Table 3 summarizes the most relevant specifications of both transducers. The main advantages of this type of sensors are the good linearity, low common mode and high precision however, they are usually more expensive than other alternatives. LA 55P/SP1 current transducer schematic is shown in Figure 4a. Primary current IP travels through the ferromagnetic core and creates a magnetic flux, which is balanced by the magnetic flux created by the secondary current. An electronic stage is implemented in order to improve the accuracy of the primary current waveform representation by compensating the secondary current. By using this configuration, the bandwidth is extended and the time response is reduced. Voltage and current magnitudes are measured by Hall Effect transducers which provides galvanic isolation and both DC and AC components. For currents, the LA 55P/SP1 and for voltages the LV 25-P. Table 3 summarizes the most relevant specifications of both transducers. The main advantages of this type of sensors are the good linearity, low common mode and high precision however, they are usually more expensive than other alternatives. LA 55P/SP1 current transducer schematic is shown in Figure 4a. Primary current I P travels through the ferromagnetic core and creates a magnetic flux, which is balanced by the magnetic flux created by the secondary current. An electronic stage is implemented in order to improve the accuracy of the primary current waveform representation by compensating the secondary current. By using this configuration, the bandwidth is extended and the time response is reduced.
The LV 25-P voltage transducer schematic is shown in Figure 4b. In this case, the measured voltage is turned to the primary current of the transducer by an external high value high power resistor R 1 . As the primary current will be quite small, a large internal primary coil with many turns is added with the aim of generate the proper primary magnetic flux. Except of that, the voltage transducer follows the same principle of operation the current transducer follows. The LV 25-P voltage transducer schematic is shown in Figure 4b. In this case, the measured voltage is turned to the primary current of the transducer by an external high value high power resistor R1. As the primary current will be quite small, a large internal primary coil with many turns is added with the aim of generate the proper primary magnetic flux. Except of that, the voltage transducer follows the same principle of operation the current transducer follows.  A Hall semiconductor connected to an error amplifier evaluate the net flow over the ferrite core. The amplifier output injects a current in the secondary winding in order to cancel the magnetic flux. Due to this fact, the Hall Effect closed-loop sensors are usually called 'Zero-Flux' sensor. Finally, the secondary current flows through an external resistor RM for measuring a voltage drop that is proportional to the primary magnitude.
Four printed circuit board has been developed for the measuring the currents and voltages, two boards including four LA 55P/SP1 current transducers (see Figure 5a) and two boards including four LV 25-P voltage transducers (see Figure 5b).

HESS Sizing
The proper sizing of the ESS will meet the application needs while minimizing the cost, that is, the ESS capacity. The main goal of the ESS in a photovoltaic system is to turn a non-manageable power plant into a manageable one. One key factor when sizing the ESS is the time interval the inverter has to keep constant output active power. In Spain, some operation standards indicate that the power on the grid should be forecast every 15 min in order to supply the active and reactive power needed [36]. Also, the ESS should be operated inside a healthy SOC range which depends on the ESS technology, but in general it could be quantified as the 80% of the ESS rated capacity.
In this paper, the ESS sizing has been studied by simulating a constant power injection by the photovoltaic converter for 15 min intervals. These intervals are denominated as management time intervals. A range for the sizing will be proposed, the design value is a compromise between cost and photovoltaic discontinuities coverage. A Hall semiconductor connected to an error amplifier evaluate the net flow over the ferrite core. The amplifier output injects a current in the secondary winding in order to cancel the magnetic flux. Due to this fact, the Hall Effect closed-loop sensors are usually called 'Zero-Flux' sensor. Finally, the secondary current flows through an external resistor R M for measuring a voltage drop that is proportional to the primary magnitude.
Four printed circuit board has been developed for the measuring the currents and voltages, two boards including four LA 55P/SP1 current transducers (see Figure 5a) and two boards including four LV 25-P voltage transducers (see Figure 5b). The LV 25-P voltage transducer schematic is shown in Figure 4b. In this case, the measured voltage is turned to the primary current of the transducer by an external high value high power resistor R1. As the primary current will be quite small, a large internal primary coil with many turns is added with the aim of generate the proper primary magnetic flux. Except of that, the voltage transducer follows the same principle of operation the current transducer follows.  A Hall semiconductor connected to an error amplifier evaluate the net flow over the ferrite core. The amplifier output injects a current in the secondary winding in order to cancel the magnetic flux. Due to this fact, the Hall Effect closed-loop sensors are usually called 'Zero-Flux' sensor. Finally, the secondary current flows through an external resistor RM for measuring a voltage drop that is proportional to the primary magnitude.
Four printed circuit board has been developed for the measuring the currents and voltages, two boards including four LA 55P/SP1 current transducers (see Figure 5a) and two boards including four LV 25-P voltage transducers (see Figure 5b).

HESS Sizing
The proper sizing of the ESS will meet the application needs while minimizing the cost, that is, the ESS capacity. The main goal of the ESS in a photovoltaic system is to turn a non-manageable power plant into a manageable one. One key factor when sizing the ESS is the time interval the inverter has to keep constant output active power. In Spain, some operation standards indicate that the power on the grid should be forecast every 15 min in order to supply the active and reactive power needed [36]. Also, the ESS should be operated inside a healthy SOC range which depends on the ESS technology, but in general it could be quantified as the 80% of the ESS rated capacity.
In this paper, the ESS sizing has been studied by simulating a constant power injection by the photovoltaic converter for 15 min intervals. These intervals are denominated as management time intervals. A range for the sizing will be proposed, the design value is a compromise between cost and photovoltaic discontinuities coverage.

HESS Sizing
The proper sizing of the ESS will meet the application needs while minimizing the cost, that is, the ESS capacity. The main goal of the ESS in a photovoltaic system is to turn a non-manageable power plant into a manageable one. One key factor when sizing the ESS is the time interval the inverter has to keep constant output active power. In Spain, some operation standards indicate that the power on the grid should be forecast every 15 min in order to supply the active and reactive power needed [36]. Also, the ESS should be operated inside a healthy SOC range which depends on the ESS technology, but in general it could be quantified as the 80% of the ESS rated capacity.
In this paper, the ESS sizing has been studied by simulating a constant power injection by the photovoltaic converter for 15 min intervals. These intervals are denominated as management time intervals. A range for the sizing will be proposed, the design value is a compromise between cost and photovoltaic discontinuities coverage.
The minimum ESS capacity, ESS Ca,min , is obtained by calculating the grid injected power as an average of the estimated power generation on the next management time interval. Obviously, this is an ideal management of the ESS, as it is based on the photovoltaic generation forecast. The mathematical expression in kWh applying the Tustin discrete approach is: where, ESS Ch is the energy charge in the ESS, p S is the grid injected power in kW, p PV is the photovoltaic generation power in kW, T s is sampling time in seconds, i is the sample pointer, m is the time management interval pointer, k is the cumulative pointer, N is the number of samples inside a management time interval and M is the number of management time intervals. Figure 6 shows the PV power generation, the PV power injected into the grid (constant in every 15 min interval and calculated as the average of the next management time interval) and the energy that must be stored. From this, it is possible to determine the minimum ESS size needed on a sunny and a cloudy day. Note that the asymmetry in the sunny day could be due to morning mist. The nominal sunny day generates 28 kW peak which implies a need for a minimum ESS of 0.2 kWh. However, the cloudy day has sharp changes and the ESS needed is close to 1.2 kWh. The minimum ESS capacity, , , is obtained by calculating the grid injected power as an average of the estimated power generation on the next management time interval. Obviously, this is an ideal management of the ESS, as it is based on the photovoltaic generation forecast. The mathematical expression in kWh applying the Tustin discrete approach is: where, ESSCh is the energy charge in the ESS, pS is the grid injected power in kW, pPV is the photovoltaic generation power in kW, Ts is sampling time in seconds, i is the sample pointer, m is the time management interval pointer, k is the cumulative pointer, N is the number of samples inside a management time interval and M is the number of management time intervals. Figure 6 shows the PV power generation, the PV power injected into the grid (constant in every 15 min interval and calculated as the average of the next management time interval) and the energy that must be stored. From this, it is possible to determine the minimum ESS size needed on a sunny and a cloudy day. Note that the asymmetry in the sunny day could be due to morning mist. The nominal sunny day generates 28 kW peak which implies a need for a minimum ESS of 0.2 kWh. However, the cloudy day has sharp changes and the ESS needed is close to 1.2 kWh.
(a) (b)   The maximum ESS capacity, ESS Ca,max , could be calculated as the energy needed to provide the nominal power of the photovoltaic inverter during a management time interval. In this way, the injected power reference could be matched in spite of a cloud covering over the PV panels during nominal photovoltaic generation at the beginning of the management time interval, assuring to provide the calculated power reference in the worst case. In kWh one has: where, p PV,nom is the nominal photovoltaic generation power in kW and T m is the management time interval in s. Considering a nominal PV power of 30 kW, the maximum ESS is 7.5 kWh. Obviously, the higher the ESS size, the better from the management insurance point of view, but the cost and volume are also higher. The decreasing price of some battery technologies in the last years could make the maximum ESS size affordable for some installations.
In this work, the power reference for the next management time interval is calculated by considering the PV power at the end of the management time interval. With this technique and thinking of a sunny day, the ESS starts discharged at the beginning of the day, it charges during the first irradiance hours of the day, and finally, it discharges during the last irradiance hours of the day. This operation technique will improve the cycle and current rate charge/discharge of the battery, and therefore its lifetime. However, the ESS size is expected to be bigger than with the forecast technique. Figure 7 shows the results obtained with the same 15 min cycle time. On a sunny day the required ESS is 0.26 kWh, while in a cloudy day it is 1.6 kWh. The expression is (1) again, but the grid injected power is obtained differently: Obviously, the higher the ESS size, the better from the management insurance point of view, but the cost and volume are also higher. The decreasing price of some battery technologies in the last years could make the maximum ESS size affordable for some installations.
In this work, the power reference for the next management time interval is calculated by considering the PV power at the end of the management time interval. With this technique and thinking of a sunny day, the ESS starts discharged at the beginning of the day, it charges during the first irradiance hours of the day, and finally, it discharges during the last irradiance hours of the day. This operation technique will improve the cycle and current rate charge/discharge of the battery, and therefore its lifetime. However, the ESS size is expected to be bigger than with the forecast technique. Figure 7 shows the results obtained with the same 15 min cycle time. On a sunny day the required ESS is 0.26 kWh, while in a cloudy day it is 1.6 kWh. The expression is (1) again, but the grid injected power is obtained differently: For a battery-supercapacitor HESS, the calculated ESS size must be divided for assuring the energy density term for the battery and the power term for the supercapacitor, in order to maintain the stress of the battery and increase its lifetime even more. By using a first order LPF, the batterysupercapacitor energy percentage depends on the time constant τ, which is inversely proportional to the battery stress.
The HESS sizing criteria followed in this work is based on the percentage of energy each ESS provides when a step power reference is tracked. The photovoltaic generation changes over time, so taking into account a step power reference change is the worst scenario. The relation between τ and the management time interval gives the capacity percentage distribution for the battery, , , and for the supercapacitor, , : where ESSCa is the ESS capacity decided for the design. The value for the ratio should be big enough in order to avoid sharp energy changes in the battery, which must be managed by the supercapacitor. Obviously, the compromise is located when the supercapacitor storage system For a battery-supercapacitor HESS, the calculated ESS size must be divided for assuring the energy density term for the battery and the power term for the supercapacitor, in order to maintain the stress of the battery and increase its lifetime even more. By using a first order LPF, the battery-supercapacitor energy percentage depends on the time constant τ, which is inversely proportional to the battery stress.
The HESS sizing criteria followed in this work is based on the percentage of energy each ESS provides when a step power reference is tracked. The photovoltaic generation changes over time, so taking into account a step power reference change is the worst scenario. The relation between τ and the management time interval gives the capacity percentage distribution for the battery, ESS Ca,B , and for the supercapacitor, ESS Ca,SC : where ESS Ca is the ESS capacity decided for the design. The value for the τ T m ratio should be big enough in order to avoid sharp energy changes in the battery, which must be managed by the supercapacitor. Obviously, the compromise is located when the supercapacitor storage system becomes too expensive in the economic study of the converter. Considering the 15-min management time interval and the 7.5 kWh capacity of the ESS, a 0.1 index is a good balance as it implies the supercapacitor supports the battery for more than a minute assuring low battery stress [7] and the cost of the system is affordable [4].

Control Logic
The control system scheme proposed in this work is shown in Figure 8a (readers may refer to Figure 2 to identify the variables). The measured electrical variables are placed on the left and the pulse width modulation (PWM) duty cycles control signals are placed on the right. becomes too expensive in the economic study of the converter. Considering the 15-min management time interval and the 7.5 kWh capacity of the ESS, a 0.1 index is a good balance as it implies the supercapacitor supports the battery for more than a minute assuring low battery stress [7] and the cost of the system is affordable [4].

Control Logic
The control system scheme proposed in this work is shown in Figure 8a (readers may refer to Figure 2 to identify the variables). The measured electrical variables are placed on the left and the pulse width modulation (PWM) duty cycles control signals are placed on the right. The higher level control is based on a state machine that generates the references to be tracked for the low level control blocks. These low level control blocks are the MPPT for the PV boost, the HESS for the battery-supercapacitor bidirectional DC/DC converters and the dq control for the grid connected inverter. Figure 8b shows the state machine for controlling the grid connected photovoltaic inverter with battery-capacitor HESS. It is based on calculating the power reference to be injected by using the last PV power measures taken on the previous management time period, as explained before in Equation (5). The states are explained below: 1. The converter enters standby mode when the PV array has low irradiance, which could be evaluated via the PV voltage considering MPPT operation, and the management time interval starts. 2. In normal operation mode, every parameter of the converter is working inside the good The higher level control is based on a state machine that generates the references to be tracked for the low level control blocks. These low level control blocks are the MPPT for the PV boost, the HESS for the battery-supercapacitor bidirectional DC/DC converters and the dq control for the grid connected inverter. Figure 8b shows the state machine for controlling the grid connected photovoltaic inverter with battery-capacitor HESS. It is based on calculating the power reference to be injected by using the last PV power measures taken on the previous management time period, as explained before in Equation (5). The states are explained below: 1.
The converter enters standby mode when the PV array has low irradiance, which could be evaluated via the PV voltage considering MPPT operation, and the management time interval starts.

2.
In normal operation mode, every parameter of the converter is working inside the good operating range, and subsequently, the power injected into the grid is the reference power in the interval. This mode is reached from standby when the irradiance is enough, and from the other states when the ESS recovers a good SOC range. 3.
The battery SOC has reached the top allowed level or the battery charging current becomes saturated. This means the PV generation is too high. In order to maintain the injected power reference, the system sets the reference power point tracking (RPPT) instead of the MPPT by saturating the PV boost current, i PV,sat . In case of high battery SOC, the RPPT is obtained for zero battery power flow and at the end of the management time interval, the PV boost stage operates on MPPT for the next p s,ref calculation in an optimistic way in order to force battery discharge. If the battery current is saturated, the RPPT is obtained to avoid current battery saturation.

4.
Battery SOC is at the minimum value or battery current is saturated at its maximum value. This is a critical state, where p s,ref must change before the end of the management time interval for zero or non-saturated battery power flow because of low PV irradiance. p S,ref is calculated in a pessimistic way for the next cycle.

5.
Supercapacitor has reached its top voltage. Negative power flow for the supercapacitor by adding a steady state negative offset, i SC,offset .

6.
Supercapacitor voltage is too low. Positive power flow for the supercapacitor by adding a steady state positive offset.
The MPPT scheme is depicted in Figure 8c. It is based on the incremental conductance method [37]. The PV current reference is obtained by an integral controller or by limiting it via i PV,sat depending on the state. Then a PI controller tracks it by acting over the PV boost duty cycle.
The diagram in Figure 8d corresponds to the battery-supercapacitor control algorithm. The ESS is controlled with the aim of regulating the DC link voltage. First of all, a PI controller tracks the DC link voltage by calculating the ESS current reference. Then, the ESS current reference is divided into the HESS current reference by using a LPF. The battery current reference is the low frequency one, while the supercapacitor current reference is the high frequency one. Respective PI controllers adjust the duty cycle of the bidirectional DC-DC converters. In this way, the stress and temperature of the battery are reduced.
The inverter control diagram is shown in Figure 8e. It is based on the direct-quadrature theory, where the phase-neutral grid voltages, v abc , and currents, i abc , are transformed into the dq voltages, v dq , and currents, i dq , components for and easier current control [38]. The Phase Locked Loop (PLL) synchronizes with the fundamental positive sequence component of the grid voltage [39]. The d current reference is directly obtained by the grid power reference generated in the state machine. The q current reference is set to zero for null grid reactive power injection. Inverter reference voltages are obtained in the dq frame by using a feed forward scheme, which decouples d and q terms: where, L is the grid filter inductor and R is the resistance in series. The derivative part is solved by using respective PI controllers and the inverter modulation index is calculated by scaling the dq-abc output depending on the DC link voltage.

Simulation
The proposed converter has been simulated with a MATLAB/Simulink Simscape model. The Simscape toolbox contains power electronics symbols that include semiconductor parameters for simulating switching losses, conduction losses and transients. Also, the simulation step for the power scheme was set to 10 −6 s while the simulation step for the control algorithm was set to the sample rate the measurements are acquired (2 × 10 −4 s). In this way, the simulation could be compared with the real behavior, as the power electronics are simulated with great detail and the control algorithm updates when the control board does.
The simulation test consists of 10 s where PV irradiance changes in all its range, and the time management interval is set to 2 s for checking the state machine operation. The parameters of the system are summarized in Table 4. The passive element of the topology has been designed in order to provide a low voltage and current ripple [40], while the rest of the parameters has been justified in previous sections. Simulation results are shown in several figures. Figure 9a includes PV waveforms plus the DC link, Figure 9b,c include the grid variables, and Figure 10 includes the HESS response.
The simulation test consists of 10 s where PV irradiance changes in all its range, and the time management interval is set to 2 s for checking the state machine operation. The parameters of the system are summarized in Table 4. The passive element of the topology has been designed in order to provide a low voltage and current ripple [40], while the rest of the parameters has been justified in previous sections. Simulation results are shown in several figures. Figure 9a includes PV waveforms plus the DC link, Figures 9b,c include the grid variables, and Figure 10 includes the HESS response.
The sunny day profile can be seen in Figure 9a. The PV boost MPPT operates properly during the whole interval, except for the low irradiance startup where the power fluctuates a little. The HESS bidirectional DC/DC converters maintain the DC link voltage into the reference value. Figure 9b represents the grid dq components and the injected power. The d voltage becomes constant while the q voltage is null which implies the PLL works properly. The injected power into then grid is totally active and constant during the management time intervals, making the PV plant manageable despite the irradiance changes. Figure 9c shows a window of the inverter and grid currents waveforms with nominal power injection. The total harmonic distortion (THD) obtained is less than the 5% the standards propose [41,42].
The battery and the supercapacitor operation are depicted in Figures 10a,b, respectively. Also, the total HESS operation is in Figure 10b. As expected, the battery shows a smooth operation with charge/discharge sequence, which means the battery stress and temperature is minimized and its lifetime is improved. The supercapacitor takes the sharp changes of voltage. Battery and supercapacitor packs are associated in order to decrease the boost index to the DC link, where the performance and controllability is better. The simulations stay away from battery and supercapacitor SOC and saturation limits, so they do not affect in the test.

Experimental Results
Experimental results are shown in Figure 11. Figure 11a depicts a cyclic injected power reference operation mode in order to demonstrate how the HESS works while the batteries are charging. In that case, the PV maintains its power injection in the MPPT while the grid power reference changes as a square wave and the battery together with the supercapacitor compensate the power energy balance. Note how the sharp energy changes in the ESS are absorbed by the supercapacitor maintaining the battery in a healthier operation mode. Figure 11b depicts a steady state operation mode with the aim of checking the grid waveforms while the battery is discharging. The power factor is one as both the voltage and the current are in phase and the current harmonic distortion stays in low terms. In the steady state only the battery is

Experimental Results
Experimental results are shown in Figure 11. Figure 11a depicts a cyclic injected power reference operation mode in order to demonstrate how the HESS works while the batteries are charging. In that case, the PV maintains its power injection in the MPPT while the grid power reference changes as a square wave and the battery together with the supercapacitor compensate the power energy balance. Note how the sharp energy changes in the ESS are absorbed by the supercapacitor maintaining the battery in a healthier operation mode. Figure 11b depicts a steady state operation mode with the aim of checking the grid waveforms while the battery is discharging. The power factor is one as both the voltage and the current are in phase and the current harmonic distortion stays in low terms. In the steady state only the battery is The sunny day profile can be seen in Figure 9a. The PV boost MPPT operates properly during the whole interval, except for the low irradiance startup where the power fluctuates a little. The HESS bidirectional DC/DC converters maintain the DC link voltage into the reference value. Figure 9b represents the grid dq components and the injected power. The d voltage becomes constant while the q voltage is null which implies the PLL works properly. The injected power into then grid is totally active and constant during the management time intervals, making the PV plant manageable despite the irradiance changes. Figure 9c shows a window of the inverter and grid currents waveforms with nominal power injection. The total harmonic distortion (THD) obtained is less than the 5% the standards propose [41,42].
The battery and the supercapacitor operation are depicted in Figure 10a,b, respectively. Also, the total HESS operation is in Figure 10b. As expected, the battery shows a smooth operation with charge/discharge sequence, which means the battery stress and temperature is minimized and its lifetime is improved. The supercapacitor takes the sharp changes of voltage. Battery and supercapacitor packs are associated in order to decrease the boost index to the DC link, where the performance and controllability is better. The simulations stay away from battery and supercapacitor SOC and saturation limits, so they do not affect in the test.

Experimental Results
Experimental results are shown in Figure 11. Figure 11a depicts a cyclic injected power reference operation mode in order to demonstrate how the HESS works while the batteries are charging. In that case, the PV maintains its power injection in the MPPT while the grid power reference changes as a square wave and the battery together with the supercapacitor compensate the power energy balance. Note how the sharp energy changes in the ESS are absorbed by the supercapacitor maintaining the battery in a healthier operation mode. the one that provides energy in the ESS. The experimental behavior matches the expected behavior described in the simulation section.

Conclusions
A grid-connected photovoltaic inverter with battery-supercapacitor HESS for providing manageable power injection has been presented. An adapted combination of converter topologies has been selected. The system components were designed in order to match the required behavior, taking into account different irradiance conditions based on a typical daily profile. The control logic was implemented with the objectives of: (1) extracting the maximum power from the PV panels (MPPT control), (2) suitable task sharing between battery and SC and (3) injecting power into the grid based on the direct-quadrature theory.
The main benefit of the proposed system is the possibility to transform a PV plant in a manageable power plant. This is due to the constant power injection to the grid during 15-min intervals, which is a value often considered by several standards. In addition, a fraction of the battery current is diverted to the SC along with the high frequency components. Because of this, there is a significant reduction in charge/discharge current rates, which leads to a longer lifetime and permits a reduction in size of the battery.
The proposed topology and strategy are experimentally validated for sudden change in the reference power to inject into grid. The results show that the proposed scheme is able to: (a) reduce the charge/discharge rates and (b) produce a nearly sinusoidal waveform for the current injected into the grid. Also, the sizing of the ESS and the battery/supercapacitor distribution has been addressed by using the power curves of the PV array. A range is calculated for the capacity of the ESS depending on the nominal power of the converter and the time interval the generation wants to be manageable.  Figure 11b depicts a steady state operation mode with the aim of checking the grid waveforms while the battery is discharging. The power factor is one as both the voltage and the current are in phase and the current harmonic distortion stays in low terms. In the steady state only the battery is the one that provides energy in the ESS. The experimental behavior matches the expected behavior described in the simulation section.

Conclusions
A grid-connected photovoltaic inverter with battery-supercapacitor HESS for providing manageable power injection has been presented. An adapted combination of converter topologies has been selected. The system components were designed in order to match the required behavior, taking into account different irradiance conditions based on a typical daily profile. The control logic was implemented with the objectives of: (1) extracting the maximum power from the PV panels (MPPT control), (2) suitable task sharing between battery and SC and (3) injecting power into the grid based on the direct-quadrature theory.
The main benefit of the proposed system is the possibility to transform a PV plant in a manageable power plant. This is due to the constant power injection to the grid during 15-min intervals, which is a value often considered by several standards. In addition, a fraction of the battery current is diverted to the SC along with the high frequency components. Because of this, there is a significant reduction in charge/discharge current rates, which leads to a longer lifetime and permits a reduction in size of the battery.
The proposed topology and strategy are experimentally validated for sudden change in the reference power to inject into grid. The results show that the proposed scheme is able to: (a) reduce the charge/discharge rates and (b) produce a nearly sinusoidal waveform for the current injected into the grid. Also, the sizing of the ESS and the battery/supercapacitor distribution has been addressed by using the power curves of the PV array. A range is calculated for the capacity of the ESS depending on the nominal power of the converter and the time interval the generation wants to be manageable.

Conflicts of Interest:
The authors declare no conflict of interest.