-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add Batzelis 2017 simple nonlinear PV model #2563
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 8 commits
d2d4d91
c674f1b
d8988c6
e24e62f
994a853
6f94408
1e61d09
7d431ab
839d0b5
0fde334
55cb1eb
e641956
e7ec33c
8becc1a
006ebb0
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
from scipy import constants | ||
from scipy import optimize | ||
from scipy.special import lambertw | ||
|
||
from pvlib.ivtools.utils import rectify_iv_curve | ||
from pvlib.ivtools.sde import _fit_sandia_cocontent | ||
|
@@ -399,3 +400,64 @@ def _fit_desoto_sandia_diode(ee, voc, vth, tc, specs, const): | |
new_x = sm.add_constant(x) | ||
res = sm.RLM(y, new_x).fit() | ||
return np.array(res.params)[1] | ||
|
||
|
||
def fit_desoto_batzelis(isc0, voc0, imp0, vmp0, alpha_sc, beta_voc): | ||
""" | ||
Determine De Soto single-diode model parameters from datasheet values | ||
using Batzelis's method. | ||
|
||
This method is described in Section II.C of [1]_. | ||
|
||
Parameters | ||
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 would prefer Do we want the STC parameters to have the same names as in pvsystem.sapm? I'm not a fan of the SAPM names, which derive from some old spreadsheet's column headings. But they are the same quantities. 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.
done
Me neither. |
||
---------- | ||
isc0 : float | ||
Short-circuit current at STC. [A] | ||
voc0 : float | ||
Open-circuit voltage at STC. [V] | ||
imp0 : float | ||
Maximum power point current at STC. [A] | ||
vmp0 : float | ||
Maximum power point voltage at STC. [V] | ||
alpha_sc : float | ||
Short-circuit current temperature coefficient at STC. [1/K] | ||
beta_voc : float | ||
Open-circuit voltage temperature coefficient at STC. [1/K] | ||
|
||
Returns | ||
------- | ||
dict | ||
The returned dict contains the keys: | ||
|
||
* ``alpha_sc`` [A/K] | ||
* ``a_ref`` [V] | ||
* ``I_L_ref`` [A] | ||
* ``I_o_ref`` [A] | ||
* ``R_sh_ref`` [Ohm] | ||
* ``R_s`` [Ohm] | ||
|
||
References | ||
---------- | ||
.. [1] E. I. Batzelis, "Simple PV Performance Equations Theoretically Well | ||
Founded on the Single-Diode Model," Journal of Photovoltaics vol. 7, | ||
no. 5, pp. 1400-1409, Sep 2017, :doi:`10.1109/JPHOTOV.2017.2711431` | ||
kandersolar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
""" | ||
t0 = 298.15 # K | ||
del0 = (1 - beta_voc * t0) / (50.1 - alpha_sc * t0) # Eq 9 | ||
w0 = np.real(lambertw(np.exp(1/del0 + 1))) | ||
|
||
# Eqs 11-15 | ||
a0 = del0 * voc0 | ||
Rs0 = (a0 * (w0 - 1) - vmp0) / imp0 | ||
Rsh0 = a0 * (w0 - 1) / (isc0 * (1 - 1/w0) - imp0) | ||
Iph0 = (1 + Rs0 / Rsh0) * isc0 | ||
Isat0 = Iph0 * np.exp(-1/del0) | ||
|
||
return { | ||
'alpha_sc': alpha_sc * isc0, # convert 1/K to A/K | ||
'a_ref': a0, | ||
'I_L_ref': Iph0, | ||
'I_o_ref': Isat0, | ||
'R_sh_ref': Rsh0, | ||
'R_s': Rs0, | ||
} |
Uh oh!
There was an error while loading. Please reload this page.