Suggestions for solar irradiance calculator on arbitrary tilted surface

136 views
Skip to first unread message

kobuki

unread,
Apr 21, 2019, 9:47:22 AM4/21/19
to weewx-user
Sorry if it might seem a bit off topic, but since I want to integrate this service in WeeWx, too, I thought it's the appropriate place after all. I'd like to add a solar power tracker that gives me the theoretical maximum output of irradiation on a surface in W/m2 that has an arbitrary tilt and rotation wrt south/north (depending on the hemisphere). I'm sure this has a Python solution already, I'm just not familiar enough with the subject to find it. Ultimately I want to estimate the theoretical max. output of our solar power system on the roof. For starters, I'd be content with calculation methods that ignore the inherent losses in the system (cables, inverter, panel temperature coefficients, etc).

Does anyone have pointers to start with?

Leon Shaner

unread,
Apr 21, 2019, 9:56:52 AM4/21/19
to weewx...@googlegroups.com
You can google for "solar panel angle of incidence" and you'll find some good articles which explain the math.
Suffice it to say, it works out that tracking the sun yields about 30% more power than the same panel in a fixed position, assuming consistent sun throughout the day.
HTH

Regards,
Leon
--
Leon Shaner :: Dearborn, Michigan (iPhone)

On Apr 21, 2019, at 9:47 AM, kobuki <nls...@gmail.com> wrote:

Sorry if it might seem a bit off topic, but since I want to integrate this service in WeeWx, too, I thought it's the appropriate place after all. I'd like to add a solar power tracker that gives me the theoretical maximum output of irradiation on a surface in W/m2 that has an arbitrary tilt and rotation wrt south/north (depending on the hemisphere). I'm sure this has a Python solution already, I'm just not familiar enough with the subject to find it. Ultimately I want to estimate the theoretical max. output of our solar power system on the roof. For starters, I'd be content with calculation methods that ignore the inherent losses in the system (cables, inverter, panel temperature coefficients, etc).

Does anyone have pointers to start with?

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

kobuki

unread,
Apr 21, 2019, 10:00:47 AM4/21/19
to weewx-user
Thanks for the quick heads up. To make it clear, I'm not looking for the math theory behind it, I'm trying to find an existing Python library or source code that I can integrate or use for writing the service. I want to track the energy production, we have a fixed setup. I'm not interested in sun tracking calculation now.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.

Leon Shaner

unread,
Apr 21, 2019, 10:37:17 AM4/21/19
to weewx...@googlegroups.com
Kabuki,

Ok. Do you already have a solar radiation detector?  If you know the solar radiation, and your fixed geo-location, the position of the sun can be calculated and the math I mentioned can be used to calculate the efficiency of your panel across the range of the sun's motion.
Seems like you should be looking for Astronomy-oriented projects which can track the sun's position from your geo-location.  Then the rest of the math is just the angle of incidence calculations that I mentioned.   Sorry I don't know of any projects that tie this together.

Here's an interesting lead:

https://www.researchgate.net/post/How_can_we_compute_solar_position_at_a_given_place_on_a_given_day_and_time

Regards,
\Leon
--
Leon Shaner :: Dearborn, Michigan (iPad Pro)



Regards,
Leon
--
Leon Shaner :: Dearborn, Michigan (iPad Pro)
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.

Leon Shaner

unread,
Apr 21, 2019, 10:56:51 AM4/21/19
to weewx...@googlegroups.com
Kobuki,

My other half (who is an avid physics/astronomy type) points out that there are two non-obvious factors here, one being "atmospheric extinction" and the other being "transparency."

Atmospheric extinction has to do with the fact that the sun's radiation has to go through more atmosphere at lower inclinations than when it is directly overhead.  A solar radiation detector will already be subject to atmospheric extinction, in that it will simply read lower when the sun is closer to the horizon, even on a completely clear day.   As an aside, I'd have to wonder how accurate solar radiation sensors are that don't have mechanical tracking to keep directly pointed at the sun.  :-/
Seems like that much of this discussion should be "on topic" for this group.  =D

Transparency, on the other hand is something that acts more like a filter, and as transparency varies, it has more pronounced effects on certain wavelengths vs. others.  Because solar panels do not react to the entire visible spectrum, transparency can have an even more dramatic effect on a panel's efficiency, than just how bright/clear it seems to the human eye.   :-/

From that, my takeaway is you probably need to factor in a UV sensor to account for transparency.

That forum I quoted would probably be a great place to get more input.  Plenty of PhD types over there.  =D

Good luck!  =D

Regards,
Leon
--
Leon Shaner :: Dearborn, Michigan (iPad Pro)

On Apr 21, 2019, at 10:37 AM, Leon Shaner <le...@isylum.org> wrote:

Kobuki,

Ok. Do you already have a solar radiation detector?  If you know the solar radiation, and your fixed geo-location, the position of the sun can be calculated and the math I mentioned can be used to calculate the efficiency of your panel across the range of the sun's motion.
Seems like you should be looking for Astronomy-oriented projects which can track the sun's position from your geo-location.  Then the rest of the math is just the angle of incidence calculations that I mentioned.   Sorry I don't know of any projects that tie this together.

Here's an interesting lead:

Leon
--
Leon Shaner :: Dearborn, Michigan (iPad Pro)

kobuki

unread,
Apr 21, 2019, 11:11:28 AM4/21/19
to weewx-user
Yeah, thanks for the insight. I'm aware of the various atmospheric models. I want to find something that has been a) proven useful for solar power predictions; b) has a working open source python implementation. While the scientific background is very interesting in itself, I don't intend to re-invent the wheel. I do have a fairly good solar and UV sensor for my VP2 weather station. An interesting fact, this spring the solar sensor W/m2 curve almost completely overlaps with the built-in solar model prediction (theoretical max. irradiation) in WeeWx, and we do have unobstructed clear sky and sunshine these days. So I'm hoping to do something similar with my solar power system.

I've found 2 worthy contenders in the subject so far:


I need to indulge myself in them a bit to see which might fit my needs the best. I think the first one might be better suited and it's also actively developed, but I just don't know yet.

Greg Troxel

unread,
Apr 21, 2019, 1:33:50 PM4/21/19
to kobuki, weewx-user
kobuki <nls...@gmail.com> writes:

> Yeah, thanks for the insight. I'm aware of the various atmospheric models.
> I want to find something that has been a) proven useful for solar power
> predictions; b) has a working open source python implementation. While the
> scientific background is very interesting in itself, I don't intend to
> re-invent the wheel. I do have a fairly good solar and UV sensor for my VP2
> weather station. An interesting fact, this spring the solar sensor W/m2
> curve almost completely overlaps with the built-in solar model prediction
> (theoretical max. irradiation) in WeeWx, and we do have unobstructed clear
> sky and sunshine these days. So I'm hoping to do something similar with my
> solar power system.

I wasn't aware there was a solar model in weewx. I have on my todo
list to compute the irradiance with a clear sky, and to graph measured
irradiance vs theoretical max.

I have seen irradiance values higher than what I believe theoretical max
is. On a completely clear day, no, but on days with some clouds. My
assumption -- with no good basis -- is that there is some sort of
lensing as the sun passes the cloud edge and there is a temporary
beyond-max excursion. This is part of why I want to graph the
fraction-of-max.

> I've found 2 worthy contenders in the subject so far:
>
> https://github.com/pvlib/pvlib-python/
> https://pypi.org/project/solprimer/
>
> I need to indulge myself in them a bit to see which might fit my needs the
> best. I think the first one might be better suited and it's also actively
> developed, but I just don't know yet.

Thanks for the links.

kobuki

unread,
Apr 21, 2019, 1:44:38 PM4/21/19
to weewx-user
Yes, on hot summer days I also see the sensor overshooting the prediction. It could of course be that the sensor drifted from its initial calibration, though the current weather might indicate it's not the case, but rather as you noted, it's some atmospheric effect in certain months/seasons.

In WeeWx, you need to add a new observation type, maxSolarRad which you need to append to the database columns and use in the skin config.

sam...@gmail.com

unread,
Apr 26, 2019, 10:26:03 PM4/26/19
to weewx-user
 I work in the PV industry, though I don't have much experience with weewx yet, and limited experience with python. That said, the calculation you are looking for is called a "transposition", and you are transposing from GHI (Global Horizontal Irradiance) from your horizontal sensor to what is called POA (Plane of Array) irradiance. That may help a bit with your searching.

Sandia's PV Array Performance Model is a set of equations that can describe nearly every part of a PV system's behavior: https://pvpmc.sandia.gov/modeling-steps/1-weather-design-inputs/plane-of-array-poa-irradiance/

It is partially (completely?) implemented in Python in the pvlib library: https://pvlib-python.readthedocs.io/en/stable/

I haven't used the library, though I do use a lot of tools that include calculations from the Sandia PVAPM.

kobuki

unread,
Apr 27, 2019, 7:54:07 AM4/27/19
to weewx-user
Thanks for the insight. I've already found pvlib-python, good to know it can be advised to use by professionals, too. I'd be fine using the theoretical max. irradiance, one of my aims is actually pre-drawing an enveloping curve representing the possible max. power output. For real time curves I can use the solar sensor (horizontal irradiance) of my weather station for some additional insight.
Reply all
Reply to author
Forward
0 new messages