OK guys, clearly I’m bad at naming things, but at least my titles are descriptive. The “PC based Arduino Sun Harvester Program Interface / Solar Radiation Data Analysis Program Update” is exactly what it sounds like, it’s an update to a PC based program that I put together about one year ago that is able to do two things, interface with the Arduino Sun Harvester Program and also help you figure out how much energy you can get from heliostats, stationary collectors, or dual axis sun trackers.
Strictly speaking, the Arduino interface portion of the program has not been modified (although it needs to be); however, massive changes have been made to the “Solar Radiation Data Analysis” parts of the program.
This update was due in large part to sponsoring from Light Manufacturing LLC, so a big thanks to them is in order.
In addition to being able to calculate the amount of energy gathered from heliostats, the program is now capable of calculating how much energy is gathered from stationary collectors (solar panels, windows, or solar hot water heaters for example) and dual axis sun trackers.
Options to remove losses when collecting the sun’s energy have also been added to the program. These losses can include energy lost due to shading, light reflected from the glass surface (stationary collectors only), or more general static losses (a solar panel might only convert 20% of the sun’s energy to electricity for example).
A few additional changes have been thrown into the mix including a simple algorithm that calculates the “best” target angles or collector orientation, a basic heliostat array generator, and an output unit converter.
Downloading the Program
The program can be downloaded from this page on the forums and is found as an attachment on the first post. Note that it wouldn’t be a bad idea to scroll through the thread to make sure that the program hasn’t been updated since this page was first written or to learn of any potential bugs.
Fair Warning: This program is still technically in the BETA stages, and I make no guarantee regarding the validity of its output.
Using the New Solar Radiation Analysis Tools
We won’t cover the Arduino interface parts of this program since they have already been described in the video found at the top of the original forum thread. What we will instead focus on are the new Solar Radiation Data Analysis features that have been added.
To access these features, click on “Tools” in the upper left side of the main window and then click “Solar Radiation Data Analysis”.
After the “Solar Radiation Data Analysis” option has been clicked, the below window will open.
Downloading and Loading the Solar Radiation Data
Before you can start, you will first need to load your local solar radiation data. Assuming you are in the United States, you will be able to find this data on the NREL website. Here is the weblink. You will likely see several years worth of data. Go ahead and download all of them to a folder. Note that not all of the data will necessarily be valid, as is described in the video.
If you don’t live inside the United States, you can still do some rough calculations by finding a U.S. city with similar latitude and climate to your own.
Once you have your solar radiation data, you can load it into the program by clicking the “Load Solar Radiation CSV File” button and selecting one of the data files you downloaded in the previous step.
Selecting the Time of Year to Generate Data and Graphs
You have three options for selected which time frame to generate the data and graphs. You can generate it for the entire year, for a single month, or for just a single day of a month.
If you choose to generate the data for a year, the output will be of the total amount of energy gathered for each month of the year.
If you choose to generate the data for a month, the output will be the total amount of energy gathered for each day of the month.
If you choose to generate the data for a day, the output will be the total amount of energy gathered for each hour of the day. Note that some days will be cloudy, and thus will have an output of zero.
Adding Multiple Heliostats, Collectors, or Sun Trackers
It is possible to input parameters for multiple heliostats, collectors, or sun trackers simply by adding more lines to the text box located at the left middle of the window.
If you are in Heliostat Mode, the heading for this window will be “Target Alt, Target Az, Mirror Area (m^2)“. So to input the values;
Target Altitude = 0
Target Azimuth = 0
Mirror Area = 1
you would simply type the following into the text box, 0,0,1.
If you are in Stationary Collector Mode, the heading for this window will be “Collector Alt, Collector Az, Area (m^2)“. So to input the values;
Collector Altitude = 0
Collector Azimuth = 0
Collector Area = 1
you would simply type the following into the text box, 0,0,1.
If you are in Dual Axis Sun Tracker Mode, the heading for this window will be “put 0, put 0, Area (m^2)“. Note that a dual axis sun tracker points directly at the sun, so inputting altitude and azimuth values is unnecessary here. You can technically use any value for these, but for the sake of simplicity, just use zero.
So, if the sun tracker has a 1 m^2 surface, you would only need to type the following into the text box, 0,0,1.
Selecting Individual Heliostats, Collectors, or Sun Trackers
You can select individual heliostats, collectors or sun trackers from the parameter list by clicking on its respective line. The output for that line will then be highlighted when the “Calculate for Single Heliostat (or Collector, or Tracker)” button is clicked. Note: There is a small bug here which causes the line to not always be selected on the first try. If this happens, just select it again and recalculate the data.
Compensating for Energy Losses
In a perfect world, 100% of the light that falls on the surface of your collector would be converted to useful energy. That’s never the case though, and the unfortunate truth is that you will typically lose energy at multiple stages along the way. Exactly what these “stages” are will vary from situation to situation.
If you look under the “Energy Losses” heading, you will see the textbox where you can input how efficient your energy collection process is. By default, it displays 100, which means that it is 100% efficient. So in this case, 100% percent of the energy that falls on the surface of the collector is turned into useful energy. Try leaving it at 100 and calculating the graph for either single or multiple machines.
If you change the 100 to 90 (or any other number) and recalculate the graphs, you will see that the graphs shrink, meaning that less energy was collected.
In most cases energy is lost in more than one way. For example, let’s say someone built a field of heliostats that uses the focused light to power a steam engine. We will assume that the heliostat mirrors absorb 10% of the incoming light and that the steam engine is only able to convert 50% of the energy that falls on it into usable horsepower.
So in the first step, the heliostat is only 90% efficient.
In the second step, the steam engine is only 50% efficient.
To input these values into the program, simply put 90 on the first line and 50 on the second. When you next calculate how much energy is gathered, the program will automatically remove the energy that was lost from the total.
Although we only had two losses in this example, you can input as many as you wish simply by adding more and more lines.
Remove Light Reflected from the Collector’s Surface
For a stationary collector, the energy lost due to light reflecting off of its glass surface can become quite significant as the angle between the sun’s vector and the collector’s normal vector gets larger and larger.
You can compensate for the energy lost due to reflected light simply by selecting the “Remove Reflected Light” check box. The lost energy will be removed the next time you graph the data.
You will also notice that you have the option to change the values for n1 and n2. These values are the refractive indices for air (n1) and glass (n2). It is fine to just leave these values unchanged, but if you happen to know the exact refractive index for the glass on your collector, go ahead and use it for n2.
Note: The equations for calculating the amount of energy lost was taken from the Fresnel Equations page on Wikipedia.
Converting to Different Units
If you wish to display the data in units other the kWh, select the “Convert Units” checkbox at the bottom left of the page. The default conversion is from kWh to btu, but you can input whatever conversion you like.
For example, if you wanted to convert the numbers from kWh to joules, you would start by first looking up how many joules are in 1 kWh. (Google can do this for you if you just type “1 kWh to joules” in the search bar.)
1 kWh = 3600000 joules, so by inputting 360000 in the first textbox and “joules” in the second textbox, you will change the conversion from btu to joules.
Heliostat Mode, Stationary Collector Mode, and Dual Axis Sun Tracker Mode
Just below the “Load Solar Radiation CSV File” button, you will find a dropdown box where you can select which mode to run the program in. There are three choices, Heliostat Mode, Stationary Collector Mode, and Dual Axis Sun Tracker Mode.
As you experiment with selecting the different modes, you will notice that the displayed options will change.
Here are the displayed tabs for Heliostat Mode.
These tabs are displayed for Stationary Collector Mode.
And finally, these are the tabs that are displayed for Dual Axis Sun Tracker Mode.
For brevity, we will treat tabs which are either identical or nearly identical in all three modes as one, even though their names may change slightly in each case.
CSV DATA Tab
The CSV DATA tab displays the loaded CSV file. You can’t do much here except perhaps double check that the data you loaded is in the correct format. It should look similar to what is in the below image.
The Single Heliostat / Collector / Tracker Tab
The first tab to the right of the CSV DATA tab displays the graph and data calculated for either a single heliostat, single collector, or single tracker, depending on which mode is selected.
Example output is shown below. This tab should open automatically when the “Calculate for Single Heliostat (/ Collector / Tracker)” button is pushed.
The Heliostat Array / All Collectors / All Trackers Tab
The second tab to the right of the CSV DATA tab displays the graph and data calculated for either the whole heliostat array, all of the collectors, or all of the trackers, depending on which mode is selected.
This tab will open automatically when the Calculate for Full Array / All Collectors / All Trackers button is pushed. Note that this may take awhile to complete if you have a long list of heliostats, collectors, or trackers.
The output is in the same format as the Single Heliostat (/ Collector / Tracker) tab shown in the previous picture.
The Optimum Target Finder / Optimum Collector Orientation Finder Tab
The “Optimum Target Finder” tab will output either the “best” target altitude and azimuth angles or the “best” collector orientation angles for the selected period of time (Year, Month, or Day). You’ll notice that the word “best” is inside quotation marks here. Strictly speaking, finding the absolute perfect angles is a practical impossibility in most cases, but we can still get a pretty darn good approximation.
Technically, if your heliostat / collector is in an unshaded desert with no clouds in sight for the majority of the year, these optimum values could be found analytically using just your latitude and the sun’s declination. Once you start adding in cloud cover, though, this method can start to become less accurate. When you also start adding in shading from objects like buildings, mountains, and trees, then analytical methods becomes more and more unwieldy.
The Optimum Target / Collector Orientation Finder can be set to find the optimum values for either a year, a month, or for a single day by selecting Year, Month, or Day in the “Generate Data for:” drop down box.
Naturally, the optimum values will change depending on the time of year because the sun’s path through the sky is different from one month to the next.
The controls for the Optimum Target / Collector Orientation Finder are as follows.
The “Number of Iterations” textbox sets how many attempts the program will take to try and find the best values before automatically stopping. You are able to stop the program while it’s running at any point, so go ahead and choose a large value here.
You can also preset the “Target / Collector Altitude” and “Target / Collector Azimuth” values before running the program. If you try and input values that you think are already close to the optimum values, you can decrease how long it takes the program to find them.
Once you have these three values set, go ahead and start the algorithm by clicking the “Find Best Target / Angles” button.
As the program runs, you will notice that the Target / Collector angles will change over time. Eventually, the program should hone in on the “best” angle values. It won’t be immediately obvious when it has done this, but you’ll be able to tell when the numbers stop changing.
The Optimum Target / Collector Orientation finder uses a simple hill climbing algorithm to find the values for the angles. This type of algorithm is of the quick and dirty variety. It works perfectly fine in the majority of cases, but there are still some situations where it might get “stuck” on the wrong set of optimum angles.
This isn’t easy to do, but if your heliostat / collector is shaded during several different times of the day with breaks of good sun in between, it wouldn’t be a bad idea to experiment with different azimuth values at the start of the program to see if that changes what values the program determines are the best.
If you do get multiple sets of values, record them and then try them out to see which returns the most energy.
Note that this tab is unused when Dual Axis Sun Tracker Mode is active because a sun tracker is always moving to point at the sun and thus doesn’t have stationary altitude, azimuth values.
Heliostat Array Generator
The Array Layout tab is where you can automatically generate heliostat arrays. This option allows you to get a good approximation for how much energy is available to a large number of heliostats working together.
Note that the program does not compensate for energy lost due to one heliostat shading another. This is not an issue if your heliostats are spaced far enough apart, but if you have many of them crammed together the calculations will become less accurate.
There are four ways to generate heliostat arrays:
- Generate as Grid
- Generate as Circle around 1st Heliostat
- Generate as Circle around Target
- Generate from Heliostat Locations Text Box
Each of these options can be selected by using the drop down box on the left side.
Generate as Grid
The “Generate as Grid” option allows you to generate an array of heliostats as a grid in the shape of either a square or a rectangle.
The settings for the “Generate as Grid” option are as follows.
Area of Mirrors (m^2)
The area of mirrors option allows you to input the size of the mirrors for the heliostats. You will notice that changing this option will change the size of the circles when you click the “Draw It” button. These circles represent the amount of space that the heliostats take up.
Height of Target (m)
The “Height of Target (m)” is the distance the target is from the height you have chosen to be zero. So for example, if your heliostats are set on a flat field, then you may as well choose the ground as the zero height. If your heliostats are set on a slope however, then you will have to arbitrarily choose a zero height and make all of your measurements from there. Typically, I choose the lowest point as the zero height.
The “Spacing (m)” changes how far apart the heliostats are placed from one another. Obviously, if you don’t have a large enough spacing then the heliostats will collide with one another. You can tell that this is the case if the circles overlap with one another after you click the “Draw It” button.
Center of Array: X (m)
The “Center of Array: X (m)” option allows you to set the X coordinate for the center of the heliostat array. Note that the target is considered to be the location where the X coordinate is zero. The red circle in the center represents the circle.
Center of Array: Y (m)
The “Center of Array: Y (m)” option allows you to set the Y coordinate for the center of the heliostat array. Note that the target is considered to be the location where the Y coordinate is zero. The red circle in the center represents the circle.
Height of Heliostats
The “Height of Heliostats” option allows you to change the height for the heliostats. In general, I leave this value set to 0.
Number of Heliostats Per Row
The “Number of Heliostats Per Row” option allows you to set how many heliostats are in each row of the array.
Number of Rows
The “Number of Rows” option allows you to change how many rows are in the array. So the total number of heliostats in the array will be the number of heliostats per row times the number of rows.
The Draw It Button
The “Draw It” button will generate the array when clicked. Notice that both the Target Alt, Target Az, Mirror Area (m^2) text box and Heliostat Locations (X,Y,Z) textbox are filled with values after it is clicked. These values are of the target altitude and azimuth angles along with the position of each of the heliostats with respect to the target.
Generate as Circle around 1st Heliostat
The “Generate as Circle around 1st Heliostat” option will allow you to specify the location of the first heliostat and then automatically draw the rest of the heliostats in a circular pattern that uses the first heliostat as the center.
The parameters that you can customize are largely the same as those used under the “Generate as Grid” option described above, so they won’t be repeated here.
The only new parameter is the “Generate Heliostats Above East-West Line“. When it is left unchecked (default) the heliostats will not be placed above the East-West line, so if you are generating larger arrays it may take the form of only a partial circle.
Generate as Circle around Target
The “Generate as Circle around Target” option is almost identical to the “Generate as Circle Around 1st Heliostat” option described above. The only difference is that the array is automatically centered around the target. Note that the first heliostat is not placed on top of the target.
Generate from Heliostat Locations Text Box
The “Generate from Heliostat Locations Text Box” option allows you to manually type in the location of each of the heliostats in your array and then generate that array using the Draw It button.
This is different from the previously described options in that the program isn’t what is generating the shape of the arrays, you are. Note that you could also use this input option to test arrays that have been generated by your own programs.
Compensating for Shading
The “Shading” tab allows you to remove energy lost due to shading of your heliostat, sun tracker, or solar collector.
To do this, you must physically go out and measure the angle locations of any obstructions that might cast a shadow on your heliostat, sun tracker, or solar collector. You can determine these angles by putting together your own Printable Solar Assessment Tool like the one I have on this page.
After aligning the tool, you can go through and get rough altitude measurements of the top of any obstructions located at the azimuth angles listed in the Shade Table.
If you wish to save the table for later use, simply click the “Save Shade Table” button and choose where you want to save it. When you want to load it back in, just click the “Load Shade Table” button and find the saved file again.
Note that the Shade Table will be ignored when you do your solar radiation data analysis unless you check off the “Remove Energy Lost to Shading” option located in the bottom left corner of the window.