PV Modeling Tool
As part of my summer internship in 2024, I was helping to develop a Python modeling script to predict electrical output for proposed solar sites. See the GitHub page for more.
Problems with Common Solar Predictors
In today's world of solar, there are several widely used solar predictors - SAM, PVWatts, PVSyst, and HOMER, to name a few. For a simplified system model, these tools are perfectly functional.
But say you wanted to obtain an extremely precise prediction for annual electrical output. You'd find that these tools have several shortcomings. Most are based on average-case scenarios for the entire site, assuming uniform irradiance and a standard monofacial module.
Our Solution
Our solar team wanted to create a new type of solar predictor - one that took a more granular approach and analyzed a solar site on a row-by-row basis, rather than an average case for the entire site. This tool would generate a more accurate prediction for electrical output, and would also allow for improved optimizations. Based on the results from this tool, we could determine the best way to align the module rows and the most efficient grading plan to reduce costs and improve electrical output.
​
We also wanted to build a predictor for bifacial modules, as many current tools lack the capability to account for both sides of a panel on a single-axis tracker system. With this, we wanted to illustrate the monetary and electrical benefit of installing bifiacial modules instead of monofacial.
Integrating with Current Grading / Pile Plan Tool
Our solar team uses a tool called PVTune, which helps to determine the best grading layout and the reveal height for each module pile (height that the top of the pile sits above ground level). It determines the coordinates and elevation of each pile, which can in turn be used to determine the number of modules on that row and the axis tilt.
From here, I developed a Python script (pvtune.py) to analyze this massive data set. This script takes each row and characterizes it in several ways:
-
The reveal height, rounded up to the nearest quarter inch.
-
The relative location of the row (exterior or interior).
-
The axis tilt of the entire row, rounded to the nearest degree.
-
The number of modules on that row.
From here, rows were placed into buckets with rows having similar characteristics.
​
This step represents the granular analysis process on the site; rather than using an average-case for every single module row, we classify them separately to improve accuracy.
Model Chain Manipulation
The pvlib documentation gives an example model chain script for modeling a single bifacial module (see this link). From here, we made several specifications to determine a more accurate prediction for generation.
​
Firstly, the original modelchain uses a constant value for surface albedo; in reality, this value is likely to vary significantly at different times of the year, especially in areas that receive snowfall. To account for these changes, I developed an albedo time series function that would take historical weather data at the specified location, calculate the average monthly albedo, and store these values in a pandas dataframe. Whenever the modelchain runs, it pulls the associated albedo data from this dataframe and uses that during analysis.
​
In addition to albedo variability, I also accounted for how snowfall would affect the reveal height of the panels. Again, taking historical weather data from the meteostat library, I determined the average monthly snowfall at the specified location and adjusted the reveal height to account for this snowfall.
​
Finally, I made adjustments to calculate the annual energy generation, rather than generation over a few days. To do so, I run the modelchain for an entire day, every 10 days, for the entire year. It returns the cumulative energy output (in kWh) for those 36 days of the year, then adjusts the energy output to predict what the annual energy output will be.
​
This modelchain runs for each bucket, then multiplies the number of modules by the output for that single bucket module. Though slightly simplified, this structure generates a more accurate prediction for electrical output for the entire site.
Next Steps
compare to SAM and what the project specified