Skip to content

Clarify Egref and dEgdT values, changes calcparams_desoto api #471

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 27 commits into from
Jun 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
bf5e3cf
Fix total_irrad docstring
cwhanse Feb 12, 2018
5d5afde
Merge pull request #1 from cwhanse/total_irrad-docstring
cwhanse Feb 12, 2018
beadc8d
Correct formatting in irradiance.py; update whatsnew.rst
cwhanse Feb 12, 2018
767a466
Merge pull request #2 from cwhanse/total_irrad-docstring
cwhanse Feb 12, 2018
fcc7fd5
Update irradiance.py
cwhanse Feb 13, 2018
20d9722
update CEC module and inverter files
cwhanse Mar 29, 2018
e03c304
Add files via upload
cwhanse Mar 29, 2018
674fdc7
Change pvsystem.calcparams_desoto API to keywords, add _build_kwargs …
cwhanse May 31, 2018
d883a3b
Change signature of pvsystem.calcparams_desoto to all keyword argumen…
cwhanse May 31, 2018
a906ce6
Change signature of pvsystem.calcparams_desoto to all keyword argumen…
cwhanse May 31, 2018
a371544
adding irradiance.py
cwhanse Jun 1, 2018
6197d99
fix merge conflict
cwhanse Jun 1, 2018
b7114ec
fix merge conflict in irradiance.py
cwhanse Jun 1, 2018
b3508c3
fix merge conflict in cec inverter file
cwhanse Jun 1, 2018
c3fc630
fix merge conflicts
cwhanse Jun 1, 2018
aa45275
fix typo in test_pvsystem.test_calcparams_desoto
cwhanse Jun 1, 2018
43b912c
Correct test condition
cwhanse Jun 1, 2018
aafde7c
correct alpha_isc to alpha_sc
cwhanse Jun 1, 2018
bdb212a
update test_singlediode_** for change in calcparams_desoto api
cwhanse Jun 1, 2018
ee7c217
"Fix merge conflict"
cwhanse Jun 4, 2018
869b09a
Change units on effective_irradiance input to calcparams_desoto from …
cwhanse Jun 4, 2018
8d8fc14
Correct irradiance units in test_singlediode_series_ivcurve
cwhanse Jun 4, 2018
558d10e
Updates to pvsystem tutorial, modelchain documentation, whatsnew
cwhanse Jun 4, 2018
97d9477
Edit whatsnew text, add graceful exit from calcparams_desoto if old a…
cwhanse Jun 5, 2018
8ca98b6
Edits to warning messages in calcparams_desoto
cwhanse Jun 5, 2018
88584a4
Improve comments
cwhanse Jun 6, 2018
a5c3b2c
Improve comments
cwhanse Jun 6, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/sphinx/source/modelchain.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.1"
"version": "3.6.4"
}
},
"nbformat": 4,
Expand Down
5 changes: 3 additions & 2 deletions docs/sphinx/source/whatsnew/v0.6.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ v0.6.0 (___, 2018)

API Changes
~~~~~~~~~~~

* pvsystem.calcparams_desoto now requires arguments for each module model parameter.


Enhancements
~~~~~~~~~~~~
* Add sea surface albedo in irradiance.py (:issue:`458`)
* Implement first_solar_spectral_loss in modelchain.py (:issue:'359')
* Implement first_solar_spectral_loss in modelchain.py (:issue:`359`)
* Clarify arguments Egref and dEgdT for calcparams_desoto (:issue:`462`)


Bug fixes
Expand Down
2,174 changes: 1,052 additions & 1,122 deletions docs/tutorials/pvsystem.ipynb

Large diffs are not rendered by default.

166 changes: 90 additions & 76 deletions pvlib/pvsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,16 +279,16 @@ def physicaliam(self, aoi):

return physicaliam(aoi, **kwargs)

def calcparams_desoto(self, poa_global, temp_cell, **kwargs):
def calcparams_desoto(self, effective_irradiance, temp_cell, **kwargs):
"""
Use the :py:func:`calcparams_desoto` function, the input
parameters and ``self.module_parameters`` to calculate the
module currents and resistances.

Parameters
----------
poa_global : float or Series
The irradiance (in W/m^2) absorbed by the module.
effective_irradiance : numeric
The irradiance (W/m2) that is converted to photocurrent.

temp_cell : float or Series
The average cell temperature of cells within a module in C.
Expand All @@ -300,11 +300,12 @@ def calcparams_desoto(self, poa_global, temp_cell, **kwargs):
-------
See pvsystem.calcparams_desoto for details
"""
return calcparams_desoto(poa_global, temp_cell,
self.module_parameters['alpha_sc'],
self.module_parameters,
self.module_parameters['EgRef'],
self.module_parameters['dEgdT'], **kwargs)

kwargs = _build_kwargs(['a_ref', 'I_L_ref', 'I_o_ref', 'R_sh_ref',
'R_s', 'alpha_sc', 'EgRef', 'dEgdT'],
self.module_parameters)

return calcparams_desoto(effective_irradiance, temp_cell, **kwargs)

def sapm(self, effective_irradiance, temp_cell, **kwargs):
"""
Expand Down Expand Up @@ -944,75 +945,60 @@ def physicaliam(aoi, n=1.526, K=4., L=0.002):
return iam


def calcparams_desoto(poa_global, temp_cell, alpha_isc, module_parameters,
EgRef, dEgdT, M=1, irrad_ref=1000, temp_ref=25):
def calcparams_desoto(effective_irradiance, temp_cell,
alpha_sc, a_ref, I_L_ref, I_o_ref, R_sh_ref, R_s,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will repeat my preference for spelling out most of these arguments in the function signature as in i_from_v. It would require adding some mapping function within PVSystem.calcparams_desoto but I think that's worth it for more descriptive argument names. The descriptive parameter names could be reassigned to the short names to keep the equations more readable.

The abbreviated names are still an improvement to the existing API, so I do not object to moving forward as is after some consideration.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with your preference but I'd like to defer it to a pull request with a larger scope. The short argument names, e.g., alpha_sc, R_sh_ref, R_s (notice the discrepancy) are inherited from the column headings in the SAM database file. We read the column headings from the SAM file, do some character replacement, then use the reformatted names as keys.

Using long names in calcparams_desoto would ripple to edits to pvsystem.retrieve_sam, where the long names would be assigned as keys, in order to maintain the functionality of _build_kwargs. I considered doing this but decided it was outside the scope of #462, the issue motivating this pull request.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The R_s instead of R_s_ref in SAM has always puzzled me.

EgRef=1.121, dEgdT=-0.0002677,
irrad_ref=1000, temp_ref=25):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the desoto model is more naturally parameterized in terms of total irradiance at the POA. I propose that poa_global be renamed to irrad_poa, irrad_ref be renamed to irrad_poa_ref, and temp_ref to temp_cell_ref.

Also, calling this "effective irradiance" might be confused with the G_{eff} appearing in the DeSoto's master's thesis, which appears to have a different definition.

Copy link
Member Author

@cwhanse cwhanse Jun 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thunderfish24 here we have a conflict between adhering to the published reference (input would be absorbed irradiance, after reflections and soiling losses but without an adjustment from broadband to effective irradiance) and consistency within pvlib-python. SAPM (and PVsyst, when it is implemented #470) accept effective irradiance as input. I would prefer to see Desoto (and CEC, when it is implemented #463) use the same input quantity, with function signature and inline comments documenting the change from literature.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the standpoint of being able to implement and compare different models easily from the same time-dependent input data (say, global irradiance from pyranometer, albedo, ambient dry bulb temperature, and wind speed), I think having a consistent API would be preferable over complete fidelity to the original model formulation (and documenting the modifications in the code sounds acceptable). It sounds like the definition of "effective irradiance" that you are talking about here is the last one here with SF=1. Can you confirm?

I also realize that my thoughts are muddy on POA irradiance. In particular, the above-mentioned irradiance ratio at the POA doesn't seem to include any of the losses that give DeSoto's S or M factors (or an SF for that matter). It sounds like we plan on moving those factors into a separate function (or functions)?

Computation graphs might be helpful here for the various models taking inputs to outputs.

Copy link
Member Author

@cwhanse cwhanse Jun 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SAPM documentation strikes again. The explanation of effective irradiance in SAPM is rather opaque and is the question we are asked most frequently. A better explanation would be:

  • Ee is measured as a ratio of Isc to Isc at reference conditions adjusted for temperature (this is consistent with @thunderfish24 F quantity
  • For prediction of power from broadband POA irradiance, Ee is calculated by reducing the POA by surface reflection, soiling and adjusting for spectrum. This calculation is implicit in Eq. 1 on this page : https://pvpmc.sandia.gov/modeling-steps/2-dc-module-iv/point-value-models/sandia-pv-array-performance-model/
    I lost the argument to explicitly present SAPM along these lines on pvpmc.sandia.gov; the majority opinion was to retain the description as in the SAPM report.

From our attempts to bring order and consistency to PV modeling we arrived at this perspective:

  • POA irradiance refers to broadband irradiance at the module's face. This is the quantity produced by all of the popular transposition models
  • effective irradiance is the irradiance converted to electric current. Not everyone uses this term, but enough papers use it that we decided it made sense to emphasize it.
  • translation of POA irradiance to effective irradiance accounts for reflections, soiling, spectral irradiance adjustment, and perhaps other mechanisms.
  • De soto (and by inheritance CEC) is the only paper that uses a term for 'adsorbed irradiance', which is POA irradiance less reflections and soiling.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the further detailed explanation @cwhanse, which is making better sense to me now. I need a bit more time to think about the "swapping" of this effective irradiance into DeSoto, but it seems reasonable.

Also, it looks like the SAPM's effective irradiance does not try to treat the various angles of incidence of diffuse reflectance on the POA (which seems like a challenging prospect anyhow, and there is an f_D factor).

Note that the "effective irradiance" F in my definition here does not include a temperature correction to Isc0. This is not an approximation, but falls out of the derivation.

Copy link
Contributor

@markcampanelli markcampanelli Jun 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One can derive an alternative auxiliary equation for the photocurrent I_L at operating conditions in the Desoto model by setting V=0 in the SDM and rearranging:

I_L = I_sc + I_D * (exp(I_sc * R_s / (N_S * n * V_th(T)) - 1) + I_sc * R_s / R_sh
      = I_sc/I_sc_0 * I_sc_0 + I_D * (exp(I_sc/I_sc_0 * I_sc_0 * R_s / (N_S * n * V_th(T)) - 1) + I_sc/I_sc_0 * I_sc_0 * R_s / R_sh
      = F * I_sc_0 + I_D * (F * I_sc_0 * R_s / (N_S * n * V_th(T)) - 1) + F * I_sc_0 * R_s / R_sh

where some of these other parameters are also computed at operating conditions (e.g., I_D).

One can then use equation (1) in the SAPM as the model for I_sc at operating conditions (possibly also with a SF) to compute F at operating conditions :).

I humbly request that we implement this auxiliary equation for I_L for the SDM in terms of F, which then would then allow us to use either the SAPM or a matched (or unmatched) PV reference device measurement for the determination of the control variable F.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thunderfish24 I could see your request being part of a new function calcparams_(name here). That would be consistent with the API: calcparams_xxxxx returns the 5 values for the single diode equation at irradiance and temperature, etc. My concerns are 1) a source of model parameters (the module-specific constants used by calcparams_xxxxx and 2) ensuring that users understand the input F. Most use cases start with measured broadband irradiance, although pvlib doesn't force the user to consider the instrument behind the measurement.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

K. I am happy to implement this after I work out a usage example with the SAPM I_sc in more detail. It seems to me that if someone is already using measured broadband irradiance as a starting point with SAPM, then that workflow should readily adapt to this implementation of SDM with existing calibration parameters (with only a translation of I_L0 to I_sc0, I think).

I also have to first wrap up #426. (I have most of the documentation done there except for some function parameter descriptions and two more tests that I really should write.)

'''
Applies the temperature and irradiance corrections to inputs for
singlediode.

Applies the temperature and irradiance corrections to the IL, I0,
Rs, Rsh, and a parameters at reference conditions (IL_ref, I0_ref,
etc.) according to the De Soto et. al description given in [1]. The
results of this correction procedure may be used in a single diode
model to determine IV curves at irradiance = S, cell temperature =
Tcell.
Calculates five parameter values for the single diode equation at
effective irradiance and cell temperature using the De Soto et al.
model described in [1]. The five values returned by calcparams_desoto
can be used by singlediode to calculate an IV curve.

Parameters
----------
poa_global : numeric
The irradiance (in W/m^2) absorbed by the module.
effective_irradiance : numeric
The irradiance (W/m2) that is converted to photocurrent.

temp_cell : numeric
The average cell temperature of cells within a module in C.

alpha_isc : float
alpha_sc : float
The short-circuit current temperature coefficient of the
module in units of 1/C.

module_parameters : dict
Parameters describing PV module performance at reference
conditions according to DeSoto's paper. Parameters may be
generated or found by lookup. For ease of use,
retrieve_sam can automatically generate a dict based on the
most recent SAM CEC module
database. The module_parameters dict must contain the
following 5 fields:

* a_ref - modified diode ideality factor parameter at
reference conditions (units of eV), a_ref can be calculated
from the usual diode ideality factor (n),
number of cells in series (Ns),
and cell temperature (Tcell) per equation (2) in [1].
* I_L_ref - Light-generated current (or photocurrent)
in amperes at reference conditions. This value is referred to
as Iph in some literature.
* I_o_ref - diode reverse saturation current in amperes,
under reference conditions.
* R_sh_ref - shunt resistance under reference conditions (ohms).
* R_s - series resistance under reference conditions (ohms).
module in units of A/C.
Copy link
Contributor

@markcampanelli markcampanelli Jun 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C could be confused with Coulombs. Perhaps degC is preferable. (This is also an issue in temp_cell above.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the unit is clear in the context of the docstring.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amps/Coulomb = 1/second

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to leave the temperature unit on the temperature coefficients as C, because that's the unit used in IEC standards and datasheets. I agree with @wholmgren about being clear in context.


a_ref : float
The product of the usual diode ideality factor (n, unitless),
number of cells in series (Ns), and cell thermal voltage at reference
conditions, in units of V.

I_L_ref : float
The light-generated current (or photocurrent) at reference conditions,
in amperes.

I_o_ref : float
The dark or diode reverse saturation current at reference conditions,
in amperes.

R_sh_ref : float
The shunt resistance at reference conditions, in ohms.

R_s : float
The series resistance at reference conditions, in ohms.

EgRef : float
The energy bandgap at reference temperature (in eV).
1.121 eV for silicon. EgRef must be >0.
The energy bandgap at reference temperature in units of eV.
1.121 eV for crystalline silicon. EgRef must be >0. For parameters
from the SAM CEC module database, EgRef=1.121 is implicit for all
cell types in the parameter estimation algorithm used by NREL.

dEgdT : float
The temperature dependence of the energy bandgap at SRC (in
1/C). May be either a scalar value (e.g. -0.0002677 as in [1])
or a DataFrame of dEgdT values corresponding to each input
condition (this may be useful if dEgdT is a function of
temperature).

M : numeric (optional, default=1)
An optional airmass modifier, if omitted, M is given a value of
1, which assumes absolute (pressure corrected) airmass = 1.5. In
this code, M is equal to M/Mref as described in [1] (i.e. Mref
is assumed to be 1). Source [1] suggests that an appropriate
value for M as a function absolute airmass (AMa) may be:

>>> M = np.polyval([-0.000126, 0.002816, -0.024459, 0.086257, 0.918093],
... AMa) # doctest: +SKIP

M may be a Series.
The temperature dependence of the energy bandgap at reference
conditions in units of 1/K. May be either a scalar value
(e.g. -0.0002677 as in [1]) or a DataFrame (this may be useful if
dEgdT is a modeled as a function of temperature). For parameters from
the SAM CEC module database, dEgdT=-0.0002677 is implicit for all cell
types in the parameter estimation algorithm used by NREL.

irrad_ref : float (optional, default=1000)
Reference irradiance in W/m^2.
Expand Down Expand Up @@ -1090,7 +1076,7 @@ def calcparams_desoto(poa_global, temp_cell, alpha_isc, module_parameters,
and modifying the reference parameters (for irradiance, temperature,
and airmass) per DeSoto's equations.

Silicon (Si):
Crystalline Silicon (Si):
* EgRef = 1.121
* dEgdT = -0.0002677

Expand Down Expand Up @@ -1134,26 +1120,54 @@ def calcparams_desoto(poa_global, temp_cell, alpha_isc, module_parameters,
Source: [4]
'''

M = np.maximum(M, 0)
a_ref = module_parameters['a_ref']
IL_ref = module_parameters['I_L_ref']
I0_ref = module_parameters['I_o_ref']
Rsh_ref = module_parameters['R_sh_ref']
Rs_ref = module_parameters['R_s']

# test for use of function pre-v0.6.0 API change
if isinstance(a_ref, dict) or \
(isinstance(a_ref, pd.Series) and ('a_ref' in a_ref.keys())):
import warnings
warnings.warn('module_parameters detected as fourth positional'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend using warnings.warn(message, DeprecationWarning) where message is both of your statements as one.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

+ ' argument of calcparams_desoto. calcparams_desoto'
+ ' will require one argument for each module model'
+ ' parameter in v0.7.0 and later', DeprecationWarning)
try:
module_parameters = a_ref
a_ref = module_parameters['a_ref']
I_L_ref = module_parameters['I_L_ref']
I_o_ref = module_parameters['I_o_ref']
R_sh_ref = module_parameters['R_sh_ref']
R_s = module_parameters['R_s']
except Exception as e:
raise e('Module parameters could not be extracted from fourth'
+ ' positional argument of calcparams_desoto. Check that'
+ ' parameters are from the CEC database and/or update'
+ ' your code for the new API for calcparams_desoto')

# Boltzmann constant in eV/K
k = 8.617332478e-05

# reference temperature
Tref_K = temp_ref + 273.15
Tcell_K = temp_cell + 273.15

E_g = EgRef * (1 + dEgdT*(Tcell_K - Tref_K))

nNsVth = a_ref * (Tcell_K / Tref_K)

IL = (poa_global/irrad_ref) * M * (IL_ref + alpha_isc * (Tcell_K - Tref_K))
I0 = (I0_ref * ((Tcell_K / Tref_K) ** 3) *
# In the equation for IL, the single factor effective_irradiance is
# used, in place of the product S*M in [1]. effective_irradiance is
# equivalent to the product of S (irradiance reaching a module's cells) *
# M (spectral adjustment factor) as described in [1].
IL = effective_irradiance / irrad_ref * \
(I_L_ref + alpha_sc * (Tcell_K - Tref_K))
I0 = (I_o_ref * ((Tcell_K / Tref_K) ** 3) *
(np.exp(EgRef / (k*(Tref_K)) - (E_g / (k*(Tcell_K))))))
Rsh = Rsh_ref * (irrad_ref / poa_global)
Rs = Rs_ref
# Note that the equation for Rsh differs from [1]. In [1] Rsh is given as
# Rsh = Rsh_ref * (S_ref / S) where S is broadband irradiance reaching
# the module's cells. If desired this model behavior can be duplicated
# by applying reflection and soiling losses to broadband plane of array
# irradiance and not applying a spectral loss modifier, i.e.,
# spectral_modifier = 1.0.
Rsh = R_sh_ref * (irrad_ref / effective_irradiance)
Rs = R_s

return IL, I0, Rs, Rsh, nNsVth

Expand Down
54 changes: 35 additions & 19 deletions pvlib/test/test_pvsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,13 +358,18 @@ def test_PVSystem_sapm_effective_irradiance(sapm_module_params):

def test_calcparams_desoto(cec_module_params):
times = pd.DatetimeIndex(start='2015-01-01', periods=2, freq='12H')
poa_data = pd.Series([0, 800], index=times)
effective_irradiance = pd.Series([0.0, 800.0], index=times)
temp_cell = pd.Series([25, 25], index=times)

IL, I0, Rs, Rsh, nNsVth = pvsystem.calcparams_desoto(
poa_data,
temp_cell=25,
alpha_isc=cec_module_params['alpha_sc'],
module_parameters=cec_module_params,
effective_irradiance,
temp_cell,
alpha_sc=cec_module_params['alpha_sc'],
a_ref=cec_module_params['a_ref'],
I_L_ref=cec_module_params['I_L_ref'],
I_o_ref=cec_module_params['I_o_ref'],
R_sh_ref=cec_module_params['R_sh_ref'],
R_s=cec_module_params['R_s'],
EgRef=1.121,
dEgdT=-0.0002677)

Expand All @@ -382,10 +387,11 @@ def test_PVSystem_calcparams_desoto(cec_module_params):
module_parameters['dEgdT'] = -0.0002677
system = pvsystem.PVSystem(module_parameters=module_parameters)
times = pd.DatetimeIndex(start='2015-01-01', periods=2, freq='12H')
poa_data = pd.Series([0, 800], index=times)
effective_irradiance = pd.Series([0.0, 800.0], index=times)
temp_cell = 25

IL, I0, Rs, Rsh, nNsVth = system.calcparams_desoto(poa_data, temp_cell)
IL, I0, Rs, Rsh, nNsVth = system.calcparams_desoto(effective_irradiance,
temp_cell)

assert_series_equal(np.round(IL, 3), pd.Series([0.0, 6.036], index=times))
# changed value in GH 444 for 2017-6-5 module file
Expand Down Expand Up @@ -639,14 +645,18 @@ def test_PVSystem_i_from_v():
@requires_scipy
def test_singlediode_series(cec_module_params):
times = pd.DatetimeIndex(start='2015-01-01', periods=2, freq='12H')
poa_data = pd.Series([0, 800], index=times)
effective_irradiance = pd.Series([0.0, 800.0], index=times)
IL, I0, Rs, Rsh, nNsVth = pvsystem.calcparams_desoto(
poa_data,
temp_cell=25,
alpha_isc=cec_module_params['alpha_sc'],
module_parameters=cec_module_params,
EgRef=1.121,
dEgdT=-0.0002677)
effective_irradiance,
temp_cell=25,
alpha_sc=cec_module_params['alpha_sc'],
a_ref=cec_module_params['a_ref'],
I_L_ref=cec_module_params['I_L_ref'],
I_o_ref=cec_module_params['I_o_ref'],
R_sh_ref=cec_module_params['R_sh_ref'],
R_s=cec_module_params['R_s'],
EgRef=1.121,
dEgdT=-0.0002677)
out = pvsystem.singlediode(IL, I0, Rs, Rsh, nNsVth)
assert isinstance(out, pd.DataFrame)

Expand Down Expand Up @@ -713,12 +723,18 @@ def test_singlediode_floats_ivcurve():
@requires_scipy
def test_singlediode_series_ivcurve(cec_module_params):
times = pd.DatetimeIndex(start='2015-06-01', periods=3, freq='6H')
poa_data = pd.Series([0, 400, 800], index=times)
effective_irradiance = pd.Series([0.0, 400.0, 800.0], index=times)
IL, I0, Rs, Rsh, nNsVth = pvsystem.calcparams_desoto(
poa_data, temp_cell=25,
alpha_isc=cec_module_params['alpha_sc'],
module_parameters=cec_module_params,
EgRef=1.121, dEgdT=-0.0002677)
effective_irradiance,
temp_cell=25,
alpha_sc=cec_module_params['alpha_sc'],
a_ref=cec_module_params['a_ref'],
I_L_ref=cec_module_params['I_L_ref'],
I_o_ref=cec_module_params['I_o_ref'],
R_sh_ref=cec_module_params['R_sh_ref'],
R_s=cec_module_params['R_s'],
EgRef=1.121,
dEgdT=-0.0002677)

out = pvsystem.singlediode(IL, I0, Rs, Rsh, nNsVth, ivcurve_pnts=3)

Expand Down