1. Introduction
Renewable energy refers to energy sources that are inexhaustible or renewable, drawing power from processes that occur constantly and are predicted to continue indefinitely in the future. Examples include solar energy, wind energy, geothermal processes, and water movement. Unlike energy production based on fossil fuels (such as coal, natural gas, and oil) or nuclear fusion, renewable energy minimizes the substances used for energy production [
1]. The versatility of renewable energy sources, particularly solar power, has led to innovative applications beyond traditional power generation, such as solar fencing for agricultural and perimeter security [
2]. According to the International Energy Agency, the growth of renewables has accelerated in recent years due to the decreasing costs of wind energy and photovoltaic technology, as well as continued government support [
3]. One of the main targets for renewable energy is the electricity sector, and it is predicted that renewable energy sources will meet most of the world’s energy requirements. There has been steady growth in the worldwide deployment of solar PV systems, with a 2021 capacity of approximately 107 GW [
1].
The Earth’s surface receives approximately 1.5*1018 kWh/a of solar energy every year, which is ten thousand times the current power consumption needs of all nations [
4]. The increasing global demand for clean and sustainable energy sources has led to the widespread adoption of renewable energy technologies. Among these, solar PV panels have emerged as a popular and environmentally friendly solution for generating electricity. PV systems harness the sun’s energy by converting sunlight into electrical power, providing a clean and inexhaustible energy resource. However, the intermittent nature of solar power, influenced by factors such as cloud cover, poses challenges to the stability and reliability of power grids [
5].
PV panels are made up of PV cells that use natural, inexhaustible sunlight and convert it into electrical energy. Since each PV cell produces approximately 5 W and 0.5 V DC, cells placed in a series PV arrangement are an unreliable resource, so grid integration is not trivial [
6].
Accurate power prediction for PV systems is crucial to overcoming these challenges and ensuring the seamless integration of solar energy into the grid. Power forecasting allows grid operators and utilities to anticipate fluctuations in solar power output and make informed decisions about energy management. In general, power prediction can be classified into different types based on the forecasting horizon, including nowcasting, ultra-short-term, short-term, medium-term, and long-term forecasts. Nowcasting and ultra-short-term forecasts are particularly important for managing the variability of renewable energy generation and maintaining grid stability. Despite the critical importance of accurate and efficient forecasting methods for PV power output, the existing literature, including recent reviews, predominantly focuses on models that require extensive computational resources or rely heavily on historical data, which may not always be available or accurate for all locations [
7]. Various forecast models have been developed to predict solar power production under different weather conditions, including persistence models, physical models, and a combination of both. Persistence models rely on the assumption that recent observations of power output will persist in the near future, while physical models use numerical weather prediction data to estimate the impact of weather conditions on solar power generation. The method presented in this paper, utilizing distributed sensors for ultra-short-term photovoltaic power forecasting, is not found in the existing literature. By integrating a combined persistence and physical approach, this method offers a novel solution that addresses the gap in efficiently predicting the impact of cloud cover on photovoltaic fields in real time. The future time period for output forecasting or the time duration between the actual and effective time of prediction is the forecast horizon [
8]. Some researchers prefer three categories of the forecast horizon: short-term, medium-term, and long-term [
9]. Others have added a “fourth” category that is useful in designing PVs integrated with a better energy management system, unit commitment, power scheduling, and dispatching, which is named the “very short-term or ultra-short-term forecast horizon” [
10,
11]. Accurate forecasting is crucial for enhancing the efficiency and reliability of PV-BESS systems. Precise solar power predictions are essential for managing BESS charging and discharging cycles, which, in turn, improves energy efficiency and grid stability. Therefore, there is a clear need for advanced forecasting models to better integrate solar power with energy storage solutions [
12]. This approach adds significant value by enhancing the accuracy of power predictions in the ultra-short term, enabling more effective integration of solar power into the grid and improving grid stability.
4. PV-Panel-Based Forecasting
After our thorough examination of various forecasting methods and their respective advantages and disadvantages, our goal in this paper is to present an innovative and highly accurate forecasting approach. This method capitalizes on the use of identical PV panels as power sensors to monitor real-time changes in the power output. This method’s adaptability makes it especially suitable for solar-powered fencing, among other applications, demonstrating its practicality and the wide-ranging impact of our research in the renewable energy sector. By providing a forecasting solution that can be integrated with solar fencing systems, we address a critical need for reliable energy management in agricultural and security applications, underscoring the originality and utility of our approach. These panel sensors respond not only to changes in solar irradiance but also to variations in temperature, wind speed, aerosol distribution, and the accumulation of dust and dirt over time, all of which are critical factors affecting PV panel performance.
Consequently, any alteration in environmental conditions, such as cloud movement, that impact the sensors will similarly affect the main panels, allowing for a more accurate representation of the solar field’s response. In this paper, we outline the methodology for positioning the sensors, considering factors such as shading and panel orientation. Additionally, we detail the approach for calculating cloud movement and other environmental factors, as well as their influence on the overall power output of the solar field. This method can lead to improved nowcasting and forecasting models, which, in turn, can optimize system performance, reduce energy costs, and enhance grid stability.
In the proposed approach, a hybrid forecasting method is utilized, which combines elements of both persistence and physical forecast methods for predicting the impact of cloud cover on PV fields. The persistence method, a key component of this approach, is employed by observing the power drop in the sensor panels. This method assumes that the current trend will continue in the short term, providing essential information for immediate decision-making. On the other hand, the physical method incorporates a physical variable, specifically wind speed, into the forecasting process. By using basic geometry, the time it takes for the cloud to reach the main PV field can be calculated, thus enhancing the accuracy of the prediction. The combination of these two methods results in a simplified yet effective forecasting technique for ultra-short-term or nowcasting forecasts for PV fields. Although this hybrid method may not be as precise as more advanced statistical or machine learning techniques, it offers valuable insights for immediate decision-making and effective management of the PV system.
Proposed Algorithm
Let us consider a field filled with rectangular solar panels arranged arbitrarily. The field is surrounded by sensors placed along the borders of some figure, with each sensor labeled by an index j. We introduce a coordinate system x and y, with the sensors having coordinates (). Each solar panel is numbered k, and all panels together form a single solar panel. It is assumed that each panel is small and can be covered by clouds or not. Let the clouds move at a constant speed V (, ) with an arbitrary shape. At every moment of time , the sensors indicate the presence or absence of a cloud. The objective is to determine the area of the panel covered by clouds, the length of time it is covered, and the power loss incurred, depending on the sensor readings. In this setting, the panels serve as an element for dividing the area of the solar panel.
In
Figure 2, a sensor with index
is characterized by coordinates
and it has detected a shadow at the specific moment
The point where the shadow is measured will intersect a panel element with index
at points A and B. Consequently, the coordinates of these intersection points are represented with the indexes i, j, and k.
We can define each panel using a system of inequalities.
The indexes with
k denote the boundaries of the rectangular panel along the
X and
Y axes. Let us focus on one of the sensors, which measures the presence or absence of a shadow at a specific point with coordinates (
). The index
i represents the moment in time, while
j corresponds to the number of sensors. The shadow emanates from the given point and travels along a straight line according to the following equation.
Assume that
Vx is not equal to zero. Let the points of intersection between line (2) and the lines representing the boundaries of the
k-th panel be denoted as (
), (
), (
), and (
). Here, the index
ijk denotes the coordinate of the intersection between panel
k and the shadow detected by sensor
j at time
i. When
X1k,
X2k,
Y1k, and
Y2k are known, we can calculate the remaining coordinates:
assuming that
Vy is not equal to zero. Of these intersection points, only two points can lie on the boundary of the panel. If the intersection point happens to be in a corner, then both points coincide.
Moving on to the process of counting the shaded panels, let us define the matrix Hik, where each element represents the number of rays emitted from the boundary that crossed panel
k at moment
i. An intersection occurs if any two of the following conditions are met:
Conditions (2)–(5) correspond to the placement of the points (X1k, y1iijk), (X2k, y2ijk), (x1ijk, Y1k), and (x2ijk, Y2k) on the edge of the panel. If any of these conditions are met, the panel can be considered covered. Note that the total area of shaded panels may exceed the sum of the panel areas for which Conditions (2)–(5) are satisfied at a given point in time because the coverage duration is also a factor.
We can estimate the duration of the intersection by recalling the coordinates of two of the four points (
X1k,
y1iijk), (
X2k,
y2ijk), (
x1ijk,
Y1k), and (
x2ijk,
Y2k) as (
x1,
y1) and (
x2,
y2). We can then calculate the moments of intersection.
We define and as tables of the times when the shadow emitted by sensor j at time i crosses the boundaries of panel k. Then, we compute Tijk as the maximum of T1ijk and T2ijk, which represents the duration for which the panel remains shaded. Within the matrix Hik, the term hijk is defined as a binary indicator. Specifically, hijk is set to 1 if the Conditions (2)–(5) are satisfied, indicating that the shadow detected by sensor j at time i is indeed covering panel k. Conversely, hijk is set to 0 if the conditions are not met, signifying that panel k is not covered by a shadow at that time. Let dSk be the area of the k-th panel.
Using these definitions, we can write the condition for the coverage of panel k at time i = I as follows: if tI < TIjk, then the shadow recorded by sensor j still covers panel k at time I. We check this condition for all j with a fixed I and k. If the condition is satisfied at least once, then we set HIk = 1; otherwise, we set it to 0. Here, Hik represents the coverage, and it can also be used to count the number of coverages for creating drawings.
The full coverage area is given by the equation
where
is the area of the
k-th panel. The power loss at time
i is the product of the solar constant
λ and
Si, where
λ is determined by the weather conditions and geographic location.
The total energy loss at a given point in time
i =
I is then computed as
In this way, we can solve the problem of power losses for an arbitrary field of solar panels, which may be limited by sensors located at arbitrary positions, while also maintaining the constancy of the speed of the shadow.
6. Verification
We evaluated the performance of the PV system under several distinct scenarios to comprehensively assess the effectiveness of the algorithm. The first scenario involves operating the system without utilizing energy storage at all. The second scenario incorporates energy storage; however, the algorithm is not employed, and the energy storage is activated only when clouds are already present in the field. In the third scenario, our algorithm serves as an early warning system, providing advance notice to the energy storage system before clouds reach the field, allowing it to proactively respond to impending fluctuations in PV power generation. The fourth scenario is similar to the third, but instead of giving early warning to the energy storage system, the grid operator is notified in advance, enabling them to assess and manage the power supply to the load accordingly. By comparing the outcomes of these scenarios, we aim to demonstrate the benefits and practical applicability of the proposed algorithm in optimizing renewable energy systems and ensuring a stable and reliable power supply.
Scenario 1: No PV-Battery System and with No Early Warning Algorithm for Energy Storage Activation and No Grid Operator Notification at a weak grid. In
Figure 4, this scenario is graphically depicted to provide a straightforward view of how the system performs when it is directly exposed to the effects of passing clouds without any form of mitigation. This figure tracks the power output from the PV field (Ppv), the energy held in the battery (PBat), the power used by the load (PLoad), and the power sent to the grid (PGrid). The graph demonstrates the power output variability as clouds move across the PV field, underscoring the difficulty in maintaining a stable power supply to both the load and the grid when no storage or forecasting tools are in use. It highlights the necessity for precise forecasting to handle these fluctuations effectively.
In
Figure 5, as depicted in scenario 1, a noteworthy aspect that warrants particular attention is the voltage drop that could potentially harm the load. This voltage drop poses a significant risk to the integrity and safety of the electrical system, including sensitive equipment and devices connected to the grid.
Scenario 2: PV System Without Energy Storage and with Early Warning Algorithm for Grid Operator Notification
In
Figure 6, scenario 2 provides a comprehensive illustration of the dynamic relationship between cloud movement and PV power generation. This relationship is particularly significant for grid operators, as it necessitates timely responses to fluctuations in PV power output. This figure uses the blue line to represent the PV field power and is also a drawn map of a moving cloud passing over the PV field. This phenomenon can be divided into three different phases:
Initial Impact Phase: As the cloud approaches and begins to cross the PV field, the power produced starts to decrease. This decrease is contingent on the cloud’s velocity and density, two variables that can significantly influence the rate of power reduction.
Cloud Crossing Phase: During this phase, the cloud continues to traverse the PV field. The power decrease persists, reflecting the cloud’s ongoing obstruction of sunlight. This phase emphasizes the importance of accurate cloud forecasting, as it allows the grid operator to anticipate and respond to these changes in real time.
Cloud Exit Phase: This final phase occurs when the cloud crosses out of the field and passes the sensors. The power begins to stabilize, returning to its pre-cloud levels.
The red line in the figure illustrates the grid power changes in response to the PV power fluctuations. This line is indicative of the grid’s adaptability and responsiveness, key attributes in maintaining stability in the face of variable renewable energy sources.
The yellow line, representing the power over the load, and the brown line, indicating the absence of active energy storage, further contribute to the overall understanding of the system’s behavior. The absence of active energy storage, as shown by the brown line, underscores the grid’s reliance on real-time adjustments to compensate for changes in power generation.
The figure demonstrates that the grid compensates for the lack of power by pushing slightly more power forward to the loads. This compensation is not merely a reactive measure; it is a calculated response that ensures that the grid values and the grid inertia remain within the allowed range. This highlights the importance of integrated planning and real-time control in modern PVs and grids.
Figure 7, depicting scenario 2, provides an insightful examination of the voltage response to the extra power that the grid is building due to forecasting. This figure emphasizes a critical aspect of modern grid management, particularly in the context of renewable energy integration. The primary significance of this figure lies in the demonstration that the voltage remains within the allowed boundaries. This stability is not merely a technical detail; it is a fundamental requirement for the safe and efficient operation of the electrical grid. Any deviation from these boundaries could lead to system instability or even failure, making the control of voltage an essential task for grid operators. The figure also reveals an interesting dynamic at the end of the cloud’s movement, which commences at the conclusion of its crossing over the PV fields. Here, the grid power is directed according to the forecasting to the other side of the PV field. This maneuver is indicative of the grid’s adaptability and the vital role that accurate forecasting plays in optimizing the energy distribution. It is essential to recognize the broader context in which this scenario occurs. Most PV fields lack a storage system, a reality that presents both challenges and opportunities. Implementing large-scale storage is often prohibitively expensive, a factor that can limit the flexibility and resilience of the grid. In this context, forecasting emerges as a valuable solution, offering a cost-effective means to mitigate grid fluctuations.
Scenario 3: PV-Battery System Without an Early Warning Algorithm for Energy Storage Activation and No Grid Operator Notification
Figure 8 illustrates scenario 3, which focuses on a PV field equipped with an energy storage system. This scenario offers a nuanced view of how the storage system interacts with the grid, particularly during significant power fluctuations. The figure demonstrates the storage system’s response to a substantial drop in power. As the PV field’s power output declines, the storage system begins to deliver power according to a predetermined decision algorithm. This response is not instantaneous; the figure shows a corresponding drop in both grid power and load power until the entire system can respond. This delay underscores the complexity of integrating storage into the grid and the importance of carefully coordinated control mechanisms. A critical consideration in this scenario is the size of the storage system. The figure shows that storage capacity is inherently limited, and designing a system to handle the worst-case scenario can be prohibitively expensive. This constraint necessitates a balanced approach, one that considers both capacity and cost. An additional point of interest in
Figure 6 is the large variation at the cutoff of the storage system. Since the scenario focuses on handling forecasting only, this variation presents a challenge. However, it is worth noting that this problem can be addressed through a dedicated control system for the storage’s end operation. Such a system would provide more precise control over the storage’s discharge, enhancing both efficiency and reliability.
Scenario 4: PV-Battery System With Early Warning Algorithm for Energy Storage Activation and No Grid Operator Notification
Figure 9 illustrates scenario 4, which focuses on a PV field that is equipped with an energy storage system. This scenario provides a detailed examination of how the storage system operates in conjunction with forecasting information, particularly in response to impending cloud cover. In this scenario, the storage system begins delivering power based on the information provided by the forecasting system, acting in the short term before the clouds start to shed. This proactive response is a key feature of the scenario, and it has a notable impact on the system’s behavior. Unlike other scenarios where a drop in power might be observed, here, the load remains almost unaffected. This stability is a testament to the effectiveness of the combined use of storage and forecasting, enabling a more resilient and responsive energy system. However, it is essential to recognize the challenges and limitations associated with energy storage. Storage systems are not only expensive to purchase but also come with ongoing maintenance costs. Their cycles are limited, and they are often used for specific purposes, such as storing energy during the day and selling it at a higher price at night. These factors add complexity to the decision-making process around storage and must be carefully considered in the design and operation of a PV system with storage.
Scenario 5: PV-Battery System With Reactive Energy Storage Activation during Successive Cloud Transitions.
In scenario 5, depicted in
Figure 10, we examine the system’s reaction to consecutive cloud cover transitions affecting the PV field. The blue line, charting the PV output (Ppv), dips with each cloud’s passage, showing the system’s quick response to shifting shading. The red line tracks the battery power (PBat), demonstrating how the energy storage compensates for PV output fluctuations. Being activated with each cloud, the energy storage system helps to steady the photovoltaic power supply. The inset zooms in on the system’s forecasting ability, which accurately predicts cloud coverage and prompts the energy storage response. This functionality is key to the system’s proactive control and ability to maintain power supply stability amidst environmental changes.
Voltage Response across Different PV System Scenarios
Figure 11 displays the consolidated voltage response of the photovoltaic (PV) system under five different operational scenarios, each differentiated by color. This composite graph allows for a straightforward comparison of how the system’s voltage stability is influenced by cloud cover events and the implementation of energy storage and forecasting algorithms. Scenario 1, depicted by the blue line, shows the system’s voltage without any form of energy storage or forecasting. This scenario indicates the inherent instability in the absence of mitigation strategies. Scenario 2, represented by the red line, introduces energy storage that activates upon cloud detection. Here, the voltage response improves slightly, suggesting a reactive benefit to voltage stability. Scenario 3, depicted by the green line, features energy storage without the use of forecasting. This scenario’s voltage response indicates a different pattern of stability when the system can store and discharge energy but lacks predictive capabilities. Scenario 4, shown by the black line, combines energy storage with a forecasting algorithm, offering a more proactive approach to voltage stabilization. Scenario 5, marked by the cyan line, demonstrates the system’s behavior with reactive energy storage in response to successive cloud transitions. This scenario tests the system’s robustness in a dynamic environment, simulating the effect of rapidly changing cloud cover. In all, the figure underlines the importance of both predictive forecasting and energy storage in maintaining voltage stability against the variability of cloud cover, which is critical for ensuring the reliability and safety of the grid-connected PV system.
Verification and Statistical Analysis. To evaluate the impact of the proposed forecasting method on voltage stability, we conducted a simulation study that compares two scenarios: (1) a PV system without forecasting and (2) a PV system with forecasting. Five independent simulations were run for each scenario, and the average power output and standard deviation were recorded for each simulation. An independent samples t-test was performed to assess the difference in average power output between the two scenarios. The calculated p-value was 0.001174, indicating a statistically significant difference (p < 0.05). This suggests that the forecasting method has a significant impact on the average power output of the PV system. Furthermore, a power analysis was conducted to determine the adequacy of the sample size. With a desired power of 0.8 and a significance level of 0.05, the analysis indicated that a sample size of 5 per group was sufficient to detect a statistically significant difference, given the effect size calculated from the data. These findings provide evidence that the proposed forecasting method can significantly improve the average power output of a PV system, contributing to enhanced voltage stability and overall system performance.
7. Conclusions
In conclusion, this scientific article presents a novel, simple hybrid algorithm for PV power cast prediction, which combines the strengths of both physical and persistence methods while enabling quick calculations. The algorithm was successfully integrated into a comprehensive simulation model of a PV-battery system, which included Li-ion battery energy storage, DC/AC converters, and a PID controller. The objective of this integration was to evaluate the algorithm’s potential to enhance the quality of electricity supplied to the load and the national grid by intelligently utilizing the energy storage system during weather-induced fluctuations in PV power generation.
The results demonstrate that the algorithm effectively anticipated decreases in PV power output due to changing weather conditions, enabling the PID controller to proactively manage the Li-ion battery’s charging and discharging processes. Consequently, the energy stored in the battery was utilized to maintain a stable and reliable power supply when the PV power decreased. This successful implementation and evaluation of the simple hybrid algorithm showcases its potential to optimize the performance of renewable energy systems by effectively leveraging energy storage in response to weather-related variations in power generation. Furthermore, the statistical analysis conducted in the verification section, which yielded a p-value of 0.001174, confirms the significant impact of the proposed forecasting method on the average power output and voltage stability of the PV system, demonstrating its effectiveness quantitatively. The evaluation of the different scenarios demonstrated that without energy storage (Scenario 1), the system faced significant instability, emphasizing the need for effective forecasting. Incorporation of energy storage without the algorithm (Scenario 2) provided some relief, but the system still relied heavily on real-time grid adjustments. The use of the forecasting algorithm as an early warning system (Scenario 3 and 4) showed marked improvements in managing power supply and grid stability, highlighting the algorithm’s efficacy. Finally, Scenario 5, involving reactive energy storage during successive cloud transitions, demonstrated the system’s robustness and the critical role of forecasting in dynamic weather conditions.
This solution is far more important when there is no storage in the PV field as it is of low cost and provides a good response to short-term fluctuations; in this way, it helps the grid to be maintained at nominal values.
Furthermore, by highlighting the potential integration of our forecasting method with solar-powered fencing, we underline a significant advancement in the application of solar energy technologies. This aspect of our research not only broadens the scope of PV power forecasting but also showcases the practical implications of our work in enhancing the sustainability and efficiency of solar energy systems.
Overall, this study contributes to the development of sustainable and resilient power infrastructure and offers valuable insights for researchers and practitioners in the field of renewable energy and smart-grid technologies.