Skip to content

ENH: Port PVsyst and Desoto parameter estimation from MATLAB #708

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 148 commits into from
Aug 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
c00d419
ENH: porting pvsyst and single diode param est
Aug 1, 2016
e3d8235
change function name from est_single_diode_params
mikofski Oct 4, 2018
99d2f3f
use int indices, make docstring, test still fails
mikofski May 4, 2019
55d1c0b
isolate iv fitting and parameter generation
mikofski May 4, 2019
857d896
TST: schumaker test is passing! Yoohoo!
mikofski May 4, 2019
0433136
TST: fix imports and path to test data
mikofski May 4, 2019
1d418dd
fix Io test sortof, some stickler
mikofski May 4, 2019
1a055e7
Merge branch 'master' into pvsyst_parameter_estimation
mikofski Dec 4, 2019
a1bdf55
fix tests, merge ivtools
mikofski Dec 5, 2019
b886dc8
fixing test_PVsyst_parameter_estimation
mikofski Dec 5, 2019
db58d39
include statsmodels and mpl in ci/conda-envs
mikofski Dec 5, 2019
f19f1de
stickler fixes, long lines, code tweaks
mikofski Dec 5, 2019
2875438
rename update io and rsh tests so they run
mikofski Dec 5, 2019
5252c8a
concise indexing in Schumaker QSpline
mikofski Dec 5, 2019
38ee9b8
add test for numdiff
mikofski Dec 5, 2019
90bb48b
move pvsyst parameter estimation tests
mikofski Dec 5, 2019
4e27551
use maximum not max in estRsh
mikofski Dec 5, 2019
2faed73
fudge tolerance for pvsyst_parameter_estimation for fun
mikofski Dec 5, 2019
aa1210b
restrict pvsyst estimation test to first 3000 points
mikofski Dec 5, 2019
b59227e
rename pvsyst parameter estimation tests folder
mikofski Dec 5, 2019
de85d38
move test_numdiff inside test_pvsyst_parameter_estimation.py
mikofski Dec 5, 2019
82d452d
add requires_scipy to update_io_know_n tests
mikofski Dec 6, 2019
d6622f5
pycodestyle passing, rm xtra sp, fix indent
mikofski Dec 6, 2019
18e2cb6
shuffle functions into different modules. Rename to fit_sdX_ pattern
cwhanse Dec 9, 2019
9268fe8
fix import names
cwhanse Dec 9, 2019
836a9b5
fix import in ivtools
mikofski Dec 9, 2019
edf872c
refactor deux: rm old files
mikofski Dec 17, 2019
8b2d102
remove old pvsyst parma estimation tests
mikofski Dec 17, 2019
d9abba1
stickler fixes
mikofski Dec 17, 2019
1508b1d
Merge branch 'master' into pvsyst_parameter_estimation
mikofski Dec 17, 2019
152dd24
Merge branch 'master' into pvsyst_parameter_estimation
mikofski Dec 17, 2019
9b56560
using lambertw requires scipy in tests
mikofski Dec 17, 2019
a7dfe45
align with scipy.intepolate pattern
cwhanse Dec 18, 2019
8d67a97
refactor fit_sde_cocontent, change argument order
cwhanse Dec 18, 2019
780db42
stickler
cwhanse Dec 18, 2019
5207c60
fix argument order in fit_pvsyst_sandia
cwhanse Dec 19, 2019
b5270da
fix rectify function, add test
cwhanse Dec 20, 2019
47e4465
stickler
cwhanse Dec 20, 2019
1e1496c
corrections, add rcond=None
cwhanse Dec 20, 2019
98bcc25
more corrections
cwhanse Dec 20, 2019
a9c908d
undo change in rs, rsh order
cwhanse Dec 20, 2019
b2cbb11
fix test for rectify_iv_curve, use np.expm1
cwhanse Dec 20, 2019
2e973fe
exclude curve #2540
cwhanse Dec 20, 2019
383a1f8
fix expected outcome for test_rectify_
cwhanse Dec 20, 2019
e22942f
messed up csv
cwhanse Dec 20, 2019
1484e39
exclude curve #2540
cwhanse Dec 20, 2019
7f90f26
correct rounding for test_rectify_
cwhanse Dec 23, 2019
9c00ac8
move exclude to line 2540 was on 2536
cwhanse Dec 23, 2019
d52dade
create exclude mask for individual curves
cwhanse Dec 23, 2019
f934275
use umask
cwhanse Dec 23, 2019
ed378ac
helper functions, some streamlining
cwhanse Dec 23, 2019
41ca062
rename _update_io_known_n
cwhanse Dec 23, 2019
de1b493
docstring improvements
cwhanse Dec 24, 2019
e202506
split _calc_theta_phi_exact, overhaul tests
cwhanse Dec 24, 2019
d3baff3
remove unused lines
cwhanse Dec 25, 2019
08a5627
stickler
cwhanse Dec 25, 2019
a8059cb
remove test_ivtools.py
cwhanse Dec 25, 2019
9fc68b5
renaming, update api.rst
cwhanse Dec 25, 2019
e1544a3
update name
cwhanse Dec 25, 2019
0626805
improve _update_rsh_fixed_pt
cwhanse Dec 26, 2019
fdc0e66
fix typo
cwhanse Dec 26, 2019
8465bc0
fix error
cwhanse Dec 26, 2019
82669f4
correct convergence in _update_rsh_fixed_pt
cwhanse Dec 30, 2019
027f2ee
flake8
cwhanse Dec 30, 2019
5e7cc77
docstring for fit_sdm
cwhanse Jan 1, 2020
6ae5927
docstring for fit_sdm
cwhanse Jan 1, 2020
0a6fcab
docstring for fit_sdm
cwhanse Jan 1, 2020
317b92c
docstring for fit_sdm
cwhanse Jan 2, 2020
385a14b
docstring for fit_sde, utility
cwhanse Jan 2, 2020
0f7fab2
update api.rst
cwhanse Jan 2, 2020
11c98e5
add helper to deal with numpy<1.14
cwhanse Jan 2, 2020
291e086
fix workaround for numpy version
cwhanse Jan 2, 2020
4e80ea1
rename modules and functions, move tests to ivtools/test
cwhanse Jan 17, 2020
a9a4b7a
merge master, fix conflict
cwhanse Jan 17, 2020
0450815
fix merge conflicts, contains duplicated files
cwhanse Jan 17, 2020
d547521
move tests from ivtools/test to pvlib/tests/ivtools
cwhanse Jan 17, 2020
e98652e
remove old test folder
cwhanse Jan 17, 2020
f5351a9
remove old pvlib/test folder
cwhanse Jan 17, 2020
6a413d2
name correction, remove old test files
cwhanse Jan 17, 2020
6fe3c33
fix test, move test_fit_sde_cocontent into test_sde
cwhanse Jan 19, 2020
9f2e474
move test_schumaker_qspline to test_utility
cwhanse Jan 19, 2020
104052b
docstring work
cwhanse Jan 19, 2020
4392f70
resolve conflict
cwhanse Jan 19, 2020
ab31257
docstring work
cwhanse Jan 19, 2020
6c7c071
test corrections
cwhanse Jan 19, 2020
8d1b8b0
fix order in parametrize
cwhanse Jan 20, 2020
5e18986
one comma
cwhanse Jan 20, 2020
f08e1f6
corrections
cwhanse Jan 20, 2020
ea6a157
remove old files, update api.rst
cwhanse Jan 20, 2020
f7911fc
update names in ivtools\__init__.py
cwhanse Jan 20, 2020
488726d
docstring work, rename outputs from fit_pvsyst_sandia to be consisten…
cwhanse Jan 20, 2020
949aad7
docstring work, use cells_in_series throughout
cwhanse Jan 20, 2020
499ff7b
docstring work, use mu_gamma instead of mugamma
cwhanse Jan 20, 2020
a1ddcf9
missed one
cwhanse Jan 20, 2020
09127c6
sort of Rs vs R_s vs R_s_ref
cwhanse Jan 21, 2020
27e4200
refactor to prepare for adding desoto, cec estimation; remove logging
cwhanse Jan 22, 2020
0e4485b
merge
cwhanse Jan 22, 2020
f5b7ee4
add fit_desoto_sandia
cwhanse Jan 22, 2020
182f95b
correct argument order, lint
cwhanse Jan 22, 2020
987257d
change to pvlib-consistent key names
cwhanse Jan 22, 2020
37ee5d9
add test for fit_desoto_sandia
cwhanse Jan 22, 2020
d4c1950
corrections
cwhanse Jan 22, 2020
a2423e5
more corrections
cwhanse Jan 22, 2020
59f69be
use canonical order iph, io, rs, rsh, n
cwhanse Jan 23, 2020
15d4d6b
convert update_rsh test, move to test_sdm.py
cwhanse Jan 23, 2020
e168ead
fix update_rsh tests, improve function
cwhanse Jan 23, 2020
e605483
remove old update_rsh test file
cwhanse Jan 23, 2020
a33fed7
convert tests for _update_io
cwhanse Jan 23, 2020
9f8a0e1
remove old tests for _update_io
cwhanse Jan 23, 2020
64a51c1
convert tests for calc_theta_phi
cwhanse Jan 23, 2020
89d6442
remove old test for calc_theta
cwhanse Jan 23, 2020
6c45599
take care of float div by 0 test failures
cwhanse Jan 23, 2020
579b80d
move sde functions to canonical argument order
cwhanse Jan 23, 2020
d5ace89
fix bugs
cwhanse Jan 23, 2020
88c8995
more raid for bugs
cwhanse Jan 23, 2020
cad323b
die bugs die
cwhanse Jan 24, 2020
20b7e6d
maintain order of variables in the text file
cwhanse Jan 24, 2020
64a9fe5
test repair
cwhanse Jan 26, 2020
d44dbe7
minor editing
cwhanse Jan 26, 2020
83a2c30
pin pysam version to 1.2.1
cwhanse Jan 28, 2020
d0aed99
pysam to current version, patch over numpy 1.14 change
cwhanse Jan 28, 2020
22e8b7e
module docstring
cwhanse May 4, 2020
bb2af7e
Merge branch 'pvsyst_parameter_estimation' of https://github.com/miko…
cwhanse May 4, 2020
0f9896a
Merge remote-tracking branch 'upstream/master' into pvsyst_parameter_…
cwhanse May 4, 2020
d3a52e3
remove ivtools.py
cwhanse May 4, 2020
adb8290
separate sam_estimate_failure into its own function
cwhanse May 4, 2020
5bd14c7
Merge branch 'master' of https://github.com/pvlib/pvlib-python into p…
cwhanse Jun 10, 2020
157c2ab
Merge branch 'master' of https://github.com/pvlib/pvlib-python into p…
cwhanse Aug 24, 2020
a5d5ffa
fix stickler
cwhanse Aug 24, 2020
f46287e
'mispelling'
cwhanse Aug 24, 2020
c8b4b00
fix error in _calc_I0
cwhanse Aug 25, 2020
eea759b
more fixing of that error
cwhanse Aug 25, 2020
fa8d8a6
improvements from review
cwhanse Aug 25, 2020
944c16b
another fix for mistake in _calc_I0
cwhanse Aug 25, 2020
eb8d986
docstring edits
cwhanse Aug 25, 2020
8cc8249
improve coverage
cwhanse Aug 26, 2020
fce9b04
tpo
cwhanse Aug 26, 2020
b548f63
use the correct error Class
cwhanse Aug 26, 2020
df7520e
improvements from review
cwhanse Aug 27, 2020
cad96ef
changes from review: helper functions for test, _numdiff and _schum p…
cwhanse Aug 28, 2020
4831cfd
whatsnew
cwhanse Aug 28, 2020
83308a3
Merge branch 'master' of https://github.com/pvlib/pvlib-python into p…
cwhanse Aug 28, 2020
a1dc575
add renamed and moved data files
cwhanse Aug 28, 2020
ab4f99b
use pathlib.Path.open()
cwhanse Aug 28, 2020
cad3949
duh
cwhanse Aug 28, 2020
6866922
add return, doing three things at once = poor quality
cwhanse Aug 28, 2020
e9dba7d
add statsmodels for py38, fix dict declarations
cwhanse Aug 28, 2020
0c41ed2
()
cwhanse Aug 28, 2020
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
1 change: 1 addition & 0 deletions ci/requirements-py35.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ dependencies:
- scipy
- shapely # pvfactors dependency
- siphon # conda-forge
- statsmodels
- pip:
- nrel-pysam>=2.0
- pvfactors==1.4.1
Expand Down
1 change: 1 addition & 0 deletions ci/requirements-py36.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ dependencies:
- scipy
- shapely # pvfactors dependency
- siphon # conda-forge
- statsmodels
- pip:
- nrel-pysam>=2.0
- pvfactors==1.4.1
1 change: 1 addition & 0 deletions ci/requirements-py37.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ dependencies:
- scipy
- shapely # pvfactors dependency
- siphon # conda-forge
- statsmodels
- pip:
- nrel-pysam>=2.0
- pvfactors==1.4.1
1 change: 1 addition & 0 deletions ci/requirements-py38.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ dependencies:
- scipy
- shapely # pvfactors dependency
- siphon # conda-forge
- statsmodels
- pip:
- nrel-pysam>=2.0
- pvfactors==1.4.1
28 changes: 28 additions & 0 deletions docs/sphinx/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ Pvsyst model
.. autosummary::
:toctree: generated/

pvsystem.calcparams_pvsyst
temperature.pvsyst_cell
pvsystem.calcparams_pvsyst
pvsystem.singlediode
Expand All @@ -328,6 +329,33 @@ PVWatts model
inverter.pvwatts
pvsystem.pvwatts_losses

Estimating PV model parameters
------------------------------

Functions for fitting single diode models

.. autosummary::
:toctree: generated/

ivtools.sdm.fit_cec_sam
ivtools.sdm.fit_desoto
ivtools.sdm.fit_pvsyst_sandia
ivtools.sdm.fit_desoto_sandia

Functions for fitting the single diode equation

.. autosummary::
:toctree: generated/

ivtools.sde.fit_sandia_simple

Utilities for working with IV curve data

.. autosummary::
:toctree: generated/

ivtools.utility.rectify_iv_curve

Other
-----

Expand Down
13 changes: 13 additions & 0 deletions docs/sphinx/source/whatsnew/v0.8.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
v0.8.0 (Month day, year)
-------------------------

API Breaking Changes
~~~~~~~~~~~~~~~~~~~~

* The ``ivtools.py`` module has been reorganized into sub-modules and functions
in ``ivtools.py`` have been renamed (:pull:`708`)
- Functions for fitting diode models are now in ``ivtools\sdm.py``
- :py:func:`pvlib.ivtools.fit_sdm_cec_sam` is now :py:func:`pvlib.ivtools.sdm.fit_cec_sam`
- :py:func:`pvlib.ivtools.fit_sdm_desoto` is now :py:func:`pvlib.ivtools.sdm.fit_desoto`
- Functions for fitting the single diode equation are now in ``ivtools\sde.py``
- :py:func:`pvlib.ivtools.fit_sde_sandia` is now :py:func:`pvlib.ivtools.sde.fit_sandia_simple`

API Changes with Deprecations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Moved functions related to inverters from ``pvsystem.py`` to ``inverter.py``.
Expand Down Expand Up @@ -70,6 +81,8 @@ Enhancements
(:pull:`1017`)
* Add :py:func:`pvlib.inverter.fit_sandia` that fits the Sandia inverter model
to a set of inverter efficiency curves. (:pull:`1011`)
* Add :py:func:`pvlib.ivtools.sdm.fit_pvsyst_sandia` and :py:func:`pvlib.ivtools.sdm.fit_desoto_sandia`
for fitting the Pvsyst and De Soto models to IV curve data (:issue:`227`)(:pull:`708`)
* Add factory methods :py:meth:`~pvlib.modelchain.ModelChain.with_pvwatts`
:py:meth:`~pvlib.modelchain.ModelChain.with_sapm` to create ``ModelChain``
objects configured for the respective modeling paradigms. The
Expand Down
10,757 changes: 10,757 additions & 0 deletions pvlib/data/PVsyst_demo.csv

Large diffs are not rendered by default.

Loading