Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spectral Mismatch Calculation Integration Range #2295

Open
mandylewis opened this issue Nov 15, 2024 · 7 comments
Open

Spectral Mismatch Calculation Integration Range #2295

mandylewis opened this issue Nov 15, 2024 · 7 comments

Comments

@mandylewis
Copy link

As it is currently written, the calc_spectral_mismatch_field() function takes only the module spectral response (sr), the measured spectral solar irradiance (e_sun), and the reference spectrum (e_ref) as inputs. It then truncates the reference spectrum to the wavelength range of the measured spectrum to perform the SMM calculation, like so:

$$\frac{\int^{\lambda_2}_{\lambda_1} E_{sun}(\lambda) SR(\lambda)}{\int^{\lambda_2}_{\lambda_1} E_{ref}(\lambda) SR(\lambda)} \times \frac{\int^{\lambda_2}_{\lambda_1} E_{ref}(\lambda) }{\int^{\lambda_2}_{\lambda_1} E_{sun}(\lambda)}$$

where $\lambda_1$ and $\lambda_2$ are the wavelength range of the spectral irradiance measurement

I see that there was a discussion here concerning the addition of two more optional inputs, the total irradiance of the measured spectrum (e_sun_tot) and the reference spectrum (e_ref_tot), which would change this calculation to:

$$\frac{\int^{\lambda_2}_{\lambda_1} E_{sun}(\lambda) SR(\lambda)}{\int^{\lambda_2}_{\lambda_1} E_{ref}(\lambda) SR(\lambda)} \times \frac{ E_{ref,total} }{E_{sun,total}}$$

I'm curious, why wasn't this option included in the end?

As a follow-up question, in a case where we have co-located pyranometer GHI measurements with global spectral irradiance measurements, could the GHI measured by the pyranometer be used to replace $E_{sun,total}$? Is there a strong reason why not to do this if the sensors are time-synchronized and very near each other?

I'm interested because I've found that the long-wavelength absorption of clouds is actually significant for SMM values, and truncating the spectrum in the way that calc_spectral_mismatch_field() currently does would underestimate the SMM for silicon modules under cloudy conditions. I was hoping to use measured pyranometer data to capture this effect instead.

@adriesse, @RDaxini, do you have any comments?

@RDaxini
Copy link
Contributor

RDaxini commented Nov 15, 2024

Hey Mandy, an astute observation and a good question!

I'm curious, why wasn't this option included in the end?

I'm sure @adriesse will be able to provide a better answer as I was not part of the original implementation, but I had a scan through the discussion in #1524 and it seems to me that for the sake of simplicity it was implemented in this way with the appropriate caveat added to the docstring. I guess in (most?) situations people would be relying on spectral irradiance data alone, which typically not extend to 4000nm, in which case the truncation executed in this function would be required anyway.

could the GHI measured by the pyranometer be used to replace esun_total?

Wait for a second opinion, but I can't think of a reason why not.

I'm interested because I've found that the long-wavelength absorption of clouds is actually significant for SMM values, and truncating the spectrum in the way that calc_spectral_mismatch_field() currently does would underestimate the SMM for silicon modules under cloudy conditions. I was hoping to use measured pyranometer data to capture this effect instead.

Further developments are always welcome. If you think you could help improve the calc_spectral_mismatch_field() then I'd be happy to help you through the contribution process! Let's see what some others think about this.

@kandersolar
Copy link
Member

could the GHI measured by the pyranometer be used to replace $E_{sun,total}$?

Input from a non-expert: a problem may stem from whatever amount pyranometers deviate from being truly broadband devices. From some quick searching of pyranometer spectral response, I see curves dropping off around 3000 nm. That results in a nontrivial error for AM 1.5G:

import pvlib
import numpy as np

am15g = pvlib.spectrum.get_reference_spectra()['global']
pyranometer_sr_upper_limit = 3000 # nm
truncated = am15g.loc[:pyranometer_sr_upper_limit]

integral_total = np.trapz(am15g, x=am15g.index)
integral_pyranometer = np.trapz(truncated, x=truncated.index)

print(integral_pyranometer / integral_total)  # 0.9926325986183837

@markcampanelli
Copy link
Contributor

@mandylewis The primary reference cell calibration case that I was considering in my PR review used a direct-FOV cavity radiometer for the broadband sun measurement. This thermopile is typically “more ideal” with a higher cutoff wavelength than a wide-FOV pyranometer, due to the missing glass dome in the cavity device. In any case, working from first principles is the surest guide to knowing which integration limits should be what in the formula. I’d be happy to help sketch that out in further detail.

In terms of your concurrent broadband pyranometer and spectral irradiance measurements I have secondhand knowledge that says to be aware of the time-constant difference that may exist between their response times (thermopiles can be on the order of seconds as compared to comparatively much faster solid state detectors, although some spectroradiometers scan instead of snapshotting). Spectral correction errors may be higher during highly variable conditions due to instrument lag.

@mikofski
Copy link
Member

mikofski commented Nov 16, 2024

I recommend using the equation twice to calculate two spectral mismatch value, one for the PV device and another for the pyrometer. This requires having the spectral responses of both devices.
IMG_3985
This is from: Preliminary Investigation of
Methods for Correcting for
Variations in Solar Spectrum
under Clear Skies

@markcampanelli
Copy link
Contributor

To clarify my comment w.r.t. @mikofski‘s refinement of @mandylewis’s initial mismatch formula, when I spoke of a thermopile being “ideal”, this refers to both (1) its spectral response being perfectly constant (usually taken as one without loss of generality in spectral corrections where any scalar multiple typically (!) factors out in both numerator and denominator and thus cancels) AND (2) the wavelength limits of the response going from 0 to infinity. So, to the extent that one’s pyranometer is not ideal (it’s not!), then using @mikofski’s approach is indeed indicated.

Also, I cannot help but remind about the key assumption of Isc linearity w.r.t. total irradiance for any fixed spectrum.

@adriesse
Copy link
Member

adriesse commented Nov 16, 2024

I'm curious, why wasn't this option included in the end?

It was just a question of staying focused on the use case at hand.

As a follow-up question, in a case where we have co-located pyranometer GHI measurements with global spectral irradiance measurements, could the GHI measured by the pyranometer be used to replace E s u n , t o t a l ? Is there a strong reason why not to do this if the sensors are time-synchronized and very near each other?

If you have the synchronized parallel measurements, I would encourage you to try it and see what comes out!

I'm interested because I've found that the long-wavelength absorption of clouds is actually significant for SMM values, and truncating the spectrum in the way that calc_spectral_mismatch_field() currently does would underestimate the SMM for silicon modules under cloudy conditions. I was hoping to use measured pyranometer data to capture this effect instead.

Don't you have Spectrafy instruments? There would be no truncation using those.

Your findings sound interesting. Would you be able to propose a better assumption about the unmeasured portion of the spectrum?

@markcampanelli
Copy link
Contributor

Here is a spectral measurement extension technique based on how the NREL primary reference cell calibration lab extends their measured direct spectrum with a standard spectrum so that it integrates to the total irradiance measured by the direct cavity radiometer:

https://github.com/markcampanelli/pvfit/blob/main/pvfit/measurement/spectral_correction/computation.py#L201

It should also work reasonably for global measurements as done in the technique I presented at the recent PVPMC (note overcast days here also have a notably different spectral effect): https://github.com/markcampanelli/pvpmc2024/blob/main/poster/poster-final-mark-campanelli.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants