Modelling of Energy Storage System from Photoelectric Conversion in a Phase Change Battery

: The essence of the research was to model the actual energy storage system obtained from photoelectric conversion in a phase change accumulator operating in a foil tunnel. The scope of the work covered the construction of four partial models, i.e., electricity yield from solar radiation conversion for three types of photovoltaic cells (mono- and polycrystalline and CIGS), energy storage in a PCM battery, heat losses in a PCM battery and energy collection from photoelectric conversion in PCM battery. Their construction was based on modelling methods selected on the basis of literature review and previous analyses, i.e., artiﬁcial neural networks (ANN), random forest (RF), enhanced regression trees (BRT), MARSplines (MARS), standard multiple regression (SMR), standard C&RT regression trees (CRT), exhaustive CHAID for regression (CHAID). Based on the analysis of the error values (APE, MAPE, ∆ ESR t ), the best quality models were selected and used in the further part of the work. Based on the developed models, a simulation of the inﬂuence of the size of the photovoltaic power plant and the type of cells on the process of storing energy from photoelectric conversion in a PCM battery was carried out. For the battery under study, a PV power output of 9 kWp for mono and polycrystalline panels and 13 kWp for CIGS panels is recommended for reasons of energy storage efﬁciency. The obtained results made it possible to develop a model determining the amount of energy stored in a phase change battery depending on the power of a photovoltaic power plant and variable solar conditions. In order to store the greatest amount of energy, we should choose a source with a capacity to produce at least 70 kWh of electricity per day. In the ﬁnal stage of the work, the indicators of solar radiation energy storage in the tested phase change accumulator were determined. For the battery tested, the solar energy storage efﬁciency can reach 12–13% for mono and polycrystalline panels and less than 7% for CIGS panels.


Introduction
In recent years, there has been a marked increase in the world population and dynamic economic development in many countries. These factors cause a systematic increase in global energy demand and consumption. Unfortunately, a large part of the energy consumed comes from fossil fuels. Their combustion is a direct cause of the emission of pollutants into the atmosphere. In order to reduce the negative impact of our activities on the natural environment, scientists are looking for potential solutions to reduce the demand for energy from fossil sources and increase the efficiency of using the energy already obtained.
One of the activities in this area is the use of photoelectric conversion, which consists of the direct conversion of solar radiation energy into electricity, using photoelectric cells. Unfortunately, the availability of solar radiation energy is characterized by a very high chamber to rise to 65 • C, i.e., it was about 35 • C higher than the outside air temperature. The energy storage process was efficient at the level of up to 85%.
PCM systems are also integrated with renewable energy sources. They are often used to lower the operating temperature of photovoltaic modules and thus to increase the efficiency of energy conversion in them [33].
In the literature, however, little attention is paid to the use of PCM materials in the production of plants under cover. The topic was widely described in the review [34]. It provides an overview of the research for the three most used groups of PCM materials, i.e., salt hydrates, paraffins and polyethylene glycol. The compilation shows that it is very difficult to compare the suitability of the above-mentioned materials for heat accumulation for heating purposes due to the large variability in the construction of batteries and their operating conditions. However, due to the advantages of using this method of heat storage, this issue is still a matter of scientific research. Energy storage systems using PCM materials may have high investment costs, but their undoubted advantage is low operating costs, no emissions of pollutants and thus no harmful effects on food. They also have a high energy density which makes these systems very attractive to farmers. In recent years, this issue has been discussed, in publication [35]. The yield and its quality largely depend on ensuring optimal conditions for plant development. One of them is the temperature inside the greenhouse. Unfavorable temperature fluctuations in the facility during the day can be reduced by 3-5 • C by using the PCM warehouse. Unfortunately, little information is available on the use of PCM to improve greenhouse heating systems [34][35][36][37][38][39]. The presented solutions are aimed at reducing energy consumption in the greenhouse heating system through: • obtaining energy from solar collectors inside [36] or outside [38] the greenhouse and energy storage using PCM, • combination of a ground source heat pump and a phase change storage [37], • increase in energy efficiency of a heat pump cooperating with a PCM battery [34], • use of PCM to lower the temperature in a greenhouse without the use of cooling systems [35], • construction of external walls of greenhouses as PCM warehouses [39], • searching for the optimal location of the PCM battery in the greenhouse [40], • integration of different renewable energy technologies (solar, photovoltaic, photovoltaic, geothermal and biomass) to achieve a greenhouse with zero energy needs [41].
Organic PCM materials also have some disadvantages. Among the most commonly cited are low thermal conductivity, flammability, and relatively high installation costs [42]. In recent years, much research has been done to eliminate or reduce these unfavorable parameters. One such study is nanocomposite phase change materials (NPCMs) built on CNTs [43]. The research results in this area are very promising, as they allow to increase the thermal conductivity up to 100 times compared to the traditional PCM material. The possibility of using other materials like RT100/EG composite PCM characterizing a latent heat of 163.6 J·g −1 for melting and 161.5 J·g −1 for solidification is also analyzed [44]. Wang et al. [45] propose the use of SWNT/PCM composite materials or nano-liquid MWC-NTs/water and MWCNT-Ag/water [46] to increase the efficiency of energy conversion and storage. The work [47] undertook a study on the use of carbon-based material, i.e., biocarbon, activated carbon, carbon nanotubes and graphite to stabilize the shape of the heat storage medium. Other works have used solid materials including mesoporous carbon doped with nitrogen [48], carbon fibers [49], carbon nanotubes (CNTs) [50], single (SWCNTs) and multi-wall carbon nanotubes (MWCNTs) [51], biocarbon [52], cellulose hybrid aerogels [53], expanded graphite (EG) [54], and many other solutions for shape stabilization. Despite many different modifications of phase change materials during heat accumulation, organic PCMs are still widely used. Their unquestionable advantages are non-corrosivity, reusability, low cost of battery construction, and high latent heat value.
To model the operation of PCM batteries in the literature, numerical methods are very often used, which take into account changes in thermal properties related to the melting Energies 2022, 15, 1132 4 of 22 and solidification processes [55,56]. Therefore, these methods mathematically combine the heat storage capacity described by specific heat (C p ), enthalpy (H) and temperature (T). Numerical modelling of the PCM battery enables a detailed understanding of the PCM phase change process due to air [57]. In paper [58], two immiscible PCM fluids and air were modeled using the continuous surface force (CSF) model in the open source computational fluid dynamics (CFD) software, OpenFOAM. The results obtained from the full numerical model showed good agreement compared to the experiments. Despite some slight variations in the results, numerical modelling is a potential tool for optimizing the performance of thermal storage devices. However, numerical calculations for models of thermodynamic phenomena require large computational outlays (even in the case of modelling relatively simple devices), they show considerable sensitivity to the model (e.g., grid structure). In analytical models, on the other hand, the solution is obtained in a significantly shorter time, because the simplifications are usually used in it [59,60]. The obtained results can always be verified by numerical calculations, and in some cases, this method can be used interchangeably with the numerical model (e.g., in optimization, in inverse tasks).
There are many different numerical methods for solving PCM problems [61]. This work analyzes over 250 scientific publications and concludes that the currently used models for predicting the energy performance of buildings are still of too low quality to be used for design purposes. In addition, this work deals with the issues of various simulation programs used for PCM modelling in the construction of a building. There are no studies in the literature assessing the usefulness of prognostic methods for modelling the operation of a PCM battery operating in greenhouse facilities. Moreover, cycles in which only a partial phase change occurs are often omitted in analyses, although in practice they often occur in energy storage systems.
Despite the research carried out in this area for many years, there is still a need to expand knowledge, especially in the field of modelling battery operation in real conditions. There are many factors that influence the process of storing energy in a phase change battery. The most important of them are the physicochemical and design parameters of the storage bed as well as the amount of energy supplied to it. Effective models of the battery operation process allow for a significant reduction in the optimization time of individual system elements and thus reduce the financial outlay for its construction. They can also be used during battery life to control its operation in order to maximize the use of available energy. This aspect is particularly important for sources with highly dynamic changes in the amount of energy supplied to the battery. The limited number of studies on modelling PCM battery operation in real conditions and the lack of studies assessing the usefulness of prognostic methods for modelling the operation of a PCM battery operating in greenhouse facilities where plant production is carried out under cover prompted the authors to undertake the research.

Purpose and Scope of Work
The aim of the work was to indicate an effective method and, on the basis of it, build a model of energy accumulation from photoelectric conversion in a phase change battery.
The aim of the work was achieved in the scope of: development of a model to optimize the power of a PV power plant cooperating with the analyzed PCM battery with a paraffin bed, -development of separate models of energy yield for three types of panels, i.e., monocrystalline, polycrystalline and CIGS, -analysis of the suitability of selected methods for modelling electricity yield from a PV power plant, -development of a model of energy storage in a PCM battery, -development of a model of energy losses in a real phase change accumulator, -analysis of the impact of the size of the PV plant on the operation of the PCM battery, determination of the energy storage index of solar radiation in PCM for sunny and cloudy days, -determination of electricity storage index from PV in PCM for sunny and cloudy days, -determining the amount of installed power for individual types of PV panels as a function of maximizing the amount of energy stored from photoelectric conversion.

Photovoltaic Power Plant
The first subject of research was a photovoltaic power plant located at the Faculty of Production and Power Engineering in Krakow, built of three types of photovoltaic modules: monocrystalline (4.2 kWp), polycrystalline (4.27 kWp) and thin-film CIGS (4.4 kWp) (Figure 1).
development of a model of energy losses in a real phase change accumulator, -analysis of the impact of the size of the PV plant on the operation of the PCM battery, -determination of the energy storage index of solar radiation in PCM for sunny and cloudy days, -determination of electricity storage index from PV in PCM for sunny and cloudy days, -determining the amount of installed power for individual types of PV panels as a function of maximizing the amount of energy stored from photoelectric conversion.

Photovoltaic Power Plant
The first subject of research was a photovoltaic power plant located at the Faculty of Production and Power Engineering in Krakow, built of three types of photovoltaic modules: monocrystalline (4.2 kWp), polycrystalline (4.27 kWp) and thin-film CIGS (4.4 kWp) ( Figure 1). The research was carried out only in the spring period. This is the time when the temperature drops below the optimum value for plant growth during the night and morning periods. The energy stored in the battery can meet the needs of the facility during this period. The winter period was not analyzed as production was not carried out in this period. The winter period also does not provide access to energy from the PV power plant at the required level. The operating parameters of the photovoltaic system were monitored and archived continuously using a Computer Measuring System (CMS) operating with the use of MODBUS RTU. Using this system of protocols makes it possible to collect information on the electric energy yield of direct and sinusoidal alternating voltage. In addition, the system also allows you to record the operation of sensors monitoring meteorological parameters, in particular, the outside temperature and temperature of PV modules (Tp, Tc, Tm), wind speed, intensity of direct and scattered solar radiation. All values were monitored with the use of a proprietary computer measuring system with a frequency of 120 s and archived in the measuring system.
A system was built to manage the operation of the phase change battery powered by energy from solar radiation conversion. This system was used to optimize the selection of the type and size of the photovoltaic installation allowing for the effective storage of energy in the phase change battery for various operating conditions ( Figure 2).  The research was carried out only in the spring period. This is the time when the temperature drops below the optimum value for plant growth during the night and morning periods. The energy stored in the battery can meet the needs of the facility during this period. The winter period was not analyzed as production was not carried out in this period. The winter period also does not provide access to energy from the PV power plant at the required level. The operating parameters of the photovoltaic system were monitored and archived continuously using a Computer Measuring System (CMS) operating with the use of MODBUS RTU. Using this system of protocols makes it possible to collect information on the electric energy yield of direct and sinusoidal alternating voltage. In addition, the system also allows you to record the operation of sensors monitoring meteorological parameters, in particular, the outside temperature and temperature of PV modules (Tp, Tc, Tm), wind speed, intensity of direct and scattered solar radiation. All values were monitored with the use of a proprietary computer measuring system with a frequency of 120 s and archived in the measuring system.

CIGS Polycrystalline
A system was built to manage the operation of the phase change battery powered by energy from solar radiation conversion. This system was used to optimize the selection of the type and size of the photovoltaic installation allowing for the effective storage of energy in the phase change battery for various operating conditions ( Figure 2).

PCM Phase Conversion Battery
The second subject of research was a prototype of a phase change battery that stores energy generated from a photovoltaic power plant.
In the tested PCM accumulator, the heat exchange took place between the heated air circulating in the pipes and the paraffin R58 surrounding it with a weight of 750 kg. The air was heated by a set of three heaters with unit power of 3 kW. The air flow through the channels made of 16 pipes with a diameter of 108 mm was forced by an axial fan with a power of 0.4 kW. The heat exchange area was 13.5 m 2 . In order to improve the heat transfer, the individual pipes were placed at a distance of 80 mm from each other. In order to reduce heat loss from the battery, it was insulated with 100 mm thick mineral wool. Its heat conductivity coefficient was λ = 0.035 W•(K•m) −1 . The external dimensions of the battery with insulation (length, width, height) were 3 m, 1.1 m and 1.6 m, respectively ( Figure  3). A functional diagram of the entire system is shown in Figure 4.

PCM Phase Conversion Battery
The second subject of research was a prototype of a phase change battery that stores energy generated from a photovoltaic power plant.
In the tested PCM accumulator, the heat exchange took place between the heated air circulating in the pipes and the paraffin R58 surrounding it with a weight of 750 kg. The air was heated by a set of three heaters with unit power of 3 kW. The air flow through the channels made of 16 pipes with a diameter of 108 mm was forced by an axial fan with a power of 0.4 kW. The heat exchange area was 13.5 m 2 . In order to improve the heat transfer, the individual pipes were placed at a distance of 80 mm from each other. In order to reduce heat loss from the battery, it was insulated with 100 mm thick mineral wool. Its heat conductivity coefficient was λ = 0.035 W·(K·m) −1 . The external dimensions of the battery with insulation (length, width, height) were 3 m, 1.1 m and 1.6 m, respectively ( Figure 3).

PCM Phase Conversion Battery
The second subject of research was a prototype of a phase change battery that stores energy generated from a photovoltaic power plant.
In the tested PCM accumulator, the heat exchange took place between the heated air circulating in the pipes and the paraffin R58 surrounding it with a weight of 750 kg. The air was heated by a set of three heaters with unit power of 3 kW. The air flow through the channels made of 16 pipes with a diameter of 108 mm was forced by an axial fan with a power of 0.4 kW. The heat exchange area was 13.5 m 2 . In order to improve the heat transfer, the individual pipes were placed at a distance of 80 mm from each other. In order to reduce heat loss from the battery, it was insulated with 100 mm thick mineral wool. Its heat conductivity coefficient was λ = 0.035 W•(K•m) −1 . The external dimensions of the battery with insulation (length, width, height) were 3 m, 1.1 m and 1.6 m, respectively ( Figure  3). A functional diagram of the entire system is shown in Figure 4.

Methodology of Conducted Research
The research methodology included the development of a model of energy storag from photoelectric conversion in the form of the internal energy of the deposit, which i R58 paraffin, in accordance with the algorithm presented in Figure 5. To achieve the above-mentioned goal, it was necessary to distinguish individua stages of modelling, which included: (a) Model estimating the amount of electricity obtained from a photovoltaic power plan for each cell type. (b) Model estimating the amount of stored energy in a PCM battery.

•
Model of the process of energy storage in an accumulator.

•
Model of energy losses in the PCM battery.

Modelling of Electricity Yield from a Phot ovoltaic Power Plant
Based on the literature review and own experience, the following were selected a independent variables for modelling the energy yield from the tested photovoltaic powe plant: the total intensity of solar radiation and the operating temperature of the cell.
All the data analyzed in the study were collected from the Computer Measuremen System, in which they were archived at two-minute intervals over a period of two years In the first stage of the study (Figure 6), the periods in which the photovoltaic plan

Methodology of Conducted Research
The research methodology included the development of a model of energy storage from photoelectric conversion in the form of the internal energy of the deposit, which is R58 paraffin, in accordance with the algorithm presented in Figure 5.

Methodology of Conducted Research
The research methodology included the development of a model of energy storage from photoelectric conversion in the form of the internal energy of the deposit, which is R58 paraffin, in accordance with the algorithm presented in Figure 5. To achieve the above-mentioned goal, it was necessary to distinguish individual stages of modelling, which included: (a) Model estimating the amount of electricity obtained from a photovoltaic power plant for each cell type. (b) Model estimating the amount of stored energy in a PCM battery.

•
Model of the process of energy storage in an accumulator.

•
Model of energy losses in the PCM battery.

Modelling of Electricity Yield from a Phot ovoltaic Power Plant
Based on the literature review and own experience, the following were selected as independent variables for modelling the energy yield from the tested photovoltaic power plant: the total intensity of solar radiation and the operating temperature of the cell.
All the data analyzed in the study were collected from the Computer Measurement System, in which they were archived at two-minute intervals over a period of two years.
In the first stage of the study (Figure 6), the periods in which the photovoltaic plant was not working were eliminated from the obtained database. Then, from the time series,  To achieve the above-mentioned goal, it was necessary to distinguish individual stages of modelling, which included:

•
Model of the process of energy storage in an accumulator. • Model of energy losses in the PCM battery.

Modelling of Electricity Yield from a Photovoltaic Power Plant
Based on the literature review and own experience, the following were selected as independent variables for modelling the energy yield from the tested photovoltaic power plant: the total intensity of solar radiation and the operating temperature of the cell.
All the data analyzed in the study were collected from the Computer Measurement System, in which they were archived at two-minute intervals over a period of two years.
In the first stage of the study (Figure 6), the periods in which the photovoltaic plant was not working were eliminated from the obtained database. Then, from the time series, records with incomplete information or measurement errors occurring, resulting, for example, from communication disturbances between the measuring sensor and the device for archiving measurement results, were removed. In the next step, the collected information was divided into individual sets used during the construction of the models. The first 70% of the observations from each month included in the study were assigned to the training set. The rest of the data was a validation set. records with incomplete information or measurement errors occurring, resulting, for example, from communication disturbances between the measuring sensor and the device for archiving measurement results, were removed. In the next step, the collected information was divided into individual sets used during the construction of the models. The first 70% of the observations from each month included in the study were assigned to the training set. The rest of the data was a validation set. In the final stage of the preliminary processing of the measurement results, the indices of unitary electricity yield from individual types of cells converted into Wp of installed power were determined, which in further analyses were the dependent variables.
The database used in the study, due to the short time between the recording of subsequent measurements (120 s), was very extensive (over 80 thousand records). Therefore, a study was undertaken on the impact of aggregation of measurement results up to 15min periods of time on the quality of the obtained models. Such a transformation of the data was also supported by the fact that in issues related to the power industry, we most often use such a period of time [62].
After the preliminary analysis of the research results, the development of predictive models was started, allowing for the determination of electricity yield from a photovoltaic power plant operating on the basis of individual types of PV cells.
For this purpose, a project was created in the Statistica 12 Data Miner graphical environment.
It includes nodes for partitioning the data into different sets (learning and validation). Predictions were then made based on selected models from the literature.
Forecasting was based on: artificial neural networks (ANNs), standard regression trees (BRT), enhanced (CHAID) and exhaustive (C&RT) trees as well as standard multiple In the final stage of the preliminary processing of the measurement results, the indices of unitary electricity yield from individual types of cells converted into Wp of installed power were determined, which in further analyses were the dependent variables.
The database used in the study, due to the short time between the recording of subsequent measurements (120 s), was very extensive (over 80 thousand records). Therefore, a study was undertaken on the impact of aggregation of measurement results up to 15-min periods of time on the quality of the obtained models. Such a transformation of the data was also supported by the fact that in issues related to the power industry, we most often use such a period of time [62].
After the preliminary analysis of the research results, the development of predictive models was started, allowing for the determination of electricity yield from a photovoltaic power plant operating on the basis of individual types of PV cells.
For this purpose, a project was created in the Statistica 12 Data Miner graphical environment. It includes nodes for partitioning the data into different sets (learning and validation). Predictions were then made based on selected models from the literature.
Modelling was performed for the following assumptions/constraints: • ANN-an automatic designer was used which searched for the best network by changing the number of neurons in the hidden layer in the range from 3 to 11. The elimination of the model overfitting phenomenon (BRT, RF, SMR, C&RT CHAID, MARS) was achieved thanks to the use of V-fold cross-validation, and in the ANN method, the data were divided into training, test and validation sets.

Modelling the Amount of Stored Energy in a PCM Battery
The construction of models allowing to determine the amount of energy stored in the PCM battery was carried out based on the developed algorithm, which is shown in block form in Figure 7. regression (SMR), random forest (RF) and Multivariate Adaptive Regression Splines (MARS).
Modelling was performed for the following assumptions/constraints: • ANN-an automatic designer was used which searched for the best network by changing the number of neurons in the hidden layer in the range from 3 to 11. • BRT-the number of observations in a node is not less than 5, the maximum number of nodes is 1000, tree pruning based on the analysis of variance. The elimination of the model overfitting phenomenon (BRT, RF, SMR, C&RT CHAID, MARS) was achieved thanks to the use of V-fold cross-validation, and in the ANN method, the data were divided into training, test and validation sets.

Modelling the Amount of Stored Energy in a PCM Battery
The construction of models allowing to determine the amount of energy stored in the PCM battery was carried out based on the developed algorithm, which is shown in block form in Figure 7. The amount of energy stored in a phase change accumulator is mainly influenced by factors such as specific heat, heat and temperature of the phase change of the energy storage medium and the amount of energy supplied to the storage. However, these are not the only factors affecting battery performance. The variables that influence the process of The amount of energy stored in a phase change accumulator is mainly influenced by factors such as specific heat, heat and temperature of the phase change of the energy storage medium and the amount of energy supplied to the storage. However, these are not the only factors affecting battery performance. The variables that influence the process of storing energy in a PCM battery also include the intensity of energy losses from the battery. This value depends mainly on the heat transfer coefficient through the external partitions of the accumulator, their surface area and the temperature difference between the heat storage medium and the surrounding air. The following were selected as independent variables for the construction of the model of the amount of energy accumulated during the operation of the phase change battery: the amount of electricity supplied, the paraffin temperature and the air temperature outside the battery.
Due to the interruptions in the battery charging process resulting from the variability of the amount of available solar radiation energy, it was necessary to develop an additional model describing heat losses for these periods. As the construction parameters of the battery were not changed during the test, they were not included in the modelling. The model of energy losses used only in periods in which there was a charging interruption was developed based on the variables describing the paraffin temperature and the temperature inside the foil tunnel from a PV power plant.

Evaluation of the Quality of Predictive Models
The quality of the built models of electricity yield from a photovoltaic power plant and models estimating the amount of stored energy and energy losses in the PCM battery was assessed on the basis of: 1.
The share of balance differences in relation to the sum of the actual values (∆ESR t ): where: W rz -the actual value, W p -the forecast value, n-the number of the last observations of the forecasted variable.
The value of the above-mentioned indicators was determined separately for the training set and the validation set.
The basic indicator characterizing the difference between the actual value and its forecast is the forecast error, i.e., the difference between these values. Very often, this difference is given as a percentage. So it is a measure referring to individual observations. It may take positive values when expired forecasts are underestimated or negative for overestimated forecasts. Due to the fact that the impact of underestimating and overestimating the forecast was not analyzed separately in the presented work, it was decided to select the absolute percentage error (APE) models for the assessment. It shows by how many percent the individual forecast values differ from the actual values. This error was used to draw empirical distribution lists, which show the share of APE errors of a given size for the assessed forecasting models. As a result, the models for which the share of errors with the lowest values is the highest can be selected as preferred.
In order to evaluate the model on the basis of one coefficient, the mean absolute percentage error (MAPE) was determined in the study. For the ideal method, the error value should be zero. In practice, obtaining such a model is not possible. However, we are looking for a model whose forecasts will differ as little as possible from the real values, so the average percentage error of the forecast should be as low as possible. The value of this error informs you how much, on average, during the forecast period, the forecasted value will differ from the actual value. However, this indicator, especially with a small number of observations, is very sensitive to outliers. If the forecast value is characterized by high dynamics of changes, errors for the smallest values often overestimate its value. The aim of the study was to estimate the amount of energy stored in the PCM battery. Therefore, it was decided to introduce the third index to the assessment, which was the share of balance sheet differences in relation to the sum of actual values (∆ESR t ). Thanks to this, information was obtained by how many percent the actual amount of energy accumulated during the entire charging cycle will differ from the forecasted amount. This allows to limit the influence of errors for small amounts of stored energy on the increase of the forecast error. For the user of the energy accumulator, the most important thing will be to know what difference between the actual and the forecast value can be expected.
In the final stage of the work, the solar radiation energy storage index and the electricity generated from the photovoltaic power plant in the tested phase change battery were determined based on the following dependencies: − energy storage index of solar radiation in PCM − energy storage index from PV in PCM

Modelling of Electricity Yield from PV Panels
In the work, separate models of electricity yield from a photovoltaic power plant built on the basis of monocrystalline, polycrystalline and thin-film modules were built. The intensity of solar radiation and the temperature of the cells aggregated from 2-min to 15-min periods of time were used as independent variables for modelling the electricity yield because preliminary research shows that such a transformation does not deteriorate the quality of the models built. However, the quality of the tested models was assessed on the basis of the indicators listed in Table 1. In the comparison of estimated errors for various methods of modelling the energy yield from monocrystalline photovoltaic panels, the MLP 2-11-1 neural network was characterized by the lowest errors for the training set (MAPE = 5.6%, ∆ESR t = 5.3), where the other methods failed at the level of 6-8%. For the validation set (Table 1) the lowest MAPE error and ∆ESR t was achieved by the MARS method, below 7%, and the difference between the MLP neural network was 0.32% and ∆ESR t 0.22%, respectively, for the MAPE error and ∆ESR t . The developed graph shows that the APE error distribution for the observations making up the training and validation set also shows that the MARS, SMR and ANN methods allowed for forecasting the lowest errors compared to other methods.
Based on the analyses of mean values and the error distribution for both the training and validation set, ANN for which the maximum error value was 20% is considered the best modelling method, taking into account the variables such as the intensity of solar radiation and the operating temperature of the cells.
Comparing the quality of the tested methods for forecasting electricity yield from polycrystalline photovoltaic panels (Table 1) on the basis of the available solar radiation energy and cell operating temperature, it was observed that the ANN, SMR and MARS methods were characterized by the smallest errors for both the training and validation sets. The use of these methods allowed for the development of forecasts with errors lower than 5-7%. The correctness and quality of the developed models on the basis of the analysis of the MAPE and ∆ESR t errors was confirmed in the empirical distribution function of the APE error. The above-mentioned methods (ANN, MARS, SMR) were characterized by a lower share of errors with a very low value than the other methods, and the share of errors up to 5% was at the level of 50% for these methods. The ANN method had the highest share of errors from 10%.
The conducted research has shown that the best quality models for forecasting electricity yield from a PV power plant using polycrystalline cells can be obtained for the ANN method. Later in this work, such a model will be used to estimate the amount of energy available for storage in a phase change battery.
In the last part of modelling energy yield from a photovoltaic power plant, tests were carried out to check the suitability of selected methods for forecasting electricity yield from a photovoltaic power plant built on thin-film CIGS panels.
The values of MAPE errors for individual methods changed in a relatively wide range, ranging from 7.56% to 18.30% for the training set and from 8.85% to 15.14% in the validation set (Table 1). This regularity was not observed for the second of the analyzed indicators, which for the training data changed its value from 5.98% to 8.62%. Therefore, it should be concluded that the constructed models were characterized by a large error at low values, which in the total amount of produced energy had a slight impact on its size. The comparison shows that the lowest errors are obtained for the ANN model.
In addition, the analysis of empirical distribution factors showed the advantage of the ANN model over other tested methods. The share of errors with very small values is lower for it than for other models, but its undoubted advantage is the fact that the maximum error rate is at the level of 25-30%, while for others it exceeds 100%. Its advantage over other methods is also visible in the lower range, already from approx. 5% of APE.
Based on the analyses performed, ANNs will be used for modelling the yield of electricity from a photovoltaic power plant using thin-film CIGS panels, for which the set of input variables will be the intensity of solar radiation and the temperature of the cells.

Modelling of the PCM Battery Charging Process
The second stage of the research involved modelling the charging process of the PCM battery and it consisted of two parts. The first one analyzed the usefulness of seven selected methods, both classic and alternative (the same set of methods as in the modelling of PV energy yield) to describe the process of accumulating energy in a PCM battery in periods when the PV power plant generated enough electricity for its operation. For the tested methods, the lowest error values were observed for ANN both for the training set (MAPE = 1.8%, ∆ESR t = 1.0%) and the validation set (MAPE = 1.8%, ∆ESR t = 1.3%). Additionally, the choice of the ANN model was supported by the empirical distribution analysis, in which this model was characterized by the highest share of APE errors below 10%. The analysis showed that the share of errors of up to 10% for ANNs constitute as much as 100% and for the MARS method 98% of the observations, while for other methods they are in the range from 42% to 70%.
In the second part of the study, models were built to determine energy losses in the phase change battery during unfavorable weather conditions and the charging process was interrupted for some time. The same methods were used to build the heat loss model as in the first part of battery operation modelling. The ANN method had the lowest forecast errors among all the methods used. The artificial MLP neural network with three hidden neurons achieved the lowest errors in MAPE and ∆ESR t for both the training and validation sets. This model will be used in the further part of the work for modelling the process of storing energy obtained from photoelectric conversion in the phase change battery.

Modelling of Energy Storage from Photoelectric Conversion in the Form of an Increase in the Internal Energy of the Battery
During the test, R58 paraffin weighing 750 kg was heated within the range of its temperature changes from 20 • C to 70 • C. In order to obtain such a change in the bed temperature, it was necessary to supply almost 70 kWh of electricity ( Table 2). No significant changes in the physico-chemical properties of paraffin were observed during the tests for 400 cycles of phase changes. The battery used at work allowed for the storage of approx. 3 thousand, 85% of supplied electricity. The efficiency of energy accumulation was strongly dependent on the range of battery operating temperatures. Table 2 shows the average values of the energy storage process for the analyzed charging cycles. The tested battery with a heat capacity of 60 kWh was installed in a facility with a daily energy demand of 10 to 85 kWh. The proposed solution is not able to fully cover the energy needs of the facility. It will be used only in the spring and summer seasons when energy must be supplied to the facility in the morning due to external conditions. Based on preliminary calculations, the amount of energy stored in the accumulator will cover the demand in transitional periods. In the winter, for economic reasons, no production is carried out in the analyzed facility.
In the last part of the work, based on the performed quality analysis, models with the best prediction quality were selected:

•
Model of electricity yield from a photovoltaic power plant.

•
Model of the process of storing energy in an accumulator. • Model of energy losses in the PCM battery.
Selected models were placed in the Data Miner workspace of the Statistica program ( Figure 8) and tests were carried out to determine the impact of the size of the photovoltaic power plant on the efficiency of stored electricity obtained from individual types of photovoltaic modules. During the test, only one thermal capacity of the battery was limited. The models used, however, make it possible to change its size, but only in a step-by-step manner by adding another module with the same capacity.
The novelty of this work is the fact that the description of the process of storing energy from photoelectric conversion in a PCM battery operating in a foil tunnel used for plant production was undertaken. The results of the tests for the analyzed battery operating in a real facility are presented below. The added value of the work is the development of an algorithm that allows the selection of the size of the PV power plant to the given battery capacity in the form of a computer program.
The performed analyses allowed for the comparison of the actual data on energy storage in the phase change accumulator with the results obtained on the basis of the developed prognostic models (Figure 9). Based on the developed regression dependence, for which the determination coefficient is at a very high level (R 2 = 97%), it follows that the developed models slightly lower the value of the stored energy. An increase in the actual amount of stored energy by 1 kWh causes an increase in the stored energy determined on the basis of models by 0.99 kWh. The second feature of the constructed models is the overestimation of the amount of stored energy for the smallest amounts, i.e., up to approx. 5 kWh. The novelty of this work is the fact that the description of the process of storing energy from photoelectric conversion in a PCM battery operating in a foil tunnel used for plant production was undertaken. The results of the tests for the analyzed battery operating in a real facility are presented below. The added value of the work is the development of an algorithm that allows the selection of the size of the PV power plant to the given battery capacity in the form of a computer program.
The performed analyses allowed for the comparison of the actual data on energy storage in the phase change accumulator with the results obtained on the basis of the developed prognostic models (Figure 9). Based on the developed regression dependence, for which the determination coefficient is at a very high level (R 2 = 97%), it follows that the developed models slightly lower the value of the stored energy. An increase in the actual amount of stored energy by 1 kWh causes an increase in the stored energy determined on the basis of models by 0.99 kWh. The second feature of the constructed models is the overestimation of the amount of stored energy for the smallest amounts, i.e., up to approx. 5 kWh. The novelty of this work is the fact that the description of the process of storing energy from photoelectric conversion in a PCM battery operating in a foil tunnel used for plant production was undertaken. The results of the tests for the analyzed battery operating in a real facility are presented below. The added value of the work is the development of an algorithm that allows the selection of the size of the PV power plant to the given battery capacity in the form of a computer program.
The performed analyses allowed for the comparison of the actual data on energy storage in the phase change accumulator with the results obtained on the basis of the developed prognostic models (Figure 9). Based on the developed regression dependence, for which the determination coefficient is at a very high level (R 2 = 97%), it follows that the developed models slightly lower the value of the stored energy. An increase in the actual amount of stored energy by 1 kWh causes an increase in the stored energy determined on the basis of models by 0.99 kWh. The second feature of the constructed models is the overestimation of the amount of stored energy for the smallest amounts, i.e., up to approx. 5 kWh. Based on the developed models, a simulation of the influence of the size of the photovoltaic power plant and the type of cells on the energy storage process in the PCM battery was carried out. During the research, the size of the PV power plant was changed in the range from 4 to 13 kWp every 1 kWp. The range of changes in the rated power of the engine was determined on the basis of the range of power supplied to the battery during the construction of the model of the energy storage process in it.
The further part of the work presents the obtained results concerning the available amount of solar radiation energy, electricity yield from a photovoltaic power plant and the amount of energy stored in the phase change battery for two types of days characterized by different meteorological conditions ( Figure 10). The figures below (Figures 11 and 12) show the results for sunny days and for cloudy days, but with periods enabling the battery to work. Based on the developed models, a simulation of the influence of the size of the photovoltaic power plant and the type of cells on the energy storage process in the PCM battery was carried out. During the research, the size of the PV power plant was changed in the range from 4 to 13 kWp every 1 kWp. The range of changes in the rated power of the engine was determined on the basis of the range of power supplied to the battery during the construction of the model of the energy storage process in it.
The further part of the work presents the obtained results concerning the available amount of solar radiation energy, electricity yield from a photovoltaic power plant and the amount of energy stored in the phase change battery for two types of days characterized by different meteorological conditions ( Figure 10). The figures below (Figures 11 and  12) show the results for sunny days and for cloudy days, but with periods enabling the battery to work.    Based on the developed models, a simulation of the influence of the size of the photovoltaic power plant and the type of cells on the energy storage process in the PCM battery was carried out. During the research, the size of the PV power plant was changed in the range from 4 to 13 kWp every 1 kWp. The range of changes in the rated power of the engine was determined on the basis of the range of power supplied to the battery during the construction of the model of the energy storage process in it.
The further part of the work presents the obtained results concerning the available amount of solar radiation energy, electricity yield from a photovoltaic power plant and the amount of energy stored in the phase change battery for two types of days characterized by different meteorological conditions ( Figure 10). The figures below (Figures 11 and  12) show the results for sunny days and for cloudy days, but with periods enabling the battery to work.   The analyses show that due to the amount of energy stored in the tested battery (paraffin mass 750 kg), the optimal power of the photovoltaic plant should ensure the generation of electricity in the 24-h period at the level of approx. 70 kWh. This is because the greater amount of available energy is not efficiently used in the storage process. This is mainly due to a change in the thermal parameters of the storage bed and an increase in energy losses in the battery. With the optimal operation of the battery in the analyzed range of temperature changes of the storage medium, the efficiency of solar radiation energy storage is at the level of 12-13% for mono and polycrystalline panels and less than 7% for CIGS (Figures 13 and 14).  The analyses show that due to the amount of energy stored in the tested battery (paraffin mass 750 kg), the optimal power of the photovoltaic plant should ensure the generation of electricity in the 24-h period at the level of approx. 70 kWh. This is because the greater amount of available energy is not efficiently used in the storage process. This is mainly due to a change in the thermal parameters of the storage bed and an increase in energy losses in the battery. With the optimal operation of the battery in the analyzed range of temperature changes of the storage medium, the efficiency of solar radiation energy storage is at the level of 12-13% for mono and polycrystalline panels and less than 7% for CIGS (Figures 13 and 14). The analyses show that due to the amount of energy stored in the tested battery (paraffin mass 750 kg), the optimal power of the photovoltaic plant should ensure the generation of electricity in the 24-h period at the level of approx. 70 kWh. This is because the greater amount of available energy is not efficiently used in the storage process. This is mainly due to a change in the thermal parameters of the storage bed and an increase in energy losses in the battery. With the optimal operation of the battery in the analyzed range of temperature changes of the storage medium, the efficiency of solar radiation energy storage is at the level of 12-13% for mono and polycrystalline panels and less than 7% for CIGS (Figures 13 and 14).   Taking into account the efficiency of energy storage in the battery and its heat accumulation capacity (Figures 15 and 16), it is recommended to reduce the power of the photovoltaic power plant to approx. 9 kWp for mono and polycrystalline panels and 13 kWp for CIGS panels. The increase in the required power for thin-film panels is due to the fact that they are of lower efficiency compared to other panels.
For the tested PV plants, on a clear day, we expect an energy yield of approx. 5.5 kWh•kWp −1 for mono and polycrystalline panels and 4.3 kWh•kWp −1 for CIGS. For cloudy days, these indicators are lower by 1.9 and 1.3 kWh•kWp −1 , respectively. The available amount of energy supplied to the battery on a cloudy day will not allow to achieve the proper phase transformation in the entire volume of the battery and will reduce the amount of stored energy to less than 13 kWh, but the efficiency of electricity conversion in the battery will be almost 83%, for mono and polycrystalline panels and 70% for CIGS.  Taking into account the efficiency of energy storage in the battery and its heat accumulation capacity (Figures 15 and 16), it is recommended to reduce the power of the photovoltaic power plant to approx. 9 kWp for mono and polycrystalline panels and 13 kWp for CIGS panels. The increase in the required power for thin-film panels is due to the fact that they are of lower efficiency compared to other panels. Taking into account the efficiency of energy storage in the battery and its heat accumulation capacity (Figures 15 and 16), it is recommended to reduce the power of the photovoltaic power plant to approx. 9 kWp for mono and polycrystalline panels and 13 kWp for CIGS panels. The increase in the required power for thin-film panels is due to the fact that they are of lower efficiency compared to other panels.
For the tested PV plants, on a clear day, we expect an energy yield of approx. 5.5 kWh•kWp −1 for mono and polycrystalline panels and 4.3 kWh•kWp −1 for CIGS. For cloudy days, these indicators are lower by 1.9 and 1.3 kWh•kWp −1 , respectively. The available amount of energy supplied to the battery on a cloudy day will not allow to achieve the proper phase transformation in the entire volume of the battery and will reduce the amount of stored energy to less than 13 kWh, but the efficiency of electricity conversion in the battery will be almost 83%, for mono and polycrystalline panels and 70% for CIGS.  The analyzed processes of solar energy accumulation in the phase change accumulator show one of the many possibilities of utilizing the surplus solar energy. Analyzing the possibilities of storing solar radiation energy in a phase change accumulator with its indirect conversion into electricity and heat, efficiencies were obtained at the level of 12-13% for mono and polycrystalline panels and 7% for CIGS. Further research should focus on issues related to improving the efficiency of heat accumulation. The implementation of these tasks should be carried out in two ways. On the one hand, it concerns the design of the accumulator and, on the other hand, the properties of the heat-storing medium.
The problem of modelling the process of energy storage from photoelectric conversion in a phase change accumulator presented in the paper does not exhaust the whole issue. The authors plan to continue the undertaken topic through the implementation of research, inter alia, in terms of: • construction of hybrid models in order to better estimate the amount of available solar radiation energy based on the available forecasts of variables describing meteorological conditions, • the course of the process of recovering the energy stored in the PCM battery and the impact of dynamics and the depth of its discharge on the efficiency of the process.
In subsequent studies, attempts will be made to build hybrid models in order to better estimate the amount of available solar radiation energy based on the available forecasts of variables describing meteorological conditions. Research will also be continued in the field of the process of recovering energy stored in the PCM battery and the impact of dynamics and the depth of its discharge on the efficiency of the process.

Conclusions
The conducted analyses allowed for the development of effective models of energy collection from photoelectric conversion in the phase change battery. ANN showed the best suitability for this purpose. The constructed models of electricity yield from photoelectric conversion were characterized by average relative forecast errors of 6-7% for monoand polycrystalline modules and a slightly higher error rate (7-9%) for thin-film modules. The developed models made it possible to make forecasts for which the share of balance differences ranged from 5% to 8%. For the tested PV plants, on a clear day, we expect an energy yield of approx. 5.5 kWh·kWp −1 for mono and polycrystalline panels and 4.3 kWh·kWp −1 for CIGS. For cloudy days, these indicators are lower by 1.9 and 1.3 kWh·kWp −1 , respectively. The available amount of energy supplied to the battery on a cloudy day will not allow to achieve the proper phase transformation in the entire volume of the battery and will reduce the amount of stored energy to less than 13 kWh, but the efficiency of electricity conversion in the battery will be almost 83%, for mono and polycrystalline panels and 70% for CIGS.
The analyzed processes of solar energy accumulation in the phase change accumulator show one of the many possibilities of utilizing the surplus solar energy. Analyzing the possibilities of storing solar radiation energy in a phase change accumulator with its indirect conversion into electricity and heat, efficiencies were obtained at the level of 12-13% for mono and polycrystalline panels and 7% for CIGS. Further research should focus on issues related to improving the efficiency of heat accumulation. The implementation of these tasks should be carried out in two ways. On the one hand, it concerns the design of the accumulator and, on the other hand, the properties of the heat-storing medium.
The problem of modelling the process of energy storage from photoelectric conversion in a phase change accumulator presented in the paper does not exhaust the whole issue. The authors plan to continue the undertaken topic through the implementation of research, inter alia, in terms of: • construction of hybrid models in order to better estimate the amount of available solar radiation energy based on the available forecasts of variables describing meteorological conditions, • the course of the process of recovering the energy stored in the PCM battery and the impact of dynamics and the depth of its discharge on the efficiency of the process.
In subsequent studies, attempts will be made to build hybrid models in order to better estimate the amount of available solar radiation energy based on the available forecasts of variables describing meteorological conditions. Research will also be continued in the field of the process of recovering energy stored in the PCM battery and the impact of dynamics and the depth of its discharge on the efficiency of the process.

Conclusions
The conducted analyses allowed for the development of effective models of energy collection from photoelectric conversion in the phase change battery. ANN showed the best suitability for this purpose. The constructed models of electricity yield from photoelectric conversion were characterized by average relative forecast errors of 6-7% for mono-and polycrystalline modules and a slightly higher error rate (7-9%) for thin-film modules. The developed models made it possible to make forecasts for which the share of balance differences ranged from 5% to 8%.
The developed models of accumulating electricity in a battery were characterized by much better quality. The determined relative errors of forecasts were at a level not exceeding 2% for both the training and validation set, and the share of balance differences was at an even lower level.
The analyses carried out on the basis of the developed models show that in order to store the largest amount of energy, we should select a source with a capacity that allows us to generate at least 70 kWh of electricity per day. In this case, we can expect that the battery will store not less than 60 kWh of energy, and the paraffin temperature will reach 60 • C. For the above conditions, it can be expected that the average efficiency of collecting solar radiation energy will be at the level of 12-13% for mono and polycrystalline panels and 7% for CIGS. Further increasing the power of the source is not a deliberate action, because due to the parameters of the medium transferring energy to the battery and its bed itself, it is not able to accumulate more energy.

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