Skip to content

Commit b9fa72d

Browse files
committed
fixup! Add CEC inverter parameters fixture
1 parent 6154a8e commit b9fa72d

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

pvlib/test/test_pvsystem.py

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,13 +1296,34 @@ def test_snlinverter_float(cec_inverter_parameters):
12961296
assert_allclose(pacs, 132.004278, 5)
12971297

12981298

1299-
def test_snlinverter_Pnt_micro(cec_inverter_parameters):
1299+
def test_snlinverter_Pnt_micro():
1300+
"""
1301+
Test for issue #140, where some microinverters were giving a positive AC
1302+
power output when the DC power was 0.
1303+
"""
1304+
inverter_parameters = {
1305+
'Name': 'Enphase Energy: M250-60-2LL-S2x (-ZC) (-NA) 208V 208V [CEC 2013]',
1306+
'Vac': 208.0,
1307+
'Paco': 240.0,
1308+
'Pdco': 250.5311318,
1309+
'Vdco': 32.06160667,
1310+
'Pso': 1.12048857,
1311+
'C0': -5.76E-05,
1312+
'C1': -6.24E-04,
1313+
'C2': 8.09E-02,
1314+
'C3': -0.111781106,
1315+
'Pnt': 0.043,
1316+
'Vdcmax': 48.0,
1317+
'Idcmax': 9.8,
1318+
'Mppt_low': 27.0,
1319+
'Mppt_high': 39.0,
1320+
}
13001321
vdcs = pd.Series(np.linspace(0,50,3))
13011322
idcs = pd.Series(np.linspace(0,11,3))
13021323
pdcs = idcs * vdcs
13031324

1304-
pacs = pvsystem.snlinverter(vdcs, pdcs, cec_inverter_parameters)
1305-
assert_series_equal(pacs, pd.Series([-0.02, 132.004278492, 250.0]))
1325+
pacs = pvsystem.snlinverter(vdcs, pdcs, inverter_parameters)
1326+
assert_series_equal(pacs, pd.Series([-0.043, 132.545914746, 240.0]))
13061327

13071328

13081329
def test_PVSystem_creation():

0 commit comments

Comments
 (0)