You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pvlib usage questions can be asked on Stack Overflow and tagged with the pvlib tag.
The pvlib-python google group is used for discussing various topics of interest to the pvlib-python community. We also make new version announcements on the google group.
I get a ValueError when using single diode model with lambertw method.
p_mp, v_mp = _golden_sect_DataFrame(params, 0., v_oc * 1.14, _pwr_optfcn)
raise ValueError('upper >= lower is required')
I've seen some issues that may be related, because newton method doesn't raise any error, and I've some very low irradiance values: #1673 #1843
Debugging lambertw method, I found the following:
#Set small elements <0 in v_oc to 0
if isinstance(v_oc, np.ndarray):
v_oc[(v_oc < 0) & (v_oc > -1e-12)] = 0.
In my case, there are some v_oc values under 0, but no so close to zero as -1e-12
v_oc[(v_oc < 0)] = array([-0.00024414, -0.00097656, -0.00195312, -0.00390625, -0.00390625])
#Questions:
Is there any reason to not filter every negative value in v_oc?
May I use newton method to avoid this error?
@OnairSandra when we've looked at similar reports, the root cause has been very low (e.g. 1e-9) values for effective irradiance. The solution has been to filter the effective irradiance before calling the calc_params and singlediode functions.
To know for certain you would need to provide code and some data.
Or you can try singlediode(...., method='newton'...) which finds the maximum power point with a different method.
Thanks for answering, @cwhanse!
By the moment I'll use newton method.
So, can I assume that there is a reason for not filtering every negative value in v_oc estimation before using golden_sect_DataFrame?
pvlib usage questions can be asked on Stack Overflow and tagged with the pvlib tag.
The pvlib-python google group is used for discussing various topics of interest to the pvlib-python community. We also make new version announcements on the google group.
I get a ValueError when using single diode model with lambertw method.
p_mp, v_mp = _golden_sect_DataFrame(params, 0., v_oc * 1.14, _pwr_optfcn)
raise ValueError('upper >= lower is required')
I've seen some issues that may be related, because newton method doesn't raise any error, and I've some very low irradiance values:
#1673
#1843
Debugging lambertw method, I found the following:
#Set small elements <0 in v_oc to 0
if isinstance(v_oc, np.ndarray):
v_oc[(v_oc < 0) & (v_oc > -1e-12)] = 0.
In my case, there are some v_oc values under 0, but no so close to zero as -1e-12
v_oc[(v_oc < 0)] = array([-0.00024414, -0.00097656, -0.00195312, -0.00390625, -0.00390625])
#Questions:
Is there any reason to not filter every negative value in v_oc?
May I use newton method to avoid this error?
#Environment:
Python version: 3.10
pvlib version: 0.10.2
The text was updated successfully, but these errors were encountered: