pvlib / pvlib-python

A set of documented functions for simulating the performance of photovoltaic energy systems.
https://pvlib-python.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.12k stars 949 forks source link

clipping off-mpp operating point calculation #1178

Open mikofski opened 3 years ago

mikofski commented 3 years ago

Feature request An algorithm that determines the off-mpp operating point for inverters that are clipping

Describe the solution you'd like Assuming that if the converted AC out is greater than rated AC (at the ambient temperature), then the inverter will increase the voltage until the AC output, what is the DC output, DC voltage, and inverter efficiency loss

Describe alternatives you've considered I scripted something really, REALLY basic, I don't suggest something as simplistic as this:

p_ac = pvlib.inverter.sandia(v_mpp, p_mpp, inverter)  # use MPP first time
voltage_test_range = (v_oc - v_mpp)/100.0  # divide excess voltage into 100 steps
v_dc = v_mpp
while p_ac > ac_rated:
    v_dc += voltage_test_range  # add a little
    i_dc = np.interp(v_dc, v, i)  # v and i are the full IV curve
    # NOTE: v must be monotonically increasing for np.interp to work!
    p_dc = v_dc * i_dc
    p_ac = pvlib.inverter.sandia(v_dc, p_dc, inverter)

But it would be better to redo this with a scalar root finder from scipy.optimize like brentq.

Also, it the AC rated power should be adjusted depending on the ambient temperature, but this could be separate.

Additional context Sorry, I couldn't find any related issues/prs? ICYMI: @abhisheksparikh

cwhanse commented 3 years ago

I agree, would be a nice feature. Somehow it should accept any of the inverter models, or, be some kind of extension within the existing functions so that a user doesn't have to choose to call an inverter function or this new function.

We could also open issues for:

mikofski commented 3 years ago

may be related to #1199 ?