-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add JRC spectral factor correction #2088
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
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
6d1a414
create spectral_factor_jrc
RDaxini 46233c9
Update mismatch.py
RDaxini 4f2dffc
Update mismatch.py
RDaxini 193e5ce
Update pvlib/spectrum/mismatch.py
RDaxini 7fe6531
Update pvlib/spectrum/mismatch.py
RDaxini 33a6837
Update mismatch.py
RDaxini ab8ea66
Update mismatch.py
RDaxini 49ee2ae
Update mismatch.py
RDaxini 22fbedc
Update v0.11.0.rst
RDaxini 301c3ee
normalise coefficients
RDaxini 910bcb3
normalisation calc, test tolerance
RDaxini d943e4e
Merge remote-tracking branch 'upstream/main' into spectralfactor_jrc
RDaxini 2e4ddea
Update mismatch.py
RDaxini f03beb2
Update mismatch.py
RDaxini 628e3e3
Update pvlib/spectrum/mismatch.py
RDaxini 37ca870
Update mismatch.py
RDaxini 6c3b11b
Update v0.11.0.rst
RDaxini 555547f
Update mismatch.py
RDaxini c20d2f5
Update pvlib/spectrum/mismatch.py
RDaxini 502749b
Update mismatch.py
RDaxini e9e3549
Merge branch 'spectralfactor_jrc' of https://github.com/RDaxini/pvlib…
RDaxini dfdf218
Update mismatch.py
RDaxini File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -794,6 +794,116 @@ def spectral_factor_pvspec(airmass_absolute, clearsky_index, | |
return mismatch | ||
|
||
|
||
def spectral_factor_jrc(airmass, clearsky_index, module_type=None, | ||
coefficients=None): | ||
r""" | ||
Estimate a technology-specific spectral mismatch modifier from | ||
airmass and clear sky index using the JRC model. | ||
|
||
The JRC spectral mismatch model includes the effects of cloud cover on | ||
the irradiance spectrum. Model coefficients are derived using measurements | ||
of irradiance and module performance at the Joint Research Centre (JRC) in | ||
Ispra, Italy (45.80N, 8.62E). Coefficients for two module types are | ||
available via the ``module_type`` parameter. More details on the model can | ||
be found in [1]_. | ||
|
||
Parameters | ||
---------- | ||
airmass : numeric | ||
relative airmass. [unitless] | ||
|
||
clearsky_index: numeric | ||
clear sky index. [unitless] | ||
|
||
module_type : str, optional | ||
One of the following PV technology strings from [1]_: | ||
|
||
* ``'cdte'`` - anonymous CdTe module. | ||
* ``'multisi'`` - anonymous multicrystalline Si module. | ||
|
||
coefficients : array-like, optional | ||
user-defined coefficients, if not using one of the default coefficient | ||
sets via the ``module_type`` parameter. | ||
|
||
Returns | ||
------- | ||
mismatch: numeric | ||
spectral mismatch factor (unitless) which is multiplied | ||
with broadband irradiance reaching a module's cells to estimate | ||
effective irradiance, i.e., the irradiance that is converted to | ||
electrical current. | ||
|
||
Notes | ||
----- | ||
The JRC model parameterises the spectral mismatch factor as a function | ||
of air mass and the clear sky index as follows: | ||
|
||
.. math:: | ||
|
||
M = 1 + a_1(e^{-k_c}-e^{-1}) + a_2(k_c-1)+a_3(AM-1.5), | ||
RDaxini marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
where :math:`M` is the spectral mismatch factor, :math:`k_c` is the clear | ||
sky index, :math:`AM` is the air mass, :math:`e` is Euler's number, and | ||
:math:`a_1, a_2, a_3` are module-specific coefficients. The :math:`a_n` | ||
coefficients available via the ``coefficients`` parameter differ from the | ||
:math:`k_n` coefficients documented in [1]_ in that they are normalised by | ||
the specific short-circuit current value, :math:`I_{sc0}^*`, which is the | ||
expected short-circuit current at standard test conditions indoors. The | ||
model used to estimate the air mass (denoted as :math:`AM`) is not stated | ||
in the original publication. The authors of [1]_ used the ESRA model [2]_ | ||
to estimate the clear sky GHI for the clear sky index, which is the ratio | ||
of GHI to clear sky GHI. Also, prior to the calculation of :math:`k_c`, the | ||
irradiance measurements were corrected for angle of incidence using the | ||
Martin and Ruiz model [3]_. | ||
|
||
References | ||
---------- | ||
.. [1] Huld, T., Sample, T., and Dunlop, E., 2009. A simple model | ||
for estimating the influence of spectrum variations on PV performance. | ||
In Proceedings of the 24th European Photovoltaic Solar Energy | ||
Conference, Hamburg, Germany pp. 3385-3389. 2009. Accessed at: | ||
https://www.researchgate.net/publication/256080247 | ||
.. [2] Rigollier, C., Bauer, O., and Wald, L., 2000. On the clear sky model | ||
of the ESRA—European Solar Radiation Atlas—with respect to the Heliosat | ||
method. Solar energy, 68(1), pp.33-48. | ||
:doi:`10.1016/S0038-092X(99)00055-9` | ||
.. [3] Martin, N. and Ruiz, J. M., 2001. Calculation of the PV modules | ||
angular losses under field conditions by means of an analytical model. | ||
Solar Energy Materials and Solar Cells, 70(1), 25-38. | ||
:doi:`10.1016/S0927-0248(00)00408-6` | ||
""" | ||
|
||
_coefficients = {} | ||
_coefficients['multisi'] = (0.00172, 0.000508, 0.00000357) | ||
_coefficients['cdte'] = (0.000643, 0.000130, 0.0000108) | ||
# normalise coefficients by I*sc0, see [1] | ||
_coefficients = { | ||
'multisi': tuple(x / 0.00348 for x in _coefficients['multisi']), | ||
'cdte': tuple(x / 0.001150 for x in _coefficients['cdte']) | ||
} | ||
if module_type is not None and coefficients is None: | ||
coefficients = _coefficients[module_type.lower()] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm a bit in favour of handling |
||
elif module_type is None and coefficients is not None: | ||
pass | ||
elif module_type is None and coefficients is None: | ||
raise ValueError('No valid input provided, both module_type and ' + | ||
'coefficients are None. module_type can be one of ' + | ||
", ".join(_coefficients.keys())) | ||
else: | ||
raise ValueError('Cannot resolve input, must supply only one of ' + | ||
'module_type and coefficients. module_type can be ' + | ||
'one of' ", ".join(_coefficients.keys())) | ||
|
||
coeff = coefficients | ||
mismatch = ( | ||
1 | ||
+ coeff[0] * (np.exp(-clearsky_index) - np.exp(-1)) | ||
+ coeff[1] * (clearsky_index - 1) | ||
+ coeff[2] * (airmass - 1.5) | ||
) | ||
return mismatch | ||
|
||
|
||
def sr_to_qe(sr, wavelength=None, normalize=False): | ||
""" | ||
Convert spectral responsivities to quantum efficiencies. | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.