1

由于失配效应,我正在使用 PVLib 对光伏功率损耗进行建模。

是否可以添加并联的模块 IV 曲线?

如同:

def combine_series(dfs):
    """
    Combine IV curves in series by aligning currents and summing voltages.
    The current range is based on the first curve's current range.
    """
    df1 = dfs[0]
    imin = df1['i'].min()
    imax = df1['i'].max()
    i = np.linspace(imin, imax, 1000)
    v = 0
    for df2 in dfs:
        v_cell = interpolate(df2, i)
        v += v_cell
    return pd.DataFrame({'i': i, 'v': v})

不同之处在于它应该并行组合。

非常感谢,基利安

4

1 回答 1

1

想我明白了:

def interpolate_p(df, v):
"""convenience wrapper around scipy.interpolate.interp1d"""
f_interp = interp1d(df['v'], df['i'], kind='linear',
                    fill_value='extrapolate')
return f_interp(v)

def combine_parallel(dfs):
"""
Combine IV curves in parallel by aligning voltages and summing currents.
The current range is based on the first curve's voltage range.
"""
df1 = dfs[0]
imin = df1['v'].min()
imax = df1['v'].max()
v = np.linspace(imin, imax, 1000)
i = 0
for df2 in dfs:
    v_cell = interpolate_p(df2, v)
    i += v_cell
return pd.DataFrame({'i': i, 'v': v})

我猜这成功了。随意使用并告诉我我是否错了,或者 PVLib 中是否还有其他功能。

问候基利安

于 2021-05-02T09:07:40.263 回答