Operation of the Hybrid Photovoltaic-Battery System on the Electricity Market—Simulation, Real-Time Tests and Cost Analysis

: This paper presents research on a hybrid photovoltaic-battery energy storage system, declaring its hourly production levels as a member of a balancing group submitting common scheduling unit to the day-ahead market. It also discusses the variability of photovoltaic system generation and energy storage response. The major research questions were whether the operation of a hybrid photovoltaic-battery energy storage system is viable from the technical and economic viewpoint and how to size battery energy storage for that purpose. The DIgSILENT PowerFactory environment was used to develop the simulation model of postulated hybrid system. Then, tests were conducted on real devices installed in the LINTEˆ2 laboratory at Gda´nsk University of Technology, Poland. Firstly, power generation in the photovoltaic system was modeled using hardware in the loop technique and tested in cooperation with emulated photovoltaic and real battery energy storage system (lithium-ion battery, 25 kWh). Secondly, a real photovoltaic power plant (33 kW) and real battery energy storage were applied. The results obtained from laboratory experiments showed that market operation of hybrid photovoltaic-battery energy storage system is feasible. However, developing a control strategy constitutes a great challenge, as the operator is forced to intervene more frequently than the simulation models indicate in order to keep the parameters of battery storage within accepted ranges, especially in view of a sudden weather breakdown. Levelized cost of electricity from photovoltaic-battery energy storage system varied from 314 to 455 $ / MWh, which has proven to be from two to three times higher than the current annual average day-ahead market price in Poland.


Introduction
Due to the increasing concern over the greenhouse effect and the possible harmful impact of fossil-fuel-based power generation on human health, the European Union (EU) seeks a common long-term energy strategy to decarbonize the power sector [1]. Renewable energy sources, including photovoltaic (PV) systems, are key technologies in the pursuit of carbon-free electricity production [2]. Currently, fossil-fuel-based units can offer electricity on the market at a generally lower production cost as compared to solar PV and wind [3]. However, they are the source of emissions and their generation costs are expected to increase as the emission allowance costs will rise due to the implementation, into the EU Emission Trading Scheme (EU ETS) [4], of a mechanism of Market Stability Reserve [5], which

Rated Power and Capacity Sizing of Battery Energy Storage
In this study, the PV system operates as the member of a balancing group that submits a common scheduling unit to the DAM. The terms balancing group and common scheduling unit were defined in [27]. In a balancing group, each member declares hourly electricity production a day ahead. If there is a negative or positive imbalance, it either incurs the costs of balancing or receives additional income, respectively. Since PV power generation is dependent on the level of insolation and is variable over time, it is proposed that the battery energy storage will be installed alongside. PV-BESS hybrid follows an average power level resulting from the declared hourly electricity production. Because the power generated by a PV system is a subject to stochastic variation, the generation profile of the system was analyzed to select BESS parameters. Therefore, historical insolation and power generation data, both recorded by measurement systems in the LINTEˆ2 laboratory were used. Collected data are a basis for the forecasting of the electricity generation profile submitted to the common scheduling unit offered by the balancing group participating in the DAM.
A five-step approach to size BESS for electricity market participation was proposed, i.e.: (1) The analysis of PV power generation profile; (2) the model of electricity market participation; (3) preliminary BESS capacity sizing; (4) preliminary BESS power sizing; (5) correction of parameters due to BESS efficiency, charge rate (C-rate) and the state of charge (SOC) requirements. The methodology was presented, in a stepwise manner, in Sections 2.1-2.5.

The Analysis of PV Power Generation Profile
To select battery parameters, the nature of the daily PV power output profiles was studied. Per-unit generated power curves of PV system are presented in Figure 1. The data were measured with a resolution of one second and recorded in LINTEˆ2 during three consecutive days of March. Three generation profiles of different shape were obtained. In the "A" profile, minor short-term variations of power generated are observed, while in the "B" profile, obtained on a cloudless day, they are minimal, making the profile optimal for the DAM participation. In the case of a short weather breakdown, BESS is able to balance electricity. Electricity market participation on a very cloudy day, as recorded in the "C" profile, increases the risk of incurring high balancing costs, since the committed hourly electricity production may not be delivered due to hard-to-predict insolation levels. Instead, the PV owner may choose to buy the BESS of higher rated power and energy capacity, increasing system costs.
Energies 2020, 13, x FOR PEER REVIEW 4 of 20 summarizes and advances authors' past work [26]. Real-live experiments and cost analysis constitute a novelty in relation to previous publications.

Rated Power and Capacity Sizing of Battery Energy Storage
In this study, the PV system operates as the member of a balancing group that submits a common scheduling unit to the DAM. The terms balancing group and common scheduling unit were defined in [27]. In a balancing group, each member declares hourly electricity production a day ahead. If there is a negative or positive imbalance, it either incurs the costs of balancing or receives additional income, respectively. Since PV power generation is dependent on the level of insolation and is variable over time, it is proposed that the battery energy storage will be installed alongside. PV-BESS hybrid follows an average power level resulting from the declared hourly electricity production. Because the power generated by a PV system is a subject to stochastic variation, the generation profile of the system was analyzed to select BESS parameters. Therefore, historical insolation and power generation data, both recorded by measurement systems in the LINTE^2 laboratory were used. Collected data are a basis for the forecasting of the electricity generation profile submitted to the common scheduling unit offered by the balancing group participating in the DAM.
A five-step approach to size BESS for electricity market participation was proposed, i.e.: (1) The analysis of PV power generation profile; (2) the model of electricity market participation; (3) preliminary BESS capacity sizing; (4) preliminary BESS power sizing; (5) correction of parameters due to BESS efficiency, charge rate (C-rate) and the state of charge (SOC) requirements. The methodology was presented, in a stepwise manner, in subsections 2.1-2.5.

The Analysis of PV Power Generation Profile
To select battery parameters, the nature of the daily PV power output profiles was studied. Per-unit generated power curves of PV system are presented in Figure 1. The data were measured with a resolution of one second and recorded in LINTE^2 during three consecutive days of March. Three generation profiles of different shape were obtained. In the "A" profile, minor short-term variations of power generated are observed, while in the "B" profile, obtained on a cloudless day, they are minimal, making the profile optimal for the DAM participation. In the case of a short weather breakdown, BESS is able to balance electricity. Electricity market participation on a very cloudy day, as recorded in the "C" profile, increases the risk of incurring high balancing costs, since the committed hourly electricity production may not be delivered due to hard-to-predict insolation levels. Instead, the PV owner may choose to buy the BESS of higher rated power and energy capacity, increasing system costs.

The Model of Electricity Market Participation
The battery power was determined as the maximal difference between PV power output and declared power in a given hour, searched over the entire period of the analysis, and the maximum Energies 2020, 13, 1402 5 of 21 quantity of stored electricity was used to size battery capacity. The declared power was different for each hour of market participation. Keeping an average power output over the total DAM participation period T was also considered. However, the studies have shown it would result in a three times higher rated power and 30 times higher energy capacity [26]. The hourly changing commitments lead to decreased battery costs and increased risk of failing to deliver the declared energy amounts, which forces the operator to incur the costs of market balancing.
The maximum daily DAM participation T was equal to 12 h ( Figure 2). The first hour of market participation (t A ) was determined as follows: BESS capacity should be sized to be able to store the excess of PV-generated electricity and return it to meet any shortages in the analyzed time range. It was calculated using a two-step method. Firstly, hourly (Δt = 1) electricity production and corresponding average power were forecasted: Secondly, the theoretical capacity was determined for each hour i and j when battery discharging and charging should occur, respectively: where: and    Figure 2. Graphic illustration of the energy storage capacity computation.
The maximum daily electricity production was searched within the assumed time span (T). The entire time range within the day, with non-zero PV power generation was tested. Subsequently, BESS power and capacity were preliminarily determined within t A , t A + T .

Preliminary BESS Capacity Sizing
BESS capacity should be sized to be able to store the excess of PV-generated electricity and return it to meet any shortages in the analyzed time range. It was calculated using a two-step method. Firstly, hourly (∆t = 1) electricity production and corresponding average power were forecasted: Secondly, the theoretical capacity was determined for each hour i and j when battery discharging and charging should occur, respectively: where: and Figure 2 illustrates, how E − and E + were obtained.

Preliminary BESS Power Sizing
Battery power was selected so as to ensure that the contribution of the hybrid PV-BESS system to the common scheduling unit is kept constant over an hour and as close as possible to the scheduled average power level. To comply with this requirement in each analyzed period of time ∆t, BESS rated power must be at least equal to the maximum commanded power, i.e., the difference between power generated by the PV system (P PV ) and the set hourly average power (P ref ). Subsequently, the rated real power of the BESS P n is determined as:

Correction of Parameters
Delivering the committed power of the BESS-PV hybrid system requires taking into account both the BESS load level and the ramp-rate limitations of the battery charging and discharging. Groot et al. [28] analyzed the impact of different variables, among others the state of charge (SOC), on BESS ageing. Their outcomes, compared with those obtained by Choi and Lim [29], Diúçi et al. [30], Takahashi et al. [31] Zhang et al. [32], Torres et al. [33], and Zhu et al. [34], led the authors to the conclusion that the battery SOC range should be 0.4-0.8. Therefore, the energy storage capacity should be approximately 70% higher than the one obtained from equation (3). To increase BESS lifetime, ramp-rate limitations are imposed on the charging and discharging current, which requires further capacity oversizing. The active power losses of the converter and other energy-conversion-related BESS system components should also be taken into account. Doubling the battery capacity and power, respectively obtained from Equations (3) and (6), is a common practice.

Simulation Modeling
In order to verify BESS parameters, determined on the basis of a five-step methodology and with the use of the assumptions made in Section 2, simulation studies were conducted. A power grid model with BESS representation, based on work by Kottick et al. [35], Medora and Kusko [36], Barsali and Ceraolo [37] and embedded in the Power Factory software [38], was applied in simulations, and a PV model was added. The power of PV-BESS hybrid system was controlled at the point of common coupling (PCC). The topology of the test power system is presented in Figure 3.

Preliminary BESS Power Sizing
Battery power was selected so as to ensure that the contribution of the hybrid PV-BESS system to the common scheduling unit is kept constant over an hour and as close as possible to the scheduled average power level. To comply with this requirement in each analyzed period of time Δt, BESS rated power must be at least equal to the maximum commanded power, i.e., the difference between power generated by the PV system (PPV) and the set hourly average power (Pref). Subsequently, the rated real power of the BESS Pn is determined as:

Correction of Parameters
Delivering the committed power of the BESS-PV hybrid system requires taking into account both the BESS load level and the ramp-rate limitations of the battery charging and discharging. Groot et al. [28] analyzed the impact of different variables, among others the state of charge (SOC), on BESS ageing. Their outcomes, compared with those obtained by Choi and Lim [29], Diúçi et al. [30], Takahashi et al. [31] Zhang et al. [32], Torres et al. [33], and Zhu et al. [34], led the authors to the conclusion that the battery SOC range should be 0.4-0.8. Therefore, the energy storage capacity should be approximately 70% higher than the one obtained from equation (3). To increase BESS lifetime, ramp-rate limitations are imposed on the charging and discharging current, which requires further capacity oversizing. The active power losses of the converter and other energy-conversion-related BESS system components should also be taken into account. Doubling the battery capacity and power, respectively obtained from Equations (3) and (6), is a common practice.

Simulation Modeling
In order to verify BESS parameters, determined on the basis of a five-step methodology and with the use of the assumptions made in Section 2, simulation studies were conducted. A power grid model with BESS representation, based on work by Kottick et al. [35], Medora and Kusko [36], Barsali and Ceraolo [37] and embedded in the Power Factory software [38], was applied in simulations, and a PV model was added. The power of PV-BESS hybrid system was controlled at the point of common coupling (PCC). The topology of the test power system is presented in Figure 3.  A detailed description of the experiment was presented in [26], where two methods of participation in the DAM were considered: • Method #1-the committed generation power was constant over daily participation ∆t = T ( Figure 4a); • Method #2-the committed generation power varied every hour ∆t = 1 h (Figure 4b).
Energies 2020, 13, x FOR PEER REVIEW 7 of 20 Figure 3. Test power system topology, T -power transformer 15/0.4 kV/kV, PPVmeas-measured power output of PV system, Pref -set power level for PV system, based on the declarations submitted to the day-ahead market (DAM) through balancing group and weather forecasts.
A detailed description of the experiment was presented in [26], where two methods of participation in the DAM were considered: • Method #1-the committed generation power was constant over daily participation Δt = T ( Figure 4a); • Method #2-the committed generation power varied every hour Δt = 1 h (Figure 4b).
Both methods assumed that the PV-BESS hybrid participates in the DAM for T period daily.  Table 1 presents the results of battery sizing for a PV-BESS hybrid example. The required values of energy and real power of the battery, shown in Table 1, were determined for generation profile "B" (Figure 1), maximum PV farm power Pmax(PV) = 4 MW, and the duration of electricity market participation T = 10 h. On the basis of conducted analysis, the advantages and disadvantages of both methods were indicated. The advantage of method #1 is the constant production of hybrid system power throughout the entire daily PV generation period. This enables to limit the variability of voltages and power flows in the examined area of the network. The biggest disadvantage of this method is the investment expenditure requirements. Compared with method #2, the energy storage capacity must be several dozen times greater, which practically disqualifies this method. In addition to economic reasons, the use of method #2 enables us to apply a more accurate short-term forecast of weather conditions, which translates into a more precise determination of production. This method allows for periodic (here Δt = 1 h) stabilization of active power flows in the examined area of the network. In addition, the use of converter systems enables to use the solutions that allow the regulation of reactive power flow or voltage level. Thus, it is possible for the analysed hybrid system to provide ancillary services in the scope of reactive power or voltage control at PCC.
To summarize the data gathered in Section 2 and results obtained from simulation tests, the following steps are recommended: Both methods assumed that the PV-BESS hybrid participates in the DAM for T period daily. Table 1 presents the results of battery sizing for a PV-BESS hybrid example. The required values of energy and real power of the battery, shown in Table 1, were determined for generation profile "B" (Figure 1), maximum PV farm power P max(PV) = 4 MW, and the duration of electricity market participation T = 10 h. On the basis of conducted analysis, the advantages and disadvantages of both methods were indicated. The advantage of method #1 is the constant production of hybrid system power throughout the entire daily PV generation period. This enables to limit the variability of voltages and power flows in the examined area of the network. The biggest disadvantage of this method is the investment expenditure requirements. Compared with method #2, the energy storage capacity must be several dozen times greater, which practically disqualifies this method. In addition to economic reasons, the use of method #2 enables us to apply a more accurate short-term forecast of weather conditions, which translates into a more precise determination of production. This method allows for periodic (here ∆t = 1 h) stabilization of active power flows in the examined area of the network. In addition, the use of converter systems enables to use the solutions that allow the regulation of reactive power flow or voltage level. Thus, it is possible for the analysed hybrid system to provide ancillary services in the scope of reactive power or voltage control at PCC.
To summarize the data gathered in Section 2 and results obtained from simulation tests, the following steps are recommended: Energies 2020, 13, 1402 8 of 21

•
Knowing the nature of the DAM and taking into account significant difference in capital expenditures, method #2 of bidding varying hourly electricity production should be adopted; • To size the battery power and energy capacity, the generation profile with the lowest instantaneous power variation, the maximum amplitude, and the maximum effective operation time should be chosen.
Considering the above, method #2 was chosen for the tests using real photovoltaic power plant and batteries.

Real-Time Tests
The results of the simulation tests described above were obtained assuming a small momentary variability of generation and 100% correctness of the solar irradiation forecast. For full verification of the proposed solution, two real-time experiments were performed with the use of LINTEˆ2 research laboratory infrastructure. In each of these tests the Li-ion battery was the subject of control. A scaled-down battery, connected to the low voltage power system, was used in the tests. Battery parameters are presented in Table 2. Tests were performed in two stages: • Stage #1-the PV generated power variation was emulated by laboratory load model based on power frequency converter. It allows, inter alia, us to freely shape the load / generation curve. Detailed information on the research capabilities of this device was provided in [39,40]. • Stage #2-the experiment using a real PV power plant installed on the roof of the LINTEˆ2 laboratory ( Figure 5) was conducted.
Energies 2020, 13, x FOR PEER REVIEW 8 of 20 • Knowing the nature of the DAM and taking into account significant difference in capital expenditures, method #2 of bidding varying hourly electricity production should be adopted; • To size the battery power and energy capacity, the generation profile with the lowest instantaneous power variation, the maximum amplitude, and the maximum effective operation time should be chosen.
Considering the above, method #2 was chosen for the tests using real photovoltaic power plant and batteries.

Real-Time Tests
The results of the simulation tests described above were obtained assuming a small momentary variability of generation and 100% correctness of the solar irradiation forecast. For full verification of the proposed solution, two real-time experiments were performed with the use of LINTE^2 research laboratory infrastructure. In each of these tests the Li-ion battery was the subject of control. A scaled-down battery, connected to the low voltage power system, was used in the tests. Battery parameters are presented in Table 2.
Tests were performed in two stages: • Stage #1-the PV generated power variation was emulated by laboratory load model based on power frequency converter. It allows, inter alia, us to freely shape the load / generation curve. Detailed information on the research capabilities of this device was provided in [39,40]. • Stage #2-the experiment using a real PV power plant installed on the roof of the LINTE^2 laboratory ( Figure 5) was conducted.  The tests were carried out on the systems shown in Figure 6, and the states of the switches were as follows: • Stage #1: switch S1 was ON, switch S2 was OFF; The tests were carried out on the systems shown in Figure 6, and the states of the switches were as follows: • Stage #1: switch S1 was ON, switch S2 was OFF; • Stage #2: the switch S1 was OFF and the switch S2 was ON.
Energies 2020, 13, x FOR PEER REVIEW 9 of 20 • Stage #2: the switch S1 was OFF and the switch S2 was ON. The places of measurements were circled in Figure 6 and were given symbols, which were used as indices of measured variables, presented in Figures 10a÷d. All values were expressed in relative units (pu, per unit). The active power was referred to the rated power of the PV installation, the values of the battery current were referenced in the C-Rate scale i.e. the current related to the rated battery capacity.

Stage #1 -Test with Emulated PV and Real Battery Energy Storage
One of the important aspects related to PV operation control is generation predictability. To eliminate the problem of stochasticity of PV power generation in the first stage of research, the PV generation was emulated using a laboratory load model based on power frequency converter [39]. This device modeled the variability of power generation according to the curve PPV(t), presented in Figure 7a. This curve was also used to develop the characteristics of the set power variation Pref(t), also shown in Figure 7a along with the characteristics of the power at the point of common coupling PPCC(t).
The control of active power was performed adequately in every hour of the test. The temperature of battery modules did not exceed 30 ℃. Figure 7b depicts the state of charge of the battery energy storage, whereas in figure 7c the battery current was presented. Measured power levels in selected points of the system (see Figure 6) were shown in figure 7d.
The smallest generation of hybrid PV-BESS system was registered in the first hour, reaching 0.16 pu, and the largest generation was in the fifth hour i.e. 0.93 pu. As expected, slightly more than half of the battery energy capacity was used, which results from keeping the SOC in the range of 0.4-0.8 pu. Not using the entire range of available stored energy is caused by oversizing battery parameters in relation to the PV power. The battery selected in this way has a much larger capacity than would result from the energy demand in the control process.
In relation to the rated power of the hybrid power plant, the largest share of battery power was 0.15 pu. Figure 8 shows the variability of battery voltage with characteristic sudden voltage changes occurring at full hours of the experiment. This behavior is related to the change in the power setpoint of the hybrid power generation system (Pref) and thus the transition between charging and discharging modes. The places of measurements were circled in Figure 6 and were given symbols, which were used as indices of measured variables, presented in Figure 10a-d. All values were expressed in relative units (pu, per unit). The active power was referred to the rated power of the PV installation, the values of the battery current were referenced in the C-Rate scale i.e. the current related to the rated battery capacity.

Stage #1 -Test with Emulated PV and Real Battery Energy Storage
One of the important aspects related to PV operation control is generation predictability. To eliminate the problem of stochasticity of PV power generation in the first stage of research, the PV generation was emulated using a laboratory load model based on power frequency converter [39]. This device modeled the variability of power generation according to the curve P PV (t), presented in Figure 7a. This curve was also used to develop the characteristics of the set power variation P ref (t), also shown in Figure 7a along with the characteristics of the power at the point of common coupling P PCC (t).
The control of active power was performed adequately in every hour of the test. The temperature of battery modules did not exceed 30°C. Figure 7b depicts the state of charge of the battery energy storage, whereas in Figure 7c the battery current was presented. Measured power levels in selected points of the system (see Figure 6) were shown in Figure 7d.
The smallest generation of hybrid PV-BESS system was registered in the first hour, reaching 0.16 pu, and the largest generation was in the fifth hour i.e. 0.93 pu. As expected, slightly more than half of the battery energy capacity was used, which results from keeping the SOC in the range of 0.4-0.8 pu. Not using the entire range of available stored energy is caused by oversizing battery parameters in relation to the PV power. The battery selected in this way has a much larger capacity than would result from the energy demand in the control process.  Despite charging and discharging with 0.5C current, the 243 V voltage level, which triggers the maximum battery voltage limitation, was not exceeded.
The results shown in Figures 7-8 confirm the correctness of the assumptions made. After a positive course of the first test, the test with a real solar plant was initiated.

Setting the Setpoint Schedule
Commercial implementation of the proposed way of operation of the discussed hybrid system would require the use of advanced generation forecasting methods. The experiment presented in this paper did not cover issues related to one-minute average PV power output forecasting. The battery operation schedule was prepared on the basis of data from several days preceding the day of Where P ref is the reference power, the average power over an hour that results from the declared amount of electricity to be supplied at the PCC; P PCC is the power supplied at the PCC; P PV is power output of the PV installation; I max, I min are maximal and minimal accepted current levels, P BA-DC is power level at the DC side of the battery energy storage system; P Batt. Is power output at battery terminals; P BA-AC is power level at the AC side of the battery energy storage system.
In relation to the rated power of the hybrid power plant, the largest share of battery power was 0.15 pu. Figure 8 shows the variability of battery voltage with characteristic sudden voltage changes occurring at full hours of the experiment. This behavior is related to the change in the power setpoint of the hybrid power generation system (P ref ) and thus the transition between charging and discharging modes.  Despite charging and discharging with 0.5C current, the 243 V voltage level, which triggers the maximum battery voltage limitation, was not exceeded.
The results shown in Figures 7-8  Commercial implementation of the proposed way of operation of the discussed hybrid system would require the use of advanced generation forecasting methods. The experiment presented in Despite charging and discharging with 0.5C current, the 243 V voltage level, which triggers the maximum battery voltage limitation, was not exceeded.
The results shown in Figures 7 and 8 confirm the correctness of the assumptions made. After a positive course of the first test, the test with a real solar plant was initiated.

Setting the Setpoint Schedule
Commercial implementation of the proposed way of operation of the discussed hybrid system would require the use of advanced generation forecasting methods. The experiment presented in this paper did not cover issues related to one-minute average PV power output forecasting. The battery operation schedule was prepared on the basis of data from several days preceding the day of the experiment and was corrected on-line during the experiment, by the operator, whose decisions relied on the observations of the changing weather conditions and the state of the battery. It means the power setpoint (P ref ) may have been different that the value of power declared for each hour of the day (P decl ) and the PV-BESS hybrid system operator preferred to incur the cost of balancing shortages in delivered power to exposing the battery to a risk of accelerated ageing.
Observing the weather forecasts and the course of solar irradiation from the weather station, a test was planned for 27 July 2018. The course of insolation, registered by the weather station from the 23 to 26 July 2018, was illustrated in Figure 9a, while the corresponding per-unit power output was presented in Figure 9b. In the analyzed period, the insolation level (Figure 9a) was characterized by high variability and the peak value was significant as for Polish conditions. A visible (around 12-1 pm) cyclical decrease in the level of insolation is the effect of shading the weather station by another object on the roof. Using the measurement data ( Figure 9a) a schedule of reference power (P ref ) values was determined for the mentioned three days and presented in Figure 9b, while the schedule for the day of the test was determined as the average of the three preceding days.
Energies 2020, 13, x FOR PEER REVIEW 11 of 20 the experiment and was corrected on-line during the experiment, by the operator, whose decisions relied on the observations of the changing weather conditions and the state of the battery. It means the power setpoint (Pref) may have been different that the value of power declared for each hour of the day (Pdecl) and the PV-BESS hybrid system operator preferred to incur the cost of balancing shortages in delivered power to exposing the battery to a risk of accelerated ageing.
Observing the weather forecasts and the course of solar irradiation from the weather station, a test was planned for 27 July 2018. The course of insolation, registered by the weather station from the 23 to 26 July 2018, was illustrated in Figure 9a, while the corresponding per-unit power output was presented in Figure 9b. In the analyzed period, the insolation level (Figure 9a) was characterized by high variability and the peak value was significant as for Polish conditions. A visible (around 12-1 pm) cyclical decrease in the level of insolation is the effect of shading the weather station by another object on the roof. Using the measurement data ( Figure 9a) a schedule of reference power (Pref) values was determined for the mentioned three days and presented in Figure 9b, while the schedule for the day of the test was determined as the average of the three preceding days.

Real-Time Test Realization and Results
The real-time test started at 7.15 am. Before starting the test the battery was discharged to the initial SOC value amounting to 0.55 pu. The test duration was 11.5 hours until 7 PM, and the curves were presented in Figure 10.
The battery power waveforms (Figure 10a) show what power the adjustment required in periods of cloud cover in the afternoon. The highest discharge power was 0.62 pu and the charge power was 0.46 pu. The above forced the battery current flow (Figure 10c) to reach a maximum of 0.8C -a value that is greater than the 0.5C limit. However, this did not cause the battery to be disconnected. In the case of a lithium-ion battery, the operation with currents higher than 0.5C for a long time will not result in surpassing the permissible operating states. The critical moment from the point of view of the test was the occurrence of heavy cloud cover (about ninth hour of the experiment). A significant reduction in PV generation resulted in an increase in battery power transferred to the system. In order to avoid decreasing the SOC to the values below 0.4 pu, a significant adjustment of Pref was introduced. This enabled fast rebuilding of the energy potential of the storage for further regulation.
In the event of sudden long-term cloudiness, in the case of real participation in active power control, an algorithm should be developed that changes the set point in such a way as to minimize losses resulting from failure to meet the declared power. Such an algorithm will be presented in

Real-Time Test Realization and Results
The real-time test started at 7.15 am. Before starting the test the battery was discharged to the initial SOC value amounting to 0.55 pu. The test duration was 11.5 hours until 7 PM, and the curves were presented in Figure 10.
The battery power waveforms (Figure 10a) show what power the adjustment required in periods of cloud cover in the afternoon. The highest discharge power was 0.62 pu and the charge power was 0.46 pu. The above forced the battery current flow (Figure 10c) to reach a maximum of 0.8C -a value that is greater than the 0.5C limit. However, this did not cause the battery to be disconnected. In the case of a lithium-ion battery, the operation with currents higher than 0.5C for a long time will not result in surpassing the permissible operating states. The critical moment from the point of view of the test was the occurrence of heavy cloud cover (about ninth hour of the experiment). A significant reduction in PV generation resulted in an increase in battery power transferred to the system. In order to avoid decreasing the SOC to the values below 0.4 pu, a significant adjustment of P ref was introduced. This enabled fast rebuilding of the energy potential of the storage for further regulation.

Methodology
The aim of this analysis was to determine the costs of the hybrid PV-BESS system cooperating with a balancing group submitting bids to the day-ahead market. Since the measurements described in previous Sections were recorded for three days only, and the cost analysis is performed on the annual basis, the PV power generation profile was determined with the use of PV GIS databases, i.e., COSMO, SARAH, ERA5 and CMSAF [42] for the LINTE^2 laboratory location. Each database recorded the solar irradiation for a different time of the hour, i.e. 00:00; 00:11; 00:30; 00:56, etc. Linear interpolation was used to increase the resolution of the power generation profile, PPV(t,h,i), where: t is the index of years, h is the index of hours and i is the index of minutes. Rated electric power output of the PV system was PPV(max) = 4000 kW, and the total initial power losses of the system were 14%. Then, the hourly electricity production from PV was obtained. The hourly average power level Pref(t,h) declared in the common scheduling unit submitted by the balancing group to the DAM was calculated with the assumption of the randomly generated forecast error, namely: ( , , ) is forecasted PV power output; is forecast error of ± 10%. It was assumed that the BESS would operate if PPV(t,h,i) ≠ Pref(t,h), and the BESS power output was calculated using the following function-a modification of the one presented in [43]: where Crate denotes charging/discharging rate (C-rate): "a measure of the rate at which a battery is charged/discharged relative to its maximum capacity" [44]. Here Crate = 0.5; PESr was the rated power of the BESS, including power converter losses [kW]; SOCt,h,i was the state of charge of the energy In the event of sudden long-term cloudiness, in the case of real participation in active power control, an algorithm should be developed that changes the set point in such a way as to minimize losses resulting from failure to meet the declared power. Such an algorithm will be presented in subsequent publications of the authors.

Methodology
The aim of this analysis was to determine the costs of the hybrid PV-BESS system cooperating with a balancing group submitting bids to the day-ahead market. Since the measurements described in previous Sections were recorded for three days only, and the cost analysis is performed on the annual basis, the PV power generation profile was determined with the use of PV GIS databases, i.e., COSMO, SARAH, ERA5 and CMSAF [42] for the LINTEˆ2 laboratory location. Each database recorded the solar irradiation for a different time of the hour, i.e. 00:00; 00:11; 00:30; 00:56, etc. Linear interpolation was used to increase the resolution of the power generation profile, P PV(t,h,i) , where: t is the index of years, h is the index of hours and i is the index of minutes. Rated electric power output of the PV system was P PV(max) = 4000 kW, and the total initial power losses of the system were 14%. Then, the hourly electricity production from PV was obtained. The hourly average power level P ref(t,h) declared in the common scheduling unit submitted by the balancing group to the DAM was calculated with the assumption of the randomly generated forecast error, namely: P PV(t,h,i) is forecasted PV power output; δ err is forecast error of ± 10%. It was assumed that the BESS would operate if P PV(t,h,i) P ref (t,h) , and the BESS power output was calculated using the following function-a modification of the one presented in [43]: where C rate denotes charging/discharging rate (C-rate): "a measure of the rate at which a battery is charged/discharged relative to its maximum capacity" [44]. Here C rate = 0.5; P ESr was the rated power of the BESS, including power converter losses [kW]; SOC t,h,i was the state of charge of the energy storage in year t, hour h and minute i, while SOC min and SOC max were minimal and maximal accepted SOC, established at 0.4 and 0.8, respectively. SOC was determined as follows [43]: the initial value of the SOC was: and η ES was BESS one-way efficiency determined as follows [43]: η ES was one-way BESS efficiency when discharging and charging battery, equal to η ESin = 0.85, η ESout = 1.15, respectively. BESS maximal capacity in each sub-period was determined as follows: where: J max(1) = J r and J r was battery rated capacity (kWh), whereas c fade(t) was the capacity (energy) fading rate, t BOL , t EOL were the periods representing the beginning and the end of battery life, respectively, determined as a solution of the following equation: Battery fading rate was a product of two fading rates, i.e.: where: c f_cyc(t) , c f_cal(t) are capacity fade for cycle conditions and capacity fade for idling, respectively, determined using the models of battery ageing presented in [45].
To assess economic viability of the PV-BESS operation on the electricity markets, the annual costs of PV-BESS operation on electricity markets were determined: Capital costs were obtained as a sum of depreciation (K dep,t ) and interest on the loan (K loan,t ): Where: K inv is discounted investment expenditures [$], n 2 is depreciation period [a], n 3 is loan period.
The discount rate (p) was obtained using weighted average cost of capital (WACC): where u equ , u loan , p equ , p loan are the shares of and the interest rates on the equity and the loan, respectively [-]; s tax is income tax rate [-]. Investment expenditures were determined as a discounted sum of all investments made within the lifetime of the hybrid system. It was assumed that t = 0 is the period of the system installation: where N is the technical lifetime of the installation [a]; K inv,t are annual capital expenditures incurred to install BESS-PV system, determined as follows: where k inv(P),t are specific investment cost of battery power P ESr [$/kW], battery capacity (energy) [$/kWh], and PV system [$/kW], respectively; whereas P ESr , J r are BESS rated power output and rated energy capacity, respectively. Operation and maintenance costs were obtained as a discounted average of the costs incurred annually: where k O&M,BESS,t , k O&M,PV,t are specific O&M costs of the BESS and PV. The costs of balancing assumed that the PV-BESS were computed on the basis of the electricity market prices and the shortfall or excess of electricity in relation to the reference (declared) value: where c (EBMp),i,t , E EBMp,i,t are the price ($/kWh) and the amount of electricity (kWh) exchanged with the balancing group, hour i of the year t, E ref,i,t is electricity declared for submission in a common scheduling unit [kWh], E PCC,i,t is electricity delivered to the point of common coupling (kWh). Subsequently, we computed cost of electricity (COE) and levelized cost of electricity (LCOE) of a PV and BESS system. COE was obtained by dividing annual costs K t by annual electricity delivery to PCC E PCC,t , while levelized cost of electricity (LCOE) [$/kWh] was calculated as follows: Energies 2020, 13, 1402 15 of 21

Datasets
Cost analysis was performed for three different cases so as to deal with data uncertainty. Case 1 was the most pessimistic, while case 3 was the most optimistic, in terms of assumptions.
In Table 3, general data concerning PV-BESS system, acting as a member of a balancing group selling electricity to the DAM, were presented. Tables 4 and 5 contain data on PV system and BESS, respectively. Battery lifetime was determined on the basis of lifetime model and data, presented in [28,45].

Results
The yearly profiles (for the first year of the analysis) of PV power output, the power delivered to the point of common coupling and the power exchanged with the electricity balancing market were presented in Figure 11. The results show that there is a need for electricity balancing market participation, despite the BESS being in place. In addition, the declared power was based on weather forecasts and assumed error was only +/-10%. Increase in the forecast error would result in the higher need for electricity exchange with EBM and higher costs, if the battery parameters remained on the same level. As shown in Figure 13, the unit cost of electricity generated by PV-BESS hybrid system exceeds the weighted average market price, which is calculated as the annual sales of electricity to the market divided by the amount of the energy sold. The PV-BESS proves to be not profitable in the current market conditions. Currently, renewable energy sources in Poland can sell electricity on the guaranteed-price basis (feed-in tariff), provided that they win an auction. The renewable electricity tariff is two to three times higher than the annual average wholesale market price and is guaranteed for 15 years following the commissioning of the installation. Failure to win the auction means that the renewable source is not promoted, and has to compete on the electricity market. Because the lifetime of PV system is longer than 15 years, installations will face the challenges of being market participants, after the period of guaranteed-price. As presented in figure 13b, the highest share in specific cost of electricity in PV-BESS system is annualized capital component i.e. depreciation and loan cost. Further development in PV and BESS technologies is expected to cause the reduction of this component and the average market prices of electricity may grow faster than it was assumed in the analysis e.g. due to deep decarbonization of the energy sector and resulting mechanisms combating greenhouse gases, of which EU ETS is the most recognized. In 2015, levelized cost of electricity generated from PV system installations of 4-5 MW installed capacity, built in Germany, Denmark and the United Kingdom ranged from 78 to 166 $/MWh [3]. The global weighed average LCOE for PV in 2018 was 90 $/MWh [25]. LCOE for lithium-ion batteries ranged from 157 to 169 $/MWh [10] and depends on the character of storage operation. Figure 11. The yearly profiles of (a) the power generated by PV system P PV , (b) the power at the point of common coupling P PCC and power exchanged with the electricity balancing market P EBM (all related to PV system rated power). Own illustration based on PV GIS data on solar irradiation for LINTEˆ2 location.
In Figure 12, the battery operation yearly profile was presented along with the characteristics of the state of charge at the beginning of each hour of the analysis first year. One should note that during one hour SOC may vary, increasing the number of both charging and discharging operations the battery should perform. There are instances of trespassing the thresholds of SOC min and SOC max , which result from the one-minute resolution of power generation profile that may enable to discharge the battery below minimal SOC and to charge it above the maximal accepted SOC, since the decision is made on the basis of the SOC at the end of the minute preceding charging or discharging operation. Further increase in the resolution of the calculations and application of predictive control would solve this problem. However, it would also lead to the computation time extension.  As shown in Figure 13, the unit cost of electricity generated by PV-BESS hybrid system exceeds the weighted average market price, which is calculated as the annual sales of electricity to the market divided by the amount of the energy sold. The PV-BESS proves to be not profitable in the current market conditions. Currently, renewable energy sources in Poland can sell electricity on the guaranteed-price basis (feed-in tariff), provided that they win an auction. The renewable electricity tariff is two to three times higher than the annual average wholesale market price and is guaranteed for 15 years following the commissioning of the installation. Failure to win the auction means that the renewable source is not promoted, and has to compete on the electricity market. Because the lifetime of PV system is longer than 15 years, installations will face the challenges of being market participants, after the period of guaranteed-price. As presented in figure 13b, the highest share in   [49]. On this basis, weighted average electricity price was calculated for the first year of the analysis, and given the assumption on the annual growth rate of DAM prices, respectively amounting to 1.5%, 2.0% and 2.5% in cases 1, 2 and 3, the price pathway was drawn and presented in Figure 13b along with the cost of electricity calculations for cases 1 to 3. Levelized cost of electricity for all three cases is presented in Table 6.

Conclusions
The results obtained from the real-time control experiment have shown that energy storage cooperation with PV on a day-ahead market is technically feasible. However, developing a control strategy to follow hourly commitments is a complex problem. The laboratory experiment have proven that the real-life operation with set hourly values of average power requires frequent battery charging and discharging operations and constant control of battery parameters. Operators of the hybrid photovoltaic-battery energy storage system must bear in mind the limitations in the battery power output, capacity, state of charge and temperature to avoid its accelerated ageing. However, this requires their constant involvement in the control process. No less important issue is the development of forecasting mechanisms and behavior in situations of significant weather collapse. Algorithms with an in-built capability of weather forecasting could limit the extent of operator involvement and reduce the cost of market clearance with other members of the balancing group.
The cost of the battery energy storage system (per unit of electricity delivered to the point of common coupling) must be lower than the cost of electricity purchased on the balancing market to guarantee BESS profitability. In a current market situation, using battery is not profitable if a PV system offers electricity to the day-ahead market. The levelized cost of electricity is several times higher than the annual average day-ahead market price. Future changes in market conditions, involving the increase in electricity price, especially in specific times of the day (peak-time) will promote energy storage technologies. However, offering electricity at peak time requires batteries of capacities guaranteeing a storage of energy produced for several hours and would only be possible in a case of further battery-price decrease, since the capital component constitutes the highest share in the cost of electricity generated and offered to the market.
Battery use for voltage control is considered in the future research due to its excellent capabilities in terms of voltage and reactive power control. BESS allows independent control of active power and voltage at the point of common coupling. To make voltage control possible, the DC converter circuit must be supplied with active power, usually amounting to a dozen percent of the inverter rated power [50]. This power either can flow from the grid or can be discharged from the BESS. Currently available converter systems are able to switch with very low power losses between the power consumption from the network and the storage-discharging mode. Bearing in mind the above, research on the method of controlling active and reactive power and voltage levels in hybrid power grids involving, for example, PV, wind farm, biogas plants, energy storage, etc. will be continued by the authors.  The characteristics from Figure 12a suggest that the battery remains idle during most of the time of the year, which may result from reaching SOC max or SOC min , more frequently the lower value, as it can be seen from Figure 12b. The other reason for relatively low activity of the battery is that the forecast error is low i.e. +/− 10% and frequent intervention of the battery is not required. Increase in the battery capacity would extend battery capabilities and the number of charging and discharging operations and lead to the system cost increase, whereas lowering SOC min to 0.2 would shorten battery life. The benefit, i.e. reduced costs of electricity purchased on the balancing market, is not expected to cover the extended costs of battery in current market conditions. Levelized cost of electricity is three to five times higher than the average DAM price.
As shown in Figure 13, the unit cost of electricity generated by PV-BESS hybrid system exceeds the weighted average market price, which is calculated as the annual sales of electricity to the market divided by the amount of the energy sold. The PV-BESS proves to be not profitable in the current market conditions. Currently, renewable energy sources in Poland can sell electricity on the guaranteed-price basis (feed-in tariff), provided that they win an auction. The renewable electricity tariff is two to three times higher than the annual average wholesale market price and is guaranteed for 15 years following the commissioning of the installation. Failure to win the auction means that the renewable source is not promoted, and has to compete on the electricity market. Because the lifetime of PV system is longer than 15 years, installations will face the challenges of being market participants, after the period of guaranteed-price. As presented in Figure 13b, the highest share in specific cost of electricity in PV-BESS system is annualized capital component i.e. depreciation and loan cost. Further development in PV and BESS technologies is expected to cause the reduction of this component and the average market prices of electricity may grow faster than it was assumed in the analysis e.g. due to deep decarbonization of the energy sector and resulting mechanisms combating greenhouse gases, of which EU ETS is the most recognized. In 2015, levelized cost of electricity generated from PV system installations of 4-5 MW installed capacity, built in Germany, Denmark and the United Kingdom ranged from 78 to 166 $/MWh [3]. The global weighed average LCOE for PV in 2018 was 90 $/MWh [25]. LCOE for lithium-ion batteries ranged from 157 to 169 $/MWh [10] and depends on the character of storage operation.

Conclusions
The results obtained from the real-time control experiment have shown that energy storage cooperation with PV on a day-ahead market is technically feasible. However, developing a control strategy to follow hourly commitments is a complex problem. The laboratory experiment have proven that the real-life operation with set hourly values of average power requires frequent battery charging and discharging operations and constant control of battery parameters. Operators of the hybrid photovoltaic-battery energy storage system must bear in mind the limitations in the battery power output, capacity, state of charge and temperature to avoid its accelerated ageing. However, this requires their constant involvement in the control process. No less important issue is the development of forecasting mechanisms and behavior in situations of significant weather collapse. Algorithms with an in-built capability of weather forecasting could limit the extent of operator involvement and reduce the cost of market clearance with other members of the balancing group.
The cost of the battery energy storage system (per unit of electricity delivered to the point of common coupling) must be lower than the cost of electricity purchased on the balancing market to guarantee BESS profitability. In a current market situation, using battery is not profitable if a PV system offers electricity to the day-ahead market. The levelized cost of electricity is several times higher than the annual average day-ahead market price. Future changes in market conditions, involving the increase in electricity price, especially in specific times of the day (peak-time) will promote energy storage technologies. However, offering electricity at peak time requires batteries of capacities guaranteeing a storage of energy produced for several hours and would only be possible in a case of further battery-price decrease, since the capital component constitutes the highest share in the cost of electricity generated and offered to the market.
Battery use for voltage control is considered in the future research due to its excellent capabilities in terms of voltage and reactive power control. BESS allows independent control of active power and voltage at the point of common coupling. To make voltage control possible, the DC converter circuit must be supplied with active power, usually amounting to a dozen percent of the inverter rated power [50]. This power either can flow from the grid or can be discharged from the BESS. Currently available converter systems are able to switch with very low power losses between the power consumption from the network and the storage-discharging mode. Bearing in mind the above, research on the method of controlling active and reactive power and voltage levels in hybrid power grids involving, for example, PV, wind farm, biogas plants, energy storage, etc. will be continued by the authors.
Author Contributions: All of the authors have contributed to this research. R.M. proposed the study idea, did simulations, shared in revising the paper and wrote the first part of manuscript. R.M. and W.P. conceived and designed the experiments. W.P. performed the experiments and analyzed the data. M.J. prepared the data and conducted economics analysis and wrote the second part of manuscript and polished the language of the manuscript. All authors have read and agreed to the published version of the manuscript.
Funding: This research received no external funding. The APC was funded by Gdańsk University of Technology.

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