DEVELOPMENT OF SOFTWARE FOR CALCULATION OF OPTIMAL DIRECTION OF SOLAR PANELS DURING «TIME OF USE» IN REGIONS WITH COMPLEX TOPOGRAPHY

The object of current research is efficient usage of solar energy via optimal panel orientation. Using the mathematical methods of finding extremal value of function, the software was developed to calculate the daily optimal direction of PV panel. The knowledge of daily optimal direction of PV panels enables to determine the optimal panel direction for any time of use which allows maximizing the amount of harvested solar energy. The proper functioning of this software has been confirmed by field measurements. It was found that panel optimal direction can be determined by considering only the direct solar radiation, since taking into account diffuse solar radiation of sky practically doesn’t affect optimal PV panel direction. The essential factors affecting the optimal direction of PV panel are the topography of the considered site and the significant changes of optical thickness, for example, before and after noon. The calculations also show that the partial cloudiness doesn’t remarkably affect the optimal PV panel direction, but the regular presence of clouds in same part of the sky does affect it. This software is applied to the Ukrainian site Verkhovyna for which the optimal daily, seasonal and annual solar panel directions are calculated and presented. The formula to calculate the optimal direction for any time of use via daily optimal tilt angle and daily direct solar radiation falling onto the panel is given. The interface of the software has been designed in a user-friendly way and can be easily used by wide range of consumers. This software will especially be useful for quick calculation of optimal direction of solar panels in tourist sites located in mountainous regions.


Introduction
The recent International Energy Agency (IEA) report reveals the notable rise in investment in clean energy and how the current energy crisis caused by Russia's invasion of Ukraine will be a historic turning point towards a cleaner and more energy-secure future. World Energy Outlook 2022 reports that if all countries meet their climate targets in full and on time, this will limit global temperature rise to 1.7 °C, a major achievement that will be close to the Paris Agreement target well below 2 °C [1].
Under current policy setting, global fossil demand reaches a peak within this decade. If announced energy and climate pledges are fully implemented, the decline is steeper, and on a pathway to net zero by 2050, global fossil demand falls more sharply in the coming decades (Fig. 1).
Current growth rates in solar PV, wind, electric vehicles and batteries, if sustained, will lead to a much faster transformation than projected in the Stated Policies Scenario, although this will require supportive policies not only in the first leading markets for these technologies, but also across the world. Among renewable energy types, solar has much more perspectives due to its environmental friendliness, nearomnipresence, continual improvement of its usage technologies and cost-efficient issues. The main problems that TECHNOLOGY AUDIT AND PRODUCTION RESERVES -№ 6/1(68), 2022 ISSN 2664-9969 should be solved to worldwide disseminate solar energy usage are the discovering PV panels with high efficiency and improving energy accumulation technologies. Beside them for the efficient usage of PV solar energy the choice of the optimal location and direction of solar panels is one of the most important issues. Finding the correct solution for this problem is especially significant in mountain regions that have a complex topography.
In general, the term «panel optimal direction» can relate to an instantaneously, daily, monthly, semiannually, annually, or any chosen specific time interval. It is clear that the smaller the time interval, the greater is the amount of harvested solar energy of the optimally directed panel. So, maximum solar energy will be collected if the panel is directed instantaneously optimal (as a sunflower). But the mounting of the sun-tracking solar panel requires some energy for electric motor operation and additional maintenance costs. Therefore, in each specific case, the choice should be made on the basis of an assessment of economic profitability, taking into account all the factors affecting the finally generated electricity.
The amount of solar radiation (energy) falling to the Earth's surface at any place depends on several factors. Some of these are deterministic and others random. Deterministic factors are: 1) the position of the Sun in the sky for any chosen point on the Earth, that are the zenith and azimuth angles of Sun which are determined by formulas of astronomy; 2) the topography (relief) of the territory surrounding the chosen point, which can be determined from DEM (Digital Elevation Model) of territory or by measurements.
The factors of random nature are specified by meteorological conditions (cloud, fog, aerosol, etc.) and can be taken into account either by the use of statistical data or satellite data depending on which characteristics should be determined.
The software developed by the various R&D organizations and dedicated to the determination of solar radiation and solar panel characteristics can be applied to the horizontal landscape. The aim of the present work is the development of software for the determination of optimal PV panel direction for selected «time of use» in the regions with complex topography. The scientific importance of this work consists of taking into account strong astronomical relationships, laws of atmosphere optics and high precision computation algorithms. Practical value of the developed software is related to the increase of the efficiency of solar energy harvesting via PV solar panel.

Materials and Methods
2.1. Solar radiation reaching the Earth's Surface. Solar radiation model series to describe the spatial and temporal distribution of solar radiation are created via the application of the results of in situ experiments, satellite data and the results of radiation transfer theory [2][3][4]. These methods are reviewed and discussions of advantages and disadvantages are presented in [5][6][7]. The last paper, being the continuation of previous reviews of clear sky models, adds new modes, thus bringing the total number of described models to 70.
In mountain regions with complicated topography the spatial and temporal changes of insolation may be significant and sharp due to shadowing the Sun by relief. Experimental study of those changes requires the dense set of measure-ment points during a long time. But these are very difficult and cost-expensive things to realize. Therefore, the only reasonable way to estimate solar radiation distribution in mountain regions is the calculation on the validated correct radiation model. The knowledge of insolation with high spatial and temporal resolution is needed to accurately determine the optimal panel direction in the mountain regions.
A new reliable method for the determination of the daily optimal panel direction was developed and presented in [8]. This method is based on a mathematical model of solar radiation, which determines the amount of solar radiation for any instant of time and any geographical point taking into account shadowing of the Sun caused by surrounding relief. Thereby the optimal direction of the solar panel is determined analytically, as a solution of the derived system of equations. The results of calculations and measurements for the chosen site prove the adequacy of the method [8].

Mathematical model of solar radiation.
Below the essence of the mathematical model which has developed in [8], is explained. This model consists of four stages: 1. The first stage: by solving the Kepler equation for any given moment of time, the location of the Earth on the elliptical orbit around the Sun is found.
2. The second stage: for this considered moment of time, the latitude and the longitude of the Sun are determined.
3. The third stage: in chosen point on the Earth and at this considered moment of time, the solar zenith and azimuth are found.
4. The fourth stage: for the considered moment of time and point, the amount of global (direct + diffuse) solar radiation coming onto the panel is calculated.
The first three stages of this method have been explained in [9] and [10], and it differs from the traditionally used method of determination of the solar zenith and azimuth. It is noted that, this method must give more precise values of the solar zenith and azimuth, because the solar declination, which continuously depends on time, is calculated by numerically solving Kepler's equation of the Earth's movement around the Sun using a double-precision procedure. In the traditionally used method, the solar declinations are calculated as a discrete quantity depending on the days of the year.

Results and Discussion
3.1. Study case. Below let's apply this method to determine an instantaneously, daily, annually optimal direction of solar panel and corresponding amounts of direct solar radiation to panel for the Ukrainian site Verkhovyna located in highland region. The results of calculations are presented in Fig. 2-4.
As it is possible to see from Fig. 2 the panel tilt, to be daily optimal, must change in wide range, from 13° to 74°.
Herewith the corresponding amount of solar radiation will change from 2.6 till 8 kWh/m 2 .
The daily amount of direct solar radiation falling onto variously optimal and horizontally directed solar panel is presented in Fig. 3. The instantaneously optimal panel receive essentially more energy (2728 kWh/m 2 •year) than daily (2059 kWh/m 2 •year), annually (1941 kWh/m 2 •year) optimal and horizontally (1513 kWh/m 2 •year). The daily optimal panel receives notable more than annually optimal and horizontally in winter and summer period. TECHNOLOGY AUDIT AND PRODUCTION RESERVES -№ 6/1(68), 2022

ISSN 2664-9969
Note that knowledge of daily optimal panel tilt θ i , i = 1,2,…,365/366 and corresponding direct solar radiation S i allow to find the optimal panel tilt θ t for time of use via the formula: where p i are the weights of θ i in the sense of received energy; i 1 and i 2 the day numbers of year between which optimal direction of panel should be found. For example, if day numbers are counted from January 1, optimal tilt for June is calculated on (1) with i 1 = 151 and i 2 = 181. It must be spatially emphasized that we determine the optimal panel direction on falling direct solar radiation but not on global (direct + diffuse) one.
It is justified because during the daylight for clear atmosphere the maximums of direct and global radiation are realized at same time.
About panel optimal azimuth angle: for flat horizontal topography it is equal to 180° (south oriented) if before and after noon the optical thickness of atmosphere is same. In highlands with complicated relief, it may differ from 180° if west and east side reliefs essentially differ on brightness and on heights.
Concerning the influence of clouds to the optimal orientation of panel, if the clouds are more or less uniformly distributed in the sky, they will not affect much the panel orientation. Exception is the case when the clouds are concentrated in west or east part of sky.
For the Ukrainian site Verkhovyna some results of calculations of optimal directions of the panel, for different periods of time of use, and the corresponding solar energy amounts coming to the panel are given in Table 1.

ISSN 2664-9969
On the bases of the extension of the method for the determination of the daily optimal direction of solar panels, presented in [8], to chosen specific time interval we develop a software package for determining an instantaneously, daily, monthly, semiannually, annually (or any chosen specific time interval) optimal direction of solar panel, as well as the forecast for the week, day by day, of the harvesting solar energy. -Forecast in daily intervals for the week of the solar energy, which will fall onto the optimally directed panel. The interface with the software is carried out through the developed site and its design is as simple as possible and attractive for the users.
The fragment of interface scan is presented in Fig. 4 where in windows the input and output parameters are viewed.
3.3. Discussion. The strengths futures of developed software are: 1) applicability for places both flat horizontal topography and complicated mountain relief; 2) simplicity of software interface that makes it applicable for a wide range of users.
Weaknesses of software concern to the relief function, which should be entered as input file. It can be obtained by direct measurements with theodolite or from sites information (for example, [11]).
Opportunities of software are relied to the possibility of modifying the software: 1) to forecast of the harvesting solar energy; 2) to calculate the solar energy potential of highways in mountain regions; 3) to calculate the solar energy potential of roofs of buildings in mountain regions.
The main threats of usage solar energy with PV technologies are concerning the utilization of out-of-work PV panels that expected behind decades later. The level of the threats to environment can be correctly assessed when routine utilization processes of PV panels will begin and will clear technologies implemented for these aims.

Conclusions
The main result of this work is the development of the software to quickly find the optimal PV panel direction for any «time of use» via the knowledge of daily optimal direction in the region with complex topography. The results of software have been confirmed by field experiments and explained according to the astronomic and atmospherical optic laws. The relief function is included in the algorithm of the software to strengthen the theoretical consideration an improve the practical results to determine panel optimal direction. It is revealed that by choosing the panel direction optimally it is possible to increase the harvested energy up to 10 % for some seasons. This software can be extended to meet strong requirements of users, such as short time forecasting of the harvested solar energy via using weather prognoses; choosing the optimal energy usage and storage strategy.