-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add 2025 coefficients for Huld model #2486
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
base: main
Are you sure you want to change the base?
Changes from all commits
4b66810
928207e
1833dc1
98846e6
241c272
79f490f
a5a5ae8
aa7d3ee
91da25c
140b55b
752ef05
0703ac1
889805b
57edf70
92b5cde
8b41911
89727f3
5052843
607938d
cafd131
d078e74
a23f5cd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -37,7 +37,7 @@ def pvefficiency_adr(effective_irradiance, temp_cell, | |||||||||||||||||
the reference conditions. [unitless] | ||||||||||||||||||
|
||||||||||||||||||
k_d : numeric, negative | ||||||||||||||||||
“Dark irradiance” or diode coefficient which influences the voltage | ||||||||||||||||||
"Dark irradiance" or diode coefficient which influences the voltage | ||||||||||||||||||
increase with irradiance. [unitless] | ||||||||||||||||||
|
||||||||||||||||||
tc_d : numeric | ||||||||||||||||||
|
@@ -225,24 +225,55 @@ def adr_wrapper(xdata, *params): | |||||||||||||||||
return popt | ||||||||||||||||||
|
||||||||||||||||||
|
||||||||||||||||||
def _infer_k_huld(cell_type, pdc0): | ||||||||||||||||||
def _infer_k_huld(cell_type, pdc0, k_version): | ||||||||||||||||||
r""" | ||||||||||||||||||
Get the EU JRC updated coefficients for the Huld model. | ||||||||||||||||||
|
||||||||||||||||||
Parameters | ||||||||||||||||||
---------- | ||||||||||||||||||
cell_type : str | ||||||||||||||||||
Must be one of 'csi', 'cis', or 'cdte' | ||||||||||||||||||
pdc0 : numeric | ||||||||||||||||||
Power of the modules at reference conditions [W] | ||||||||||||||||||
k_version : str | ||||||||||||||||||
Either '2011' or '2025'. | ||||||||||||||||||
|
||||||||||||||||||
Returns | ||||||||||||||||||
------- | ||||||||||||||||||
tuple | ||||||||||||||||||
The six coefficients (k1-k6) for the Huld model, scaled by pdc0 | ||||||||||||||||||
""" | ||||||||||||||||||
# from PVGIS documentation, "PVGIS data sources & calculation methods", | ||||||||||||||||||
# Section 5.2.3, accessed 12/22/2023 | ||||||||||||||||||
# The parameters in PVGIS' documentation are for a version of Huld's | ||||||||||||||||||
# equation that has factored Pdc0 out of the polynomial: | ||||||||||||||||||
# P = G/1000 * Pdc0 * (1 + k1 log(Geff) + ...) so these parameters are | ||||||||||||||||||
# multiplied by pdc0 | ||||||||||||||||||
huld_params = {'csi': (-0.017237, -0.040465, -0.004702, 0.000149, | ||||||||||||||||||
0.000170, 0.000005), | ||||||||||||||||||
'cis': (-0.005554, -0.038724, -0.003723, -0.000905, | ||||||||||||||||||
-0.001256, 0.000001), | ||||||||||||||||||
'cdte': (-0.046689, -0.072844, -0.002262, 0.000276, | ||||||||||||||||||
0.000159, -0.000006)} | ||||||||||||||||||
if k_version.lower() == 'pvgis5': | ||||||||||||||||||
# coefficients from PVGIS webpage | ||||||||||||||||||
huld_params = {'csi': (-0.017237, -0.040465, -0.004702, 0.000149, | ||||||||||||||||||
0.000170, 0.000005), | ||||||||||||||||||
'cis': (-0.005554, -0.038724, -0.003723, -0.000905, | ||||||||||||||||||
-0.001256, 0.000001), | ||||||||||||||||||
'cdte': (-0.046689, -0.072844, -0.002262, 0.000276, | ||||||||||||||||||
0.000159, -0.000006)} | ||||||||||||||||||
elif k_version.lower() == 'pvgis6': | ||||||||||||||||||
# Coefficients from EU JRC paper | ||||||||||||||||||
huld_params = {'csi': (-0.0067560, -0.016444, -0.003015, -0.000045, | ||||||||||||||||||
-0.000043, 0.0), | ||||||||||||||||||
'cis': (-0.011001, -0.029734, -0.002887, 0.000217, | ||||||||||||||||||
-0.000163, 0.0), | ||||||||||||||||||
'cdte': (-0.020644, -0.035316, -0.003406, 0.000073, | ||||||||||||||||||
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.
Suggested change
|
||||||||||||||||||
-0.000141, 0.000002)} | ||||||||||||||||||
else: | ||||||||||||||||||
raise ValueError(f'Invalid k_version={k_version}: must be either ' | ||||||||||||||||||
'"pvgis5" or "pvgis6"') | ||||||||||||||||||
k = tuple([x*pdc0 for x in huld_params[cell_type.lower()]]) | ||||||||||||||||||
return k | ||||||||||||||||||
|
||||||||||||||||||
|
||||||||||||||||||
def huld(effective_irradiance, temp_mod, pdc0, k=None, cell_type=None): | ||||||||||||||||||
def huld(effective_irradiance, temp_mod, pdc0, k=None, cell_type=None, | ||||||||||||||||||
k_version='pvgis5'): | ||||||||||||||||||
r""" | ||||||||||||||||||
Power (DC) using the Huld model. | ||||||||||||||||||
|
||||||||||||||||||
|
@@ -274,6 +305,11 @@ def huld(effective_irradiance, temp_mod, pdc0, k=None, cell_type=None): | |||||||||||||||||
cell_type : str, optional | ||||||||||||||||||
If provided, must be one of ``'cSi'``, ``'CIS'``, or ``'CdTe'``. | ||||||||||||||||||
Used to look up default values for ``k`` if ``k`` is not specified. | ||||||||||||||||||
k_version : str, optional | ||||||||||||||||||
Either ``'pvgis5'`` (default) or ``'pvgis6'``. Selects values | ||||||||||||||||||
for ``k`` if ``k`` is not specified. If ``'pvgis5'``, values are | ||||||||||||||||||
from PVGIS documentation and are labeled in [2]_ as "current". | ||||||||||||||||||
If ``'pvgis6'`` values are from [2]_ labeled as "updated". | ||||||||||||||||||
Comment on lines
+309
to
+312
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.
Suggested change
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'll not take this suggestion as the phrasing implies that a value of |
||||||||||||||||||
|
||||||||||||||||||
Returns | ||||||||||||||||||
------- | ||||||||||||||||||
|
@@ -328,14 +364,19 @@ def huld(effective_irradiance, temp_mod, pdc0, k=None, cell_type=None): | |||||||||||||||||
|
||||||||||||||||||
References | ||||||||||||||||||
---------- | ||||||||||||||||||
.. [1] T. Huld, G. Friesen, A. Skoczek, R. Kenny, T. Sample, M. Field, | ||||||||||||||||||
E. Dunlop. A power-rating model for crystalline silicon PV modules. | ||||||||||||||||||
Solar Energy Materials and Solar Cells 95, (2011), pp. 3359-3369. | ||||||||||||||||||
:doi:`10.1016/j.solmat.2011.07.026`. | ||||||||||||||||||
.. [1] T. Huld, G. Friesen, A. Skoczek, R. Kenny, T. Sample, M. Field, and | ||||||||||||||||||
E. Dunlop, "A power-rating model for crystalline silicon PV | ||||||||||||||||||
modules," Solar Energy Materials and Solar Cells 95, (2011), | ||||||||||||||||||
pp. 3359-3369. :doi:`10.1016/j.solmat.2011.07.026`. | ||||||||||||||||||
.. [2] A. Chatzipanagi, N. Taylor, I. Suarez, A. Martinez, T. Lyubenova, | ||||||||||||||||||
and E. Dunlop, "An Updated Simplified Energy Yield Model for Recent | ||||||||||||||||||
Photovoltaic Module Technologies," | ||||||||||||||||||
Progress in Photovoltaics: Research and Applications 33, | ||||||||||||||||||
no. 8 (2025): 905–917, :doi:`10.1002/pip.3926`. | ||||||||||||||||||
""" | ||||||||||||||||||
if k is None: | ||||||||||||||||||
if cell_type is not None: | ||||||||||||||||||
k = _infer_k_huld(cell_type, pdc0) | ||||||||||||||||||
k = _infer_k_huld(cell_type, pdc0, k_version) | ||||||||||||||||||
else: | ||||||||||||||||||
raise ValueError('Either k or cell_type must be specified') | ||||||||||||||||||
|
||||||||||||||||||
|
@@ -346,7 +387,10 @@ def huld(effective_irradiance, temp_mod, pdc0, k=None, cell_type=None): | |||||||||||||||||
logGprime = np.log(gprime, out=np.zeros_like(gprime), | ||||||||||||||||||
where=np.array(gprime > 0)) | ||||||||||||||||||
# Eq. 1 in [1] | ||||||||||||||||||
pdc = gprime * (pdc0 + k[0] * logGprime + k[1] * logGprime**2 + | ||||||||||||||||||
k[2] * tprime + k[3] * tprime * logGprime + | ||||||||||||||||||
k[4] * tprime * logGprime**2 + k[5] * tprime**2) | ||||||||||||||||||
pdc = gprime * ( | ||||||||||||||||||
pdc0 + k[0] * logGprime + k[1] * logGprime**2 + | ||||||||||||||||||
k[2] * tprime + k[3] * tprime * logGprime + | ||||||||||||||||||
k[4] * tprime * logGprime**2 + | ||||||||||||||||||
k[5] * tprime**2 | ||||||||||||||||||
) | ||||||||||||||||||
return pdc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.