Skip to content

Resolve #140 snlinverter night tare power issue #141

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 5 commits into from
Apr 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions docs/sphinx/source/whatsnew/v0.3.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,15 @@ Enhancements
Bug fixes
~~~~~~~~~

* Fixes night tare issue in snlinverter. When the DC input power (p_dc)
to an inverter is below the inversion startup power (Ps0), the model
should set the AC output (ac_power) to the night tare value (Pnt).
The night tare power indicates the power consumed by the inverter to
sense PV array voltage. The model was erroneously comparing Ps0 with
the AC output power (ac_power), rather than the DC input power (p_dc).


Contributors
~~~~~~~~~~~~

* ejmiller2
2 changes: 1 addition & 1 deletion pvlib/pvsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -1662,7 +1662,7 @@ def snlinverter(inverter, v_dc, p_dc):

ac_power = (Paco/(A-B) - C*(A-B)) * (p_dc-B) + C*((p_dc-B)**2)
ac_power[ac_power > Paco] = Paco
ac_power[ac_power < Pso] = - 1.0 * abs(Pnt)
ac_power[p_dc < Pso] = - 1.0 * abs(Pnt)

if len(ac_power) == 1:
ac_power = ac_power.ix[0]
Expand Down
11 changes: 11 additions & 0 deletions pvlib/test/test_pvsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,17 @@ def test_snlinverter_float():
assert_almost_equals(pacs, 132.004278, 5)


def test_snlinverter_Pnt_micro():
inverters = sam_data['cecinverter']
testinv = 'Enphase_Energy__M250_60_2LL_S2x___ZC____NA__208V_208V__CEC_2013_'
vdcs = pd.Series(np.linspace(0,50,3))
idcs = pd.Series(np.linspace(0,11,3))
pdcs = idcs * vdcs

pacs = pvsystem.snlinverter(inverters[testinv], vdcs, pdcs)
assert_series_equal(pacs, pd.Series([-0.043000, 132.545914746, 240.000000]))


def test_PVSystem_creation():
pv_system = pvsystem.PVSystem(module='blah', inverter='blarg')

Expand Down