Optimization of a PV-Wind Hybrid Power Supply Structure with Electrochemical Storage Intended for Supplying a Load with Known Characteristics

An important aspect of the off-grid utilization of hybrid generation systems is the integration of energy storage facilities into their structures, which allows for improved power supply reliability. However, this results in a significant increase in the cost of such systems. Therefore, it is justified to use optimization resulting in the minimization of the selected economic indicator taking into account the most important technical constraints. For this reason, this work proposes an algorithm to optimize the structure of a hybrid off-grid power distribution system (with electrochemical energy storage), designed to supply a load with known daily energy demand. The authors recommend genetic algorithm utilization as well as a modified criterion for evaluating the quality of solutions based on the Levelized Cost of Energy (LCOE) index. Several technical and economic analyses were presented, including unit costs, power distribution of the wind and solar sections, nominal battery capacity, SSSI index (System Self-Sufficiency Index), etc. The model of the system includes durability of the elements which have a significant impact on the periodic battery replacement. The tests were carried out for two types of loads and two types of electrochemical batteries (NMC—Lithium Nickel Manganese Cobalt Oxide; and PbO2—Lead-Acid Battery), taking into account the forecast of an increased lifetime of NMC type batteries and decreasing their price within five years. The proposed synthesis method of photovoltaic-wind (PV-wind) hybrid off-line systems leads to limiting the energy capacity of electrochemical storages. Based on the analyses, the authors proposed recommended methods to improve (reduce) the value of the criterion index (LCOE) for PV-wind off-grid systems while maintaining the assumed level of power supply reliability.


Literature Review
Hybrid power generation systems (HPGS) have become increasingly popular as electrical energy generating systems [1][2][3]. The application of properly controlled energy storage in this type of systems greatly increases the probability of maintaining a continuous supply of different loads [4,5] connected to the system nodes, and dynamic modelling of the required output, simultaneously minimizing the cost of power generation. Table 1 presents the comparison of various technologies used nowadays in distributed generation, including off-grid systems in remote areas. The main disadvantage of renewable energy sources is the strong dependence of electricity production on primary energy availability. Hybrid power generation systems with energy storage make it possible to minimize this drawback. In the optimization of the structure of HPGS using solar and wind energy, with energy storages in a form of electrochemical batteries, a wide range of optimization methods is used, and the proposed solutions are constantly being improved. Paper [6] describes an iterative method of HPGS optimum dimensioning, used to design an independent power supply for a household in Algeria. Some simulations, also based on iterative calculations in Matlab environment of Mathworks company [7], were also performed for households located in three regions of Sicily. The study in Ref. [4] was divided into two stages, using separate iterative algorithms, which was aimed to match the power of renewable sources and to determine the storage system capacity. The method of optimizing the dimensioning of PV-wind HPGS with batteries proposed in Ref. [5] uses an adaptive system of neuro-fuzzy reasoning. The results of the algorithm operation were compared with analogical results of commercial software, i.e., Hybrid Optimization Model for Electric Renewables (HOMER) and Hybrid Optimization by Genetic Algorithms (HOGA). The authors of paper [8] used many variants of the particle swarm optimization algorithm, e.g., an algorithm based on the repulsion factor and an algorithm, taking into account the inertia-adaptive factor of particle mobility. The optimization task in paper [9] was solved with the cuckoo search algorithm, devised for a design of a system in an agricultural farm in Algeria. In Ref. [10] the firefly algorithm was employed, and the results were compared with other algorithms using metaheuristic methods, e.g., accelerated particle swarm optimization (APSO) algorithm or bat algorithm (BA). In Ref. [11] the process of identifying the optimum HPGS structure was carried out based on the clonal selection algorithm. The results were  [4,6] Particle swarm optimisation [10] [8, 26,29] Cuckoo search algorithm [9] Firefly algorithm [10] Bat algorithm [10] Clonal selection algorithm [11] Discrete grey wolf algorithm [15] [15] Adaptive system of neuro-fuzzy reasoning [5] Genetic algorithm [11] NSGA II [12,13] [12] Hybrid algorithms [18,20] [19] [17] [17] Other algorithms [25] [25] Commercial software [5] [ [21][22][23][24] [ [21][22][23][24] Multi-criteria decision-making methods [16] [16]

Problem Description
Taking into consideration the literature review presented above, the authors of this paper proposed an optimization algorithm of an off-grid hybrid power supply system (with electrochemical energy storage), intended to supply a load with known daily load characteristics. The quality of the proposed solutions can be evaluated based on the energy unit cost for the power generated in the system and used to supply the facility. This approach introduced an automatic reduction in the power generation system and storage capacity, with regard to the analyzed economic aspects of the solution. The energy transferred to the heaters (momentary excess energy) is also taken into account, whereby some of the emitted heat can be used by industrial loads for their processes and by communal loads for heating Energies 2020, 13, 6143 5 of 31 purposes. The basic assumed constraint is the maximum load working time over a year period at the supplied power below the assumed load curve (the issues of load supply reliability).
Based on the developed model of a hybrid system and the algorithms of its operation and optimization, the authors presented many results of engineering and economic analyses, including the unit cost of electrical energy generation in the studied power supply system type. In the process of reviewing the literature on electrochemical batteries, research was initially considered using many different types of batteries such as lead-acid, nickel-cadmium, nickel-metal hydride, nickel-zinc, silver-zinc, lithium-iron-phosphate and lithium-nickel-manganese-cobalt-oxide. However, in order to limit the volume of research and due to the predominant popularity of two types of cells in electricity solutions, the studies were conducted for two types of batteries: deep cycle lead-acid batteries and NMC (lithium-nickel-manganese-cobalt-oxide) batteries. The lifespan aspect significantly affects the periodical battery pack replacement. The forecasted increase in the NMC battery lifespan and the expected reduction in the prices of batteries over a five years perspective was taken into account in the storage model. The modelling of electrochemical storages includes elements, which increase the detail rate in reference to the conducted studies. Development of several variants for five values of the maximum annual time in which the power demand exceeds the total energy generated and supplied from the storage is an important aspect of the presented studies. Analyses are also performed for two annual load characteristics-communal and industrial end-users and variants with and without the power generation capacity limitation. The literature review revealed that the previous studies were limited to one value of the reliability index (one constraint variant), that the applied models did not include the lifespan of the electrochemical storages so accurately and the forecasts related to the change in the battery parameters and costs were not taken into consideration.
The paper is structured as follows: Section 2 describes the structure and operation of the hybrid power supply system with electrochemical storage. Section 3 includes a model of the analyzed system. Section 4 describes the power analysis algorithm and the energy storage charging level and presents the measurement data of the wind speed and irradiance used in the calculations. Section 5 covers the optimization algorithm of the analyzed system. Section 6 discusses the results. The paper ends with a summary.

Hybrid Power System with Electrochemical Energy Storage
PV-wind hybrid systems have been successfully used to supply loads with known 24 h load characteristics. The power generation characteristics of the wind and PV part in such systems are complementary, which enables better matching of the generation profile to the load profile against the wind or solar source [1][2][3]. The purpose of full matching of the profiles is to use energy storages, which are nowadays mainly electrochemical type, intended for deep discharge (the discharge depth up to 80%). Until recently, lead-acid batteries were mainly recommended, but the characteristics and declining prices of lithium-ion batteries contribute to their increasing popularity in the analysed group of systems [33][34][35][36][37].
The paper analyses a PV-wind system with the rated power P n = P WT + P PV , where: P WT -the rated power of the wind turbines; P PV -the rated power of the photovoltaic modules, working off-line with the energy storage, intended for supplying small industrial loads (variant A) and communal loads (variant B). Figure 1 shows the profiles of relative load (P/P max , where P-active power of the load at time tP max -maximum load value in the year 2014) of industrial facilities ( Figure 1a Figure 2 shows the above-mentioned data as an annual load map with a 15 min time step.  Figure 3 shows a general structure of the analyzed hybrid system with electrochemical storage. With regard to significant differences in the technical and operating parameters as well as costs of investment, an assumption was made to test the system for two configurations: with a lead-acid battery and with a lithium-ion battery. Electrical energy is generated in the solar (PV) and wind (WT) part of the system. The operation of the Battery Energy Storage System (BESS) is controlled by an adequate Battery Management System (BMS). Correct operation is additionally ensured by the heaters which receive excess energy, and by inverter systems.
An analysis of the system operation shown in Figure 3 is necessary in order to optimize its structure. It includes identification of the load profiles of wind turbines pWT(t) and photovoltaics pPV(t), energy storage pES(t) power (loading-"−"; or releasing-"+"), state of charge of the battery pack SOC(t), power transferred to the load from the generating system pG(t) and energy storage pES(t) as well as the load power pLOAD(t) based on the load characteristics of the analyzed load type. The following designation is used: PWTn for the wind turbines rated power and PPVn for the photovoltaics. Additionally, with regard to the power supply system character (off-grid), it is important to identify the profile of excess power pLESS(t) which is the excess power generated and taken to the storage versus the momentary load pWT(t) + pPV(t) + pES(t) > pLOAD(t). In the periods in which the power delivered to the load is lower than the load power demand pWT(t) + pPV(t) + pES(t) < pLOAD(t), pLESS(t) power is transferred to the heaters and is regarded as a loss in the context of a power generation system. Incorrect supply is the result of insufficient power delivered to the load (pWT(t) + pPV(t) + pES(t) < pLOAD(t)), which is taken into account in the reliability parameter of electrical energy delivery to the load-total time of the guaranteed load supply shortage in a year Tsum (h).  Figure 3 shows a general structure of the analyzed hybrid system with electrochemical storage. With regard to significant differences in the technical and operating parameters as well as costs of investment, an assumption was made to test the system for two configurations: with a lead-acid battery and with a lithium-ion battery. Electrical energy is generated in the solar (PV) and wind (WT) part of the system. The operation of the Battery Energy Storage System (BESS) is controlled by an adequate Battery Management System (BMS). Correct operation is additionally ensured by the heaters which receive excess energy, and by inverter systems.
An analysis of the system operation shown in Figure 3 is necessary in order to optimize its structure. It includes identification of the load profiles of wind turbines pWT(t) and photovoltaics pPV(t), energy storage pES(t) power (loading-"−"; or releasing-"+"), state of charge of the battery pack SOC(t), power transferred to the load from the generating system pG(t) and energy storage pES(t) as well as the load power pLOAD(t) based on the load characteristics of the analyzed load type. The following designation is used: PWTn for the wind turbines rated power and PPVn for the photovoltaics. Additionally, with regard to the power supply system character (off-grid), it is important to identify the profile of excess power pLESS(t) which is the excess power generated and taken to the storage versus the momentary load pWT(t) + pPV(t) + pES(t) > pLOAD(t). In the periods in which the power delivered to the load is lower than the load power demand pWT(t) + pPV(t) + pES(t) < pLOAD(t), pLESS(t) power is transferred to the heaters and is regarded as a loss in the context of a power generation system. Incorrect supply is the result of insufficient power delivered to the load (pWT(t) + pPV(t) + pES(t) < pLOAD(t)), which is taken into account in the reliability parameter of electrical energy delivery to the load-total time of the guaranteed load supply shortage in a year Tsum (h).  Figure 3 shows a general structure of the analyzed hybrid system with electrochemical storage. With regard to significant differences in the technical and operating parameters as well as costs of investment, an assumption was made to test the system for two configurations: with a lead-acid battery and with a lithium-ion battery. Electrical energy is generated in the solar (PV) and wind (WT) part of the system. The operation of the Battery Energy Storage System (BESS) is controlled by an adequate Battery Management System (BMS). Correct operation is additionally ensured by the heaters which receive excess energy, and by inverter systems.
An analysis of the system operation shown in Figure 3 is necessary in order to optimize its structure. It includes identification of the load profiles of wind turbines p WT (t) and photovoltaics p PV (t), energy storage p ES (t) power (loading-"−"; or releasing-"+"), state of charge of the battery pack SOC(t), power transferred to the load from the generating system p G (t) and energy storage p ES (t) as well as the load power p LOAD (t) based on the load characteristics of the analyzed load type. The following designation is used: P WTn for the wind turbines rated power and P PVn for the photovoltaics. Additionally, with regard to the power supply system character (off-grid), it is important to identify the profile of excess power p LESS (t) which is the excess power generated and taken to the storage versus the momentary load p WT (t) + p PV (t) + p ES (t) > p LOAD (t). In the periods in which the power delivered to the load is lower than the load power demand p WT (t) + p PV (t) + p ES (t) < p LOAD (t), p LESS (t) power is transferred to the heaters and is regarded as a loss in the context of a power generation system. Incorrect supply is the result of insufficient power delivered to the load (p WT (t) + p PV (t) + p ES (t) < p LOAD (t)), Figure 3. Illustrative diagram of a PV-wind hybrid power supply system with electrochemical energy storage (PV-photovoltaic modules, WT-wind turbines, BESS-battery energy storage system, P-load, DC/DC, AC/DC-inverter systems working directly with the PV and wind part).

System Model
The determination of the abovementioned profiles requires assuming a mathematical model of a system, its numerical and IT implementation, and the use of input data in a form of wind speed vw and irradiance Gr profiles for a year's period (representation of the geographical conditions in the location of the analyzed object). The Battery Management System (BMS) algorithm also has significant effects on the system operation.
Due to the computational complexity of the optimization task of a hybrid system with energy storage and the optimization algorithm adapted to the task, a simplified power supply system model was assumed in the paper. That enables to reduce the time of identifying the power profile, the electrochemical energy storage state of charge and other parameters characterized in Section 2 of the paper. The following four elements were taken into account in the proposed model: wind turbines, PV modules, electrochemical cells, inverter, BMS.

Model of Wind Turbine
A wind turbine model limited to one functional model representing the interpolation of its power characteristics PWT = f (vw(t)). To that end the characteristics are divided into three sections related to the wind speeds characteristic of the wind turbine: vcut-in-cut-in speed, vn-the rate of reaching the rated power and vcut-out-cut-out speed. For the power increase section in the function of wind speed vw a linear interpolation between two adjacent modes of discrete power characteristics is used. The power generated by the turbine for the wind speed vw can be identified based on the relationship [38]: where: v1, v2-wind speed from the wind turbine power discrete characteristics, where the wind speed (vw  <v1;v2>) falls in between, Pv1 and Pv2-wind turbine power values corresponding to wind

System Model
The determination of the abovementioned profiles requires assuming a mathematical model of a system, its numerical and IT implementation, and the use of input data in a form of wind speed v w and irradiance G r profiles for a year's period (representation of the geographical conditions in the location of the analyzed object). The Battery Management System (BMS) algorithm also has significant effects on the system operation.
Due to the computational complexity of the optimization task of a hybrid system with energy storage and the optimization algorithm adapted to the task, a simplified power supply system model was assumed in the paper. That enables to reduce the time of identifying the power profile, the electrochemical energy storage state of charge and other parameters characterized in Section 2 of the paper. The following four elements were taken into account in the proposed model: wind turbines, PV modules, electrochemical cells, inverter, BMS.

Model of Wind Turbine
A wind turbine model limited to one functional model representing the interpolation of its power characteristics P WT = f (v w (t)). To that end the characteristics are divided into three sections related to the wind speeds characteristic of the wind turbine: v cut-in -cut-in speed, v n -the rate of reaching the rated power and v cut-out -cut-out speed. For the power increase section in the function of wind speed v w a linear interpolation between two adjacent modes of discrete power characteristics is used. The power generated by the turbine for the wind speed v w can be identified based on the relationship [38]: where: v 1 , v 2 -wind speed from the wind turbine power discrete characteristics, where the wind speed (v w ∈ <v 1 ;v 2 >) falls in between, P v1 and P v2 -wind turbine power values corresponding to wind speed v 1 and v 2 read from the wind turbine power discrete characteristics, v wn -wind speed which enables reaching the wind turbine rated power P WTn . Figure 4 presents a graphical interpretation of the parameters used in Relation (1) and determining method for P WT wind turbine power output for v w value.
Energies 2020, 13, x FOR PEER REVIEW 8 of 31 speed v1 and v2 read from the wind turbine power discrete characteristics, vwn-wind speed which enables reaching the wind turbine rated power PWTn. Figure 4 presents a graphical interpretation of the parameters used in Relation (1) and determining method for PWT wind turbine power output for vw value.

Model of PV Module
A double-diode model (DDM) of a PV cell described with the relationship [39]: where: I, U-current and voltage on the PV cell terminals; Iph0-solar current generated at the actual irradiance Gr and at the PV module surface temperature T; Iph0-solar current generated at irradiance Gr0; Gr-actual irradiance on the PV cell surface, Is1; Is2-saturation currents of the first and second diode, N1; N2-coefficients of quality of the first and second diode; Rs-series resistance; Rp-parallel resistance; k-Boltzmann constant; T-PV cell temperature; q-electron elementary charge. Based on paper [40] temperature T of the PV module temperature was determined taking into account ambient temperature Ta (obtained from the public data of the Institute of Meteorology of Water Management) and the measurements of wind speed vw synchronized with the measured values of irradiance Gr according to the relationship: where: -coefficient of the PV system mounting method ( = 1-standalone system, ( = 1.2-on a flat roof,  = 1.8-on a sloped roof).
The PV module is modelled by solving a system of Equations (2) and (3) with Newton's method, adopting the parameters from the available database and taking into consideration the PV module surface temperature-Relationship (4). The calculations are carried out prior to initiating the optimization temperature, and their result includes the group of current and voltage characteristics for the PV module surface temperature in the range between −30 °C to 70 °C (with a 2 °C step), and irradiance between 50 W/m 2 and 1500 W/m 2 (with a step of 50 W/m 2 ). On that basis, Pmax = f(T,Gr)

Model of PV Module
A double-diode model (DDM) of a PV cell described with the relationship [39]: where: I, U-current and voltage on the PV cell terminals; I ph0 -solar current generated at the actual irradiance G r and at the PV module surface temperature T; I ph0 -solar current generated at irradiance G r0 ; G r -actual irradiance on the PV cell surface, I s1 ; I s2 -saturation currents of the first and second diode, N 1 ; N 2 -coefficients of quality of the first and second diode; R s -series resistance; R p -parallel resistance; k-Boltzmann constant; T-PV cell temperature; q-electron elementary charge. Based on paper [40] temperature T of the PV module temperature was determined taking into account ambient temperature T a (obtained from the public data of the Institute of Meteorology of Water Management) and the measurements of wind speed v w synchronized with the measured values of irradiance G r according to the relationship: where: ω-coefficient of the PV system mounting method (ω = 1-standalone system, (ω = 1.2-on a flat roof, ω = 1.8-on a sloped roof). The PV module is modelled by solving a system of Equations (2) and (3) with Newton's method, adopting the parameters from the available database and taking into consideration the PV module surface temperature-Relationship (4). The calculations are carried out prior to initiating the Energies 2020, 13, 6143 9 of 31 optimization temperature, and their result includes the group of current and voltage characteristics for the PV module surface temperature in the range between −30 • C to 70 • C (with a 2 • C step), and irradiance between 50 W/m 2 and 1500 W/m 2 (with a step of 50 W/m 2 ). On that basis, P max = f (T, G r ) surface is calculated, which helps to identify-by means of approximation-the Maximum Power Point (MPP) for specific environmental conditions and also constitutes an MPP tracker system model.

Model of an Electrochemical Cell
A peripheral model of electrochemical cells used in the paper, which reflects the chemical phenomena occurring in the cell, is shown in Figure 5.
Energies 2020, 13, x FOR PEER REVIEW 9 of 31 surface is calculated, which helps to identify-by means of approximation-the Maximum Power Point (MPP) for specific environmental conditions and also constitutes an MPP tracker system model.

Model of an Electrochemical Cell
A peripheral model of electrochemical cells used in the paper, which reflects the chemical phenomena occurring in the cell, is shown in Figure 5. The model can be described by the system of differential Equation (5), which are based on the basic rules of the electric circuit theory; the equations were solved with Runge-Kutta 4th order method: The equivalent circuit components shown in Figure 5 are non-linear and depend on the consumed current intensity, state of charge and temperature. The battery capacity C(I,T) and the components of the equivalent circuit (Em, R0, R1, R2, C1) for lead-acid cells were described with the following relationships [33]: where: R00, R10, R20, A0, A21, A22, KE-constants which depend on the construction and state of the battery, determined on the basis of the estimation; τ1-time constant of the RC branch; Im-the current of the battery's main branch; Em0-open-circuit battery voltage at 0°C, and the battery state of charge (SOC) and depth of charge (DOC) during discharging or charging are described by Equations (11) and (12) [33]: The model can be described by the system of differential Equation (5), which are based on the basic rules of the electric circuit theory; the equations were solved with Runge-Kutta 4th order method: The equivalent circuit components shown in Figure 5 are non-linear and depend on the consumed current intensity, state of charge and temperature. The battery capacity C(I,T) and the components of the equivalent circuit (E m , R 0 , R 1 , R 2 , C 1 ) for lead-acid cells were described with the following relationships [33]: where: R 00 , R 10 , R 20 , A 0 , A 21 , A 22 , K E -constants which depend on the construction and state of the battery, determined on the basis of the estimation; τ 1 -time constant of the RC branch; I m -the current of the battery's main branch; E m0 -open-circuit battery voltage at 0 • C, and the battery state of charge (SOC) and depth of charge (DOC) during discharging or charging are described by Equations (11) and (12) [33]: Energies 2020, 13, 6143 10 of 31 where: i m -current flowing through the main branch; C(0,T)-no-load battery capacity at temperature T; C(I avg ,T)-battery capacity referred to the average discharge or charge current I avg at set temperature T.
The same equivalent diagram was used for the lithium-ion cell; the values of the elements are usually presented in tables, similarly to the characteristics below (developed and described by the authors in paper) [41]- Figure 6.

DOC=1-
where: im-current flowing through the main branch; C(0,T)-no-load battery capacity at temperature T; C(Iavg,T)-battery capacity referred to the average discharge or charge current Iavg at set temperature T.
The same equivalent diagram was used for the lithium-ion cell; the values of the elements are usually presented in tables, similarly to the characteristics below (developed and described by the authors in paper) [41]- Figure 6. The conditions of electrochemical storage operation, i.e., temperature, discharge depth, and the charge and discharge current (power) values greatly affect the actual lifespan of the storage [42]. That is why the following aspect was taken into consideration in the applied model. It was assumed that the storage would be placed in a room with controlled and constant temperature, and the mean charge and discharge current (power) is the factor which affects the storage lifespan most. Such a simplified approach is however necessary due to the analysis period. Taking the above into account, the lead-acid battery lifespan was determined based on the empirical relationship which identifies the equivalent number of cycles (EFC), after which the battery should be changed where: 750-number of battery cycles under the rated charge and discharge conditions, P-mean load power; AESn-rated power capacity of the battery. The conditions of electrochemical storage operation, i.e., temperature, discharge depth, and the charge and discharge current (power) values greatly affect the actual lifespan of the storage [42]. That is why the following aspect was taken into consideration in the applied model. It was assumed that the storage would be placed in a room with controlled and constant temperature, and the mean charge and discharge current (power) is the factor which affects the storage lifespan most. Such a simplified approach is however necessary due to the analysis period. Taking the above into account, the lead-acid battery lifespan was determined based on the empirical relationship which identifies the equivalent number of cycles (EFC), after which the battery should be changed where: 750-number of battery cycles under the rated charge and discharge conditions, P-mean load power; A ESn -rated power capacity of the battery. The battery lifespan in lithium-ion batteries was determined based on the empirical relationship: where: 3000-number of battery cycles under the rated charge and discharge conditions. The number of battery operation cycles was determined on the basis of the analysis of the charge throughput [43]. This is a popular method used when analyzing the wear process of electrochemical energy storage facilities. It is often used also during the analysis of operation of hybrid energy systems cooperating with energy storages, with the difference that usually a long averaging time results in ignoring short-term current (or power) peaks. Meanwhile, the use of a 37 s averaging period in this work contributes to increase the accuracy of the analysis, which distinguishes the work in comparison with other studies of similar nature.

Model of Inverter
In the issues analyzed in the article, a simplified model of the inverter was used, taking into account only the change of its capacity change η INV in the function of relative output power η INV = f (P INV /P nINV ), where P INV -momentary power of the inverter; P nINV -rated power of the inverter [44]. An exponential function was used for this purpose: with values of coefficients a and b determined in MATLAB environment using non-linear regression function. Figure 7 shows a changes in inverter efficiency (η INV = f (P INV /P nINV )) used in the analyses in the article for parameters: a = 98.3 and b = 0.03 corresponding to the average characteristics of many different types of inverters.
Energies 2020, 13, x FOR PEER REVIEW 11 of 31 The battery lifespan in lithium-ion batteries was determined based on the empirical relationship: where: 3000-number of battery cycles under the rated charge and discharge conditions. The number of battery operation cycles was determined on the basis of the analysis of the charge throughput [43]. This is a popular method used when analyzing the wear process of electrochemical energy storage facilities. It is often used also during the analysis of operation of hybrid energy systems cooperating with energy storages, with the difference that usually a long averaging time results in ignoring short-term current (or power) peaks. Meanwhile, the use of a 37 s averaging period in this work contributes to increase the accuracy of the analysis, which distinguishes the work in comparison with other studies of similar nature.

Model of Inverter
In the issues analyzed in the article, a simplified model of the inverter was used, taking into account only the change of its capacity change INV in the function of relative output power INV = f (PINV/PnINV), where PINV-momentary power of the inverter; PnINV-rated power of the inverter [44]. An exponential function was used for this purpose: with values of coefficients a and b determined in MATLAB environment using non-linear regression function. Figure 7 shows a changes in inverter efficiency (INV = f (PINV/PnINV)) used in the analyses in the article for parameters: a = 98.3 and b = 0.03 corresponding to the average characteristics of many different types of inverters.

Model of BMS
Battery Management System (BMS) algorithm-depending on the battery type (lead-acid or lithium-ion)-an algorithm was used which maintains the battery state of charge (SOC) in the ranges between the minimum value (SOC min ) and the maximum value (SOC max ), respectively: SOC Pb ∈ <0.4;1>, SOC Li ∈ <0.2;0.9>. The working scopes of the cells result from effective use of the available storage capacity and its long lifespan. Many studies were conducted in the reference period [45,46], which confirmed the discharge depth influence on the electrochemical cell degradation. The Battery Management System algorithm additionally assumes that the current value of 0.5 C will not be exceeded for a long time in lead-acid batteries, while for a lithium-ion battery this value will amount to 2 C. Moreover, during modelling it was assumed that all the cells are identical and the system does not require balancing the voltage on the cells (the voltage on the cells is equal). It was also assumed that for the given current limitations, the temperature of the cells will not exceed the limit conditions (there is no need to limit the power of the cells for thermal reasons).

Measurement Data
The wind speed v w and irradiance Gr measurement data used in the calculations have a form of discrete data sets, where every sample is an averaged value from the period ∆t = 37 s. The N number of samples for one-year amounts to over 852,000. An important advantage of the measurements is that the averaging period used in the paper is short as compared to the periods used normally in renewable power engineering, ranging from a few to 10 min. Figure 8a,b show the profiles of wind speed and irradiance changes for the analyzed geographical location (south-eastern Poland) and the year 2014. The data were made available by the courtesy of prof. Krzysztof Markowicz from the Institute of Geophysics, University of Warsaw.

Model of BMS
Battery Management System (BMS) algorithm-depending on the battery type (lead-acid or lithium-ion)-an algorithm was used which maintains the battery state of charge (SOC) in the ranges between the minimum value (SOCmin) and the maximum value (SOCmax), respectively: SOCPb  <0.4;1>, SOCLi  <0.2;0.9>. The working scopes of the cells result from effective use of the available storage capacity and its long lifespan. Many studies were conducted in the reference period [45,46], which confirmed the discharge depth influence on the electrochemical cell degradation. The Battery Management System algorithm additionally assumes that the current value of 0.5 C will not be exceeded for a long time in lead-acid batteries, while for a lithium-ion battery this value will amount to 2 C. Moreover, during modelling it was assumed that all the cells are identical and the system does not require balancing the voltage on the cells (the voltage on the cells is equal). It was also assumed that for the given current limitations, the temperature of the cells will not exceed the limit conditions (there is no need to limit the power of the cells for thermal reasons).

Measurement Data
The wind speed vw and irradiance Gr measurement data used in the calculations have a form of discrete data sets, where every sample is an averaged value from the period t = 37 s. The N number of samples for one-year amounts to over 852,000. An important advantage of the measurements is that the averaging period used in the paper is short as compared to the periods used normally in renewable power engineering, ranging from a few to 10 min. Figure 8a,b show the profiles of wind speed and irradiance changes for the analyzed geographical location (south-eastern Poland) and the year 2014. The data were made available by the courtesy of prof. Krzysztof Markowicz from the Institute of Geophysics, University of Warsaw.

Computation Algorithm
According to the description above, the i-th sample stands for the wind speed and irradiance at t = i•t for i = 0, 1, 2, … N−1. The calculations of power in the system shown in Figure 3, state of charge of the storage and the energy in the storage are made in sequence for subsequent samples of wind speed v w (i) and irradiance G r (i) as well as P LOAD . The power generated in the system for the i-th sample P G (i) is the sum of the wind turbine part P WT (i) and photovoltaic part P PV (i) generation for the i-th sample:

Computation Algorithm
According to the description above, the i-th sample stands for the wind speed and irradiance at t = i ∆t for i = 0, 1, 2, . . . N−1. The calculations of power in the system shown in Figure 3 The power generated in the system for the i-th sample P (i) G is the sum of the wind turbine part P (i) WT and photovoltaic part P (i) PV generation for the i-th sample: whereby for N WT wind turbines and N PV photovoltaic modules installed in the hybrid system: where: j and k-indices of the wind turbine and PV module number, respectively-while power P can have a negative, a positive or zero value.
The storage charging and discharging process is analyzed, which is always stopped when the battery reaches the state of charge of SOC max and SOC min respectively. The excess power which cannot be delivered to the storage is fed to the heaters and treated as power losses P LOSSES . P LOSS power can be used to generate process heat-an industrial load, heating for buildings-communal load, or transferred to thermoelectric energy storage.
For ∆P (i) > 0 (excess power) two states of the system are analyzed: (a) SOC (i) < SOC max , then: where: P ESmax -maximum power of energy storage; P (b) SOC (i) ≥ SOC max , then: A (i) where: P ESLOSS -the power of energy storage idle losses (kW/h), corresponding to self-discharge. For ∆P (i) < 0 (power shortage) two states of the system are analyzed: (c) SOC (i) > SOC min and then: (d) SOC (i) ≤ SOC min and then:

Goal, Objective, and Constraints of the Optimisation
The optimizing purpose of the analyzed off-grid PV-wind power supply system with electrochemical energy storage, intended for supplying loads with known 24 h load characteristics (Figures 1 and 2) is to determine its structure (the power of the wind turbine part P WTn and photovoltaic part P PVn , types of turbines and PV modules, energy capacity A ME of battery packs and the maximum charge and discharge power P Esmax of the storage) which will guarantee a reduction in the generated electrical energy unit cost to the minimum [39,[47][48][49], simultaneously maintaining the assumed reliability level of the load supply. The power supply reliability level is meant as the maximum time T sumLIMIT , in a one-year period, of delivering power to the load below the load value P G + P ES < P LOAD .
A criteria function in a form of the unit cost of energy generation in a power generation plant, identified with a linearized cost method (LCOE), was used to evaluate the solution quality in the optimization process. LCOE is a widely used indicator used to compare unit costs of electricity generation by renewable sources. LCOE is applicable in many currently popular power sources such as: PV [50,51], wind farms [52,53], hybrid and other renewable energy technologies [34,49,50]. In the LCOE method the following investment and operating costs over time are taken into consideration according to the relationship [52]: where: LCOE-averaged unit cost of energy generation in a life cycle (€/kWh); y-index of the year; I (y) -investment expenditure in year y (€); M (y) -operating and financial expenditure in year y (€); A (y) -energy generation in year y (kWh); r-discount rate (%).
In the case of the system analyzed in the paper, taking into consideration the energy fed to the heaters, and dividing Relationship (32) into the parts related to the investment and operating costs [36,46], the objective function for the analyzed optimization task takes the final form: where: NI-number of investment implementation years (in the analyzed case the investment is completed in year "zero"); NM-number of the years of the system operation (system lifespan); I PV , I TW -unit investment expenditure for the PV and wind part, respectively; I ES -unit investment expenditure for the energy storage, M PV(y) ; M WT(y) -unit operating costs for the PV and wind part, respectively, in the year y (€/kW); M WT(y) -unit operating cost of the energy storage in the year y (€/kWh); A G(y) -quantity of energy generated in the hybrid system in the year y; A H(y) -the quantity of energy converted into heat in the year y; A HU(y) -the quantity of energy used in the year y in heat-related processes. The investment and operating costs of the system are determined based on units costs of the PV and wind part and the energy storages [39], and their value is directly affected by the hybrid system parameters.
With regard to the system operation in the off-grid mode, only the energy generated in the system and used for supplying the load (including supply through the electrochemical storage) is used to determine the value of the LCOE index. Hence the energy generated in A G system is in Formula (32) reduced by the energy fed to heating components A H . Furthermore, the energy which was converted to heat and used for heating or in processes was taken into consideration in the objective function (33).
According to the above, a solution to a non-linear minimization task with the following general form is to be found: with a set of inequality constraints expressed as: where: x-vector of decisive variables with the following components; x 1 -type of wind turbine (T WT ); x 2 -number of wind turbines (N WT ); x 3 -type of PV modules (T PV ); x 4 -number of PV modules (N PV ); x 5 -energy storage capacity A ESn ; x 6 -storage maximum charge and discharge power P ESmax ; g-vector of inequality constraints of a structural and functional character. The first four decisive variables affect the installed power of the system, generation curve and the quantity of electrical energy generated in a year. The fifth one affects the system ability to compensate for shortages of energy from the wind and PV part with the energy from the storage, while the sixth one determines the battery pack charging and discharging rate.
A normalized set of the assumed inequality constraints g(x) ≤ 0 includes, depending on the implemented algorithm version: (a) time of delivering the power below the required power to the load: where: T sum -total (annual) time of delivering power below the required power to the load; T sumLIMIT -acceptable (limit) annual time of delivering the power below the required power to the load, (b) acceptable storage working power related to maintaining its high lifespan: where: P ESSmax -maximum charge and discharge power of the energy storage during the storage operation; P ESSLIMIT -acceptable (limit) charge and discharge power for a specific type of electrochemical storage, (c) rated power of the system related to the generation of high amounts of energy fed to the heaters: where: P WTn -rated power of the wind part, P PVn -rated power of the PV part; P LIMIT -acceptable (limit) rated power of a PV-wind type power generation system. Furthermore, a modified version of SSSI (system self-sufficiency index) [54] described with the following relationship was used to compare different variants of the system: where: T-analysis period (which is T = 8760 h for the analyzed system).
In the applied version, the SSSI can take the value equal to 1 when balancing the generated and required energy, lower than 1 when the quantity of energy generated in the hybrid system is lower than the quantity of the required energy, and greater than 1 when the quantity of energy generated in the hybrid system is greater than the quantity of the required energy demand (excess energy is fed to the heaters).

Characteristics of the Optimisation Method Used
A modified genetic algorithm method implemented in the Matlab environment was used for the optimization task described with Relationships (33)- (38). The decisive variables included in the vector are of integer nature, and that is why the double vector method of encoding the variables is used. Moreover, the identification of such variables in the Matlab environment leads to an automatic application of the Laplace crossover method. A tournament selection was used, and reproduction was enriched with elitism, whereby the best individual from the current generation is moved to the next generation. The objective function scaling depending on the individual's rank was additionally used in the algorithm, where the value of the adaptation function is inversely proportional to the individual's rank square root. Non-linear constraints described by Relationships (35)- (38) were taken into consideration using the Augmented Lagrangian Genetic Algorithm [55][56][57].
Basic parameters of the algorithm, i.e., population size and the number of iterations (number of generations) were determined experimentally, based on the observation of the best individual's adaptation function correlation in the function of the iteration number (generation). Furthermore, on-line effectiveness χ (mean value of the adaptation of the best individuals from all previous generations, including the current one, in the function of the iteration number) for the test tasks with a structure complying with the type of the hybrid systems was analyzed in the paper. Figure 9a shows a change in the best individual's adaptation function value, while Figure 9b shows a diagram of on-line effectiveness in the function of the iteration number (generation) for the test tasks.
Determination of the adaptation function value related to the objective Function (33) requires analyzing a hybrid system's operation in a year's period and identification-based on the power profiles-of the storage state of charge and load characteristics, the quantity of energy generated in the system and used to supply the analyzed type of load. The presented analyses are conducted using the algorithm described in Section 4-Relationships from (16) to (31). The time necessary to determine the profiles for one system configuration and one-year period, for the applied measurement data, in several seconds. Taking into consideration the additional components of the genetic algorithm, it generates about 8 h of the optimization time of a hybrid system single structure, when the following computer configuration is used; Core i7-950 processor and 16 GB RAM. The studies are time-consuming, and the determination of the configuration and genetic algorithm parameters used in the studies required conducting of the aforementioned tests. adaptation function correlation in the function of the iteration number (generation). Furthermore, online effectiveness  (mean value of the adaptation of the best individuals from all previous generations, including the current one, in the function of the iteration number) for the test tasks with a structure complying with the type of the hybrid systems was analyzed in the paper. Figure 9a shows a change in the best individual's adaptation function value, while Figure 9b shows a diagram of online effectiveness in the function of the iteration number (generation) for the test tasks. Determination of the adaptation function value related to the objective Function (33) requires analyzing a hybrid system's operation in a year's period and identification-based on the power profiles-of the storage state of charge and load characteristics, the quantity of energy generated in the system and used to supply the analyzed type of load. The presented analyses are conducted using the algorithm described in Section 4-Relationships from (16) to (31). The time necessary to determine the profiles for one system configuration and one-year period, for the applied measurement data, in several seconds. Taking into consideration the additional components of the genetic algorithm, it generates about 8 h of the optimization time of a hybrid system single structure, when the following computer configuration is used; Core i7-950 processor and 16 GB RAM. The studies are timeconsuming, and the determination of the configuration and genetic algorithm parameters used in the studies required conducting of the aforementioned tests.

Results of the Optimization Calculation
Optimization of the hybrid power supply structure described in Section 2 ( Figure 3) was performed using software implemented in Matlab and Microsoft Visual Studio, with a view to minimizing the unit cost of energy generated in the system and used to supply the assumed load type. Solutions were determined for the applied database of wind turbines and PV modules; the solutions minimize the objective Function (33) and fulfil the assumed constraints-Relationships (35)-(38)-based on the genetic algorithm described in Section 5. The quantity of energy generated in the system was calculated using the system model shown in Section 3 and its operation algorithm given in Section 4. Figure 10 shows diagrams of the developed IT system and the applied optimization using the genetic algorithm method.

Results of the Optimization Calculation
Optimization of the hybrid power supply structure described in Section 2 ( Figure 3) was performed using software implemented in Matlab and Microsoft Visual Studio, with a view to minimizing the unit cost of energy generated in the system and used to supply the assumed load type. Solutions were determined for the applied database of wind turbines and PV modules; the solutions minimize the objective Function (33) and fulfil the assumed constraints-Relationships (35)-(38)-based on the genetic algorithm described in Section 5. The quantity of energy generated in the system was calculated using the system model shown in Section 3 and its operation algorithm given in Section 4. Figure 10 shows diagrams of the developed IT system and the applied optimization using the genetic algorithm method.
The optimizing calculations were performed for: • a load with a 50 kW rated power, • two load profiles: a small industrial load and a communal load (Figures 1 and 2), • two types of electrochemical batteries: lead-acid (deep cycle) and lithium-ion (NMC type), • a variant with no power limit in the power generation system and with its power limitation to 200 kW, • expected increase in the NMC type battery lifespan from 3000 to 5000 cycles and 20% reduction in their price over a five-year perspective, taking into consideration five limit values of the maximum working time of the load a year with the supplied power below the assumed load curve: Additionally, for the NMC lithium-ion battery type a unit cost was calculated of generating the energy used for supplying the analyzed load types, when 10%, 20%, 30%, 40% and 50% of the energy emitted on the heaters is used for heating (communal load) or in technological processes (industrial profile).
The following investment and operation unit costs were assumed for the studied battery types: I ESPb = I ESLi-Ion = 533.3 €/kWh and M ES = 22.2 €/kWh. The investment cost in this case also includes control and supervision systems. Additional studies were also performed for the investment cost level of lithium-ion batteries in a five years' perspective for 80% value of the current prices, i.e., I ESLi-Ion = 426.7 €/kWh, with increasing their lifespan from 3000 to 5000 cycles. The operation costs for electrochemical energy storages were assumed as M ES = 22.2 €/kW. The mean adopted unit costs of investment and annual operation costs for the PV modules and wind turbines, which also included extra systems for each part, amounted to: The optimizing calculations were performed for:  a load with a 50 kW rated power,  two load profiles: a small industrial load and a communal load (Figures 1 and 2),  two types of electrochemical batteries: lead-acid (deep cycle) and lithium-ion (NMC type), The technical parameters used in battery calculations, including the lifespan models, are given in Section 3 of the paper.
Tables 3-10 list the results of the optimization calculations for the analyzed hybrid system structure, according to the variants presented above. Tables 3 and 4 show the results of the optimization of the structure of the solar-wind hybrid power supply system for lead-acid and lithium-ion storage systems respectively for the communal and industrial type load with a peak capacity of 50 kW without the limitation of the power rating of the P n generation system. Tables 5 and 6 lists the results of a PV-wind type power supply hybrid structure optimization for lead-acid and lithium-ion batteries, determined both for a communal and individual load with a 50 kW peak power, with the rated power of the power generation system P n limited to 200 kW. Tables 7 and 8 show the comparison of the PV-wind hybrid power supply system for a lithium-ion battery with the current and future (five year perspective) parameters and prices for a communal and industrial load with a 50 kW peak power and with no limit in the power generation system rated power P n , respectively. Tables 9 and 10 contain the specifications of the studies on the change in the unit costs of energy generation in optimized hybrid systems, for an industrial and communal profile, respectively, in the function of the percentage of energy consumption fed to the heaters for processes or facility heating. Below the tables, the changes in the most important parameters are listed (LCOE, the energy capacity of energy storage A ES and rated power of the system) in the function of time P sumLIMIT% . Table 3. Results of PV-wind hybrid power supply system structure optimization (lead-acid and lithium-ion battery) for a 50 kW peak power of a communal load with no limit for the power generation system    Table 4. Results of PV-wind hybrid power supply system structure optimization (lead-acid and lithium-ion battery) for a 50 kW peak power of an industrial communal load with no limit for the power generation system rated power P n (for:   Table 5. Results of PV-wind hybrid power supply system structure optimization (lead-acid and lithium-ion battery) for a 50 kW peak power of a communal load with the power generation system rated power P   Table 6. Results of PV-wind hybrid power supply system structure optimization (lead-acid and lithium-ion battery) for a 50 kW peak power of an industrial load with the power generation system rated power P n   Table 7. Comparison of the results of PV-wind hybrid power supply system structure optimization for lead-acid storage with the current and future (*-five years perspective) prices and parameters for a 50 kW peak power communal load with no limit for the power generation system rated power   Table 8. Comparison of the results of PV-wind hybrid power supply system structure optimization for lead-acid storage with the current and future (*-five years perspective) prices and parameters for a 50 kW peak power industrial load with no limit for the power generation system rated power   Table 9. Comparison of optimization results (LCOE) of a structure of a PV-wind hybrid power supply system for a 50 kW peak power communal load and Pb and Li-ion batteries (current parameters and prices), for the cases of using 10, 20, 30, 40 and 50% of the energy emitted on the heaters during heating of facilities.  Table 10. Comparison of optimization results (LCOE) of a structure of a PV-wind hybrid power supply system for a 50 kW peak power of industrial load and Pb and Li-Ion batteries (current parameters and prices) for the cases of using 10%, 20%, 30%, 40% and 50% of the energy emitted on the heaters during heating of facilities.  Figure 11 shows the changes in the most important parameters of the optimized PV-wind hybrid systems in the function of time T sumLIMIT% for two types of the analyzed batteries-Pb (deep cycle) and Li-Ion (NMC) and two load cycles. The presented optimization results apply to the 50-kW load peak power with no limit for the power generation system peak power P n .

Parameter and Unit
Energies 2020, 13, x FOR PEER REVIEW 20 of 31 Li-Ion (NMC) and two load cycles. The presented optimization results apply to the 50-kW load peak power with no limit for the power generation system peak power Pn.
(e) (f) Figure 11. Changes in selected parameters of optimized systems with no limit for power Pn in the function of time TsumLIMIT%: the unit cost of generating energy (LCOE) consumed for supplying a communal load (a) and industrial load (b); energy capacity of a battery pack for a communal load (c) and industrial load (d); rated power of the power generation system Pn for a communal load (e) and industrial load (f).
The LCOE for an optimized system decreases exponentially in the function of time TsumLIMIT, whereby it applies both to a system using lead-acid and lithium-ion batteries, and both types of loads (Figure 11a,b). The relationship of storage AES capacity changes in the optimized hybrid systems is of a similar nature (Figure 11c,d). For the presented LCOE diagrams and AES capacity, the values of determination factor R 2 range between 0.92 and 0.99 and confirm the exponential nature of the changes.
The LCOE and energy storage capacities are lower for the industrial load profile than for the communal profile. It results from the shift in the industrial profile peak demand to the hours around the noon, which helps to better use the power generated in the PV part (direct load supply). Figure 11. Changes in selected parameters of optimized systems with no limit for power P n in the function of time T sumLIMIT% : the unit cost of generating energy (LCOE) consumed for supplying a communal load (a) and industrial load (b); energy capacity of a battery pack for a communal load (c) and industrial load (d); rated power of the power generation system P n for a communal load (e) and industrial load (f).
The LCOE for an optimized system decreases exponentially in the function of time T sumLIMIT , whereby it applies both to a system using lead-acid and lithium-ion batteries, and both types of loads (Figure 11a,b). The relationship of storage AES capacity changes in the optimized hybrid systems is of a similar nature (Figure 11c,d). For the presented LCOE diagrams and AES capacity, the values of determination factor R 2 range between 0.92 and 0.99 and confirm the exponential nature of the changes. The LCOE and energy storage capacities are lower for the industrial load profile than for the communal profile. It results from the shift in the industrial profile peak demand to the hours around the noon, which helps to better use the power generated in the PV part (direct load supply).
The capacities of lead-acid batteries determined during the optimization have lower values than the capacities of lithium-ion batteries obtained for the identical levels of power supply reliability (time limit T sumLIMIT ). Despite of this, the LCOE for lead-acid batteries is higher, which can be attributed to worse operating parameters, in particular to the acceptable discharge depth, and the maximum charge and discharge power as compared to lithium-ion batteries.
The rated power P n (total installed power of the PV and wind part) of the optimized hybrid systems for lead-acid batteries is higher than for lithium-ion batteries- Figure 11e,f. It results from the fact that lithium-ion cells are more capable of covering the difference between the required and generated power (their current limits are lower). Figure 12 shows the changes in the most important parameters of the optimized PV-wind hybrid systems in the function of time T sumLIMIT% for two types of the analysed batteries-Pb (deep cycle) and Li-ion (NMC) and two load cycles. The presented optimization results apply to the 50-kW load peak power with the power generation system peak power P n limited to 200 kW. In this case, the changes in the rated power P n of the power generation system in the function of time T sumLIMIT% are not shown in the diagrams.  Figure 12 shows the changes in the most important parameters of the optimized PV-wind hybrid systems in the function of time TsumLIMIT% for two types of the analysed batteries-Pb (deep cycle) and Li-ion (NMC) and two load cycles. The presented optimization results apply to the 50-kW load peak power with the power generation system peak power Pn limited to 200 kW. In this case, the changes in the rated power Pn of the power generation system in the function of time TsumLIMIT% are not shown in the diagrams. The results of a hybrid system optimization with taking into consideration the functional constraints of rated power Pn of 200 kW (quadruple peak power of the load) reveal significant deterioration (increase) in the LCOE indicator and the capacity of the applied electrochemical batteries as compared to the optimization variant with no system power limit (Tables 3 and 4). The increase is particularly high for lead-acid batteries and on average amounts to 180% (industrial profile) and 120% (communal profile) for the LCOE, while for lithium-ion batteries it is 80% and 40%, respectively. A similar situation is observed for battery capacity AES. Its increase for lead-acid batteries is 850% (industrial profile) and 510% for the communal load, while for lithium-ion batteries The results of a hybrid system optimization with taking into consideration the functional constraints of rated power P n of 200 kW (quadruple peak power of the load) reveal significant deterioration (increase) in the LCOE indicator and the capacity of the applied electrochemical batteries as compared to the optimization variant with no system power limit (Tables 3 and 4). The increase is particularly high for Energies 2020, 13, 6143 24 of 31 lead-acid batteries and on average amounts to 180% (industrial profile) and 120% (communal profile) for the LCOE, while for lithium-ion batteries it is 80% and 40%, respectively. A similar situation is observed for battery capacity A ES . Its increase for lead-acid batteries is 850% (industrial profile) and 510% for the communal load, while for lithium-ion batteries it is 420% and 160%, respectively. From the economic point of view, it means that the optimization of off-line PV-wind hybrid structures should be executed with no limit for the system rated power P n . Its inclusion in the optimization makes sense only if the space intended for the PV and wind system is limited. A reduction in generation power, as compared to the systems with no limits, results in longer periods in which the power does not satisfy the demand. Consequently, the algorithm selects higher capacities of the energy storages which help to maintain the assumed power supply reliability parameters. The changes in the LCOE and in the electrochemical storage capacity in the function of time T sumLIMIT are of an exponential nature, similar to the variant with no limits, which is confirmed by the values of determination factors R 2 in the <0.98; 0.99> range ( Figure 12). Figure 13 shows the changes in the most important parameters of the optimized PV-wind hybrid systems in the function of time T sumLIMIT% for lithium-ion NMC type batteries, for two sets of engineering and economic parameters (current and future-over a five year perspective) and two load profiles. The presented results of a hybrid power supply system structure apply to the 50 kW peak power load and include an optimization variant with no limit for the power generation system. Rated power P n , which according to the results given in Tables 3 and 4 helps to achieve lower values of the quality criterion-LCOE, as compared to the optimization variant with the power generation system rated power limit (Tables 5 and 6).
The capacities of the lithium-ion batteries in the optimized systems with the parameters estimated for a five years' perspective are for both profiles higher than their corresponding battery capacities determined for the current profiles (Figure 13c,d). It enables better use of excess energy, i.e., power generated in a low-load period. A reduction in the storage cost by 20% and increasing their lifespan by over 67% despite of an increase in the storage capacity, helps to reduce the LCOE of the optimized systems (Figure 13a,b), including the LCOE reduction owing to the reduction in the quantity of energy generated in the power generation system and fed to the heaters. The values of the LCOE and energy storage capacity for the optimized systems decrease exponentially in the function of reliability index T SUMLimit% , for both analyzed load profiles-the current and future (five years' perspective) ones. At low reliability of the system (T SUMLimit% = 5%), the values of the LCOE for both sets of parameters (current and future (over a five years period) are similar (Figure 13a,b). Furthermore, the capacity of energy storages in the function of reliability level T SUMLimit% decreases faster for the current parameters than for the parameters of lithium-ion storages estimated for a five years' perspective. Figures 14 and 15 show the changes in the LCOE for the optimum systems in the function of time T sumLIMIT% and percentage of energy quantity fed to the heaters and used for heating or processes, for two types of batteries (lead-acid and lithium-ion) and two load profiles- Figure 14 for communal and 12 for industrial. The analyses were carried out only for the optimization variants with no peak load limits in the power generation system.
The fact that a significant quantity of energy is fed to the heaters is a major drawback of the studied type of system (off-line), which negatively affects the value of the LCOE. It results from the fact that even in the optimized PV-wind system with electrochemical storages the quantity of the generated energy is several times higher than the required energy (the values of SSSI are high- Tables 3 and 4). The paper revealed that such a state (significant reduction in the LCOE) and be ensured by using some of the energy for heating. It applies to systems with both lead-acid and lithium-ion batteries. The LCOE decreases exponentially in the function of energy quantity used for heating or processes- Figures 14  and 15. The decrease is high and amounts to ca. 50% even when 20% of energy fed to the heaters is consumed. Its intensity depends on the kind of applied batteries and the assumed reliability levels of electrical energy supplies to the load (T sumLIMIT% ). systems in the function of time TsumLIMIT% for lithium-ion NMC type batteries, for two sets of engineering and economic parameters (current and future-over a five year perspective) and two load profiles. The presented results of a hybrid power supply system structure apply to the 50 kW peak power load and include an optimization variant with no limit for the power generation system. Rated power Pn, which according to the results given in Tables 3 and 4 helps to achieve lower values of the quality criterion-LCOE, as compared to the optimization variant with the power generation system rated power limit (Tables 5 and 6).
(e) (f) Figure 13. Changes in selected parameters of the optimized systems with no limit for power P n in the function of time T sumLIMIT% for lithium-ion batteries with the current and future (five years' perspective) engineering and economic parameters: the unit cost of generating energy (LCOE) consumed for supplying a communal load (a) and industrial load (b); energy capacity of a battery pack for a communal load (c) and industrial load (d); rated power of the power generation system P n for a communal load (e) and industrial load (f).   The fact that a significant quantity of energy is fed to the heaters is a major drawback of the studied type of system (off-line), which negatively affects the value of the LCOE. It results from the fact that even in the optimized PV-wind system with electrochemical storages the quantity of the generated energy is several times higher than the required energy (the values of SSSI are high- Tables 3 and 4). The paper revealed that such a state (significant reduction in the LCOE) and be ensured by using some of the energy for heating. It applies to systems with both lead-acid and lithium-ion batteries. The LCOE decreases exponentially in the function of energy quantity used for heating or processes- Figures 14 and 15. The decrease is high and amounts to ca. 50% even when 20% of energy fed to the heaters is consumed. Its intensity depends on the kind of applied batteries and the assumed reliability levels of electrical energy supplies to the load (TsumLIMIT%).

Summary
A synthesis of highly-effective off-grid hybrid supply systems, which match the load characteristics, using volatile sources of renewable energy, especially solar and wind ones, is a complex issue, which requires taking into consideration both the engineering and economic aspects. The paper shows that one of the possible ways of its fulfilment is using global optimization task with the adopted non-technical quality criterion-a unit cost of electrical energy generation (LCOE).
The authors of the study claim that the major problem in the reference class of synthesis tasks is to include in the system model (even if they are simplified models) many elements such like:

Summary
A synthesis of highly-effective off-grid hybrid supply systems, which match the load characteristics, using volatile sources of renewable energy, especially solar and wind ones, is a complex issue, which requires taking into consideration both the engineering and economic aspects. The paper shows that one of the possible ways of its fulfilment is using global optimization task with the adopted non-technical quality criterion-a unit cost of electrical energy generation (LCOE).
The authors of the study claim that the major problem in the reference class of synthesis tasks is to include in the system model (even if they are simplified models) many elements such like: environmental parameters, economic factors, and data concerning the load change in a year. System operation simulations carried out as part of the optimization reflected the complexity of the parameters and phenomena affecting the value of the criterion function, and additionally helped to achieve the results within the acceptable time. In relation to high costs of periodical battery pack replacements, lifespan models which take into consideration at least their two operating conditions (charge and discharge currents, discharge depth and operating temperature), are of particular importance.
The LCOE for off-grid systems with energy storages is higher than for on-grid systems, which results from feeding some of the energy not used by the load to the heaters (losses), in addition to an increased energy capacity of the storages. The use of the optimization method helps to reduce the excess increase in the LCOE and to identify the system structure which matches best the geographical location and nature of the load, and the properties of the employed energy storages. The value of the referenced cost depends on many engineering and economic parameters, and on the assumed characteristics of the load supply system. Therefore, the major study results presented and commented on in the paper apply to two areas: • the influence of the level of supply reliability of a load with set load characteristics and the level of excess energy used (e.g., for heating structures), on the changes in LCOE values of the optimized hybrid structures, • inclusion of durability models of lead-acid and lithium-ion batteries, and the influence of changes in the engineering and economic parameters of lithium-ion batteries in a five years' perspective on the value of the criterion function (LCOE) and the structure of optimized systems.
The proposed synthesis method of PV-wind hybrid off-line systems leads to limiting the energy capacity of electrochemical storages, including lead-acid and lithium-ion batteries, which unfortunately results in high amounts of energy being fed to the heaters. Due to worse parameters, it is particularly evident for lead-acid batteries. It results from the difficulty to match the power generation (stochastic power profiles of the PV and wind) with the load demand.
For the studied power generation systems, the value of the LCOE and energy storage capacity decreases exponentially in the function of power supply reliability measured with the maximum time a year when the load operates at the supplied power below the load curve T sumLIMIT% .
Based on the analyses, the authors identified the following recommended methods to improve (reduce) the value of the criterion index (LCOE) for PV-wind off-grid systems which supply communal users and minor industrial users: • partial use of energy fed to the heaters e.g., for facility heating or in processes-a decrease in the LCOE for lead-acid and lithium-ion batteries amount to ca. 50% already when 20% of energy fed to the heaters is used. When the energy further increases, the LCOE decreases exponentially, reaching ca. 30% when half of the energy fed to the heaters is used, • the use of electrochemical storages with better lifespan parameters-a change in the lithium-ion batteries lifespan from 3000 to 5000 cycles and a decrease in their prices by 20% as compared to the current costs, lead to the LCOE reduction from 3% to 13%, whereby the greatest drops are observed for the most stringent supply reliability limits-T sumLIMIT% = 1%.
In the analyzed types of systems, it can be recommended to use thermoelectrical storage to store the heat accumulated in the spring-summer season in order to use it in autumn and winter for heating. Another method suggested by the authors to minimize the LCOE is to use lithium-ion batteries in the "second-life" cycle, i.e., usually once they have been taken out of service in very strict conditions, e.g., in the electromobility areas.
The authors plan to carry out further research into the replacement of lithium-ion and lead-acid batteries with other types of storage, especially thermoelectric and fuel cells. The current prices of these systems are high, but according to scientists, these technologies may be predominant in the area of energy storage in the future. Therefore, the methods of optimal selection of their parameters for cooperation with renewable sources operating within off-grid hybrid generation systems and known load characteristics are an important direction of research. Therefore, the authors will begin work on the extension of the hybrid system model with thermoelectric storages and fuel cells. This will require, apart from modelling electrical processes, also taking into account thermal processes. This is particularly important in the case of fuel cells, in which a large amount of heat is released during operation. This heat, in normal operating systems, is considered a loss. In the case of the proposed system, it is possible to store it in a thermal storage facility and recover it during periods of increased energy demand. This approach will improve the overall efficiency of the system.

EFC
The lead-acid battery lifespan, the equivalent number of cycles (EFC), after which the battery should be changed Calculations based on the Formulas (13) and (14) p G (t) Power transferred to the load from the generating system Calculations based on the Formula (15) p LOAD (t) The load power The load characteristics of the analyzed load type-own measurements co-authors of the paper