modeling AC energy with minimal local weather data

76 views
Skip to first unread message

Randy Ellingson

unread,
Mar 3, 2020, 11:36:30 AM3/3/20
to pvlib-python
We have an array for which we have recorded AC energy, ambient air temperature, back-of-module temperature, GHI and POA irradiance.  We would like to use pvlib to model the AC energy based on a combination (or all) of the recorded parameters [GHI, POA, Air T, BOM T].  This way, we could compare the actual recorded AC power vs. the modeled power, and it would be interesting as an exercise to use e.g. only POA and Air T to see how well those observed values allow for calculation of the AC power/energy.  The question is whether we can insert our own "weather" data into the ModelChain approach, or do we need to use a different modeling approach/paradigm? 

The basis for the exercise is to ideally learn why our array's actual yield over a full year is significantly lower than a TMY3 weather model yields.  We have two full years of validated observed weather and performance data.

Our clearsky model works fairly well on cs days (within an average of 1.5%), but when we introduce TMY3 weather we find an overall discrepancy of ~25% between the actual energy yield and the modeled yield.

Thank you for any comments that can guide us.

Mark Mikofski

unread,
Mar 3, 2020, 1:13:33 PM3/3/20
to pvlib-python
Hi Randy,

If you want to use the ModelChain approach, I believe you can use prepare inputs for your weather:

According to the docs, if you skip wind speed it will be set to zero.

Since you only have GHI you will need to use one of the decomposition methods:
Perhaps someone else can answer how you would use POA in the the ModelChain, but if it isn't easy, you can build the model chain yourself, and just skip the decomposition and transposition steps and just use your measured POA directly. Follow the steps in the intro tutorial:

Since you have measured module temperature, you can either calculate cell temperature or use the measured temperature but adjust it to the cell using the SAPM model which you can find on the pvpmc website here:

NOTE: there is no function for this in pvlib - pr welcome, but it is given here:

Hope this is helpful!
-Mark

cwh...@sandia.gov

unread,
Mar 3, 2020, 3:42:32 PM3/3/20
to pvlib-python


On Tuesday, March 3, 2020 at 11:13:33 AM UTC-7, Mark Mikofski wrote:

Perhaps someone else can answer how you would use POA in the the ModelChain, but if it isn't easy, you can build the model chain yourself, and just skip the decomposition and transposition steps and just use your measured POA directly. Follow the steps in the intro tutorial:

Currently, it is not possible to use plane-of-array irradiance with ModelChain without writing custom replacements for the ModelChain.prepare_inputs and ModelChain.run_model methods. See discussion here and here

We really should add this capability to input POA irradiance and bypass prepare_inputs.

Cheers,

Cliff

Mark Mikofski

unread,
Mar 19, 2020, 8:49:35 PM3/19/20
to pvlib-python
for the record, there is already an open issue to address using POA in modelchain:

Using ModelChain with Plane of Array (POA) as weather input #536

Mark Mikofski

unread,
Mar 24, 2020, 1:20:02 PM3/24/20
to Randy Ellingson, pvlib-python
Hi Randy,

"Additionally, for what it's worth about POA-GHI-POA: SAM will decompose measured POA into constituent direct/diffuse components for shading calculation purposes, and in my experience the recombined POA is pretty close to the original (within a W/m2 or two). But I have no hard data to show for this."  

I believe this is in reference to Bill Marion's GTI-DIRINT method [1] which is implemented in pvlib python here:
https://pvlib-python.readthedocs.io/en/latest/generated/pvlib.irradiance.gti_dirint.html  

For the implementation in SAM [2], you will need to use PySAM [3] or the SAM SSC SDK [4] - unfortunately I can't help you with that, but you can find help on the SAM SDK forums [5]. You may also ask here on the pvlib forum or on Stack Overflow, perhaps using the [pvlib] tag, but I don't know if there is a [SAM] tag on Stack Overflow.

The pvlib python implementation of GTI-DIRINT is based on Bill Marion's paper, so it should be identical to the SAM version.

1. B. Marion, A model for deriving the direct normal and diffuse horizontal irradiance from the global tilted irradiance, Solar Energy 122, 1037-1046. DOI: 10.1016/j.solener.2015.10.024

Happy Coding!
-m

On Tue, Mar 24, 2020 at 9:33 AM Randy Ellingson <too...@yahoo.com> wrote:
Thank you, Mark.  This sounds promising:

"Additionally, for what it's worth about POA-GHI-POA: SAM will decompose measured POA into constituent direct/diffuse components for shading calculation purposes, and in my experience the recombined POA is pretty close to the original (within a W/m2 or two). But I have no hard data to show for this."

Can you perhaps point us to this decomposition emthod?  I am a novice, and did not find this in the pvlib-python readthedocs.

Thank you,

Randy

--
You received this message because you are subscribed to the Google Groups "pvlib-python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pvlib-python...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/pvlib-python/65bd4cd2-2632-4e9a-b7b5-1e84d50e0fe2%40googlegroups.com
.


--
Being deeply loved by someone gives you strength;
loving someone deeply gives you courage.
Lao Tzu

William Holmgren

unread,
Mar 24, 2020, 1:54:26 PM3/24/20
to Mark Mikofski, Randy Ellingson, pvlib-python
> The pvlib python implementation of GTI-DIRINT is based on Bill Marion's paper, so it should be identical to the SAM version.

I don't remember the details, but I ran into some issues when trying to faithfully implement the paper. I am pretty sure there are some differences with the SAM version.

Will

Randy Ellingson

unread,
Mar 26, 2020, 12:43:27 PM3/26/20
to pvlib-python
We're working on testing the decomposition, starting with some pyranometer POA irradiance on a nominally clear sky day, and running into an error:  TypeError:  Cannot join tz-naive with tz-aware DateTimeIndex.  Any suggestions on the easiest fix to allow the test to proceed?  Here's the code, below.  Many thanks, Randy.

import datetime as dt
import pandas as pd
import pvlib.solarposition as sp

from os import path

# Load the given pv data file.
def read_pv_file(file_path, set_index=True):

    # Raise error if file does not exist
    if not path.exists(file_path):
        raise PVIOError("'{}' does not exist.".format(file_path))

    # Read in recorded data
    pv_data = pd.read_csv(filepath_or_buffer=file_path,
                          names=['date', 'poa_global',
                                 'module temperature',
                                 'air temperature',
                                 'ac power', 'ghi'],
                          skiprows=2,
                          parse_dates=['date'])

    # Set index if specified
    if set_index:
        pv_data = pv_data.set_index(['date'])

    # Return data
    return pv_data

R1_Data = read_pv_file('Nominally Clear Sky Days/20160423MinuteLog.csv')

# print(len(R1_Data))

times = R1_Data.index.tz_localize('Etc/GMT+4')

solarpos = sp.get_solarposition(times,41.653207, -83.606533, 187)

surface_tilt = 35
surface_azimuth = 180

R1_aoi = pvlib.irradiance.aoi(surface_tilt, surface_azimuth, solarpos.zenith, solarpos.azimuth)

pvlib.irradiance.gti_dirint(R1_Data.poa_global, R1_aoi, solarpos.zenith, solarpos.azimuth, times, surface_tilt, surface_azimuth)

To unsubscribe from this group and stop receiving emails from it, send an email to pvlib-...@googlegroups.com.

To view this discussion on the web visit


--
Being deeply loved by someone gives you strength;
loving someone deeply gives you courage.
Lao Tzu

--
You received this message because you are subscribed to the Google Groups "pvlib-python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pvlib-...@googlegroups.com.

cwh...@sandia.gov

unread,
Mar 26, 2020, 2:19:54 PM3/26/20
to pvlib-python
My guess would be that the index for R1_Data is not localized. 

Cheers,

Cliff
Reply all
Reply to author
Forward
Message has been deleted
0 new messages