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
{{ message }}
Repository navigation
Migrate efficiency models from pvpltools-python #1544
Describe the solution you'd like
A number of different models exist to estimate efficiency (or power) as a function of irradiance and temperature. I coded and published many of them in my own repository pvpltools-python as it was quicker to do than a pvlib PR, but I think they would fit nicely into pvlib-python.
I'm not in favor of adding the functions to pvsystem.py but that's the only current code module that makes any sense. Most functions return module efficiency eta (or help do so). There's a gap to span between having eta and getting DC power, which could be a new function in pvsystem.py. So for this base layer, I'd favor a new module e.g. pvlib.dc_efficiency.py and I immediately dislike the name.
I am having some second thoughts about where to put this code. In particular, I think that pvefficiency may be too narrow for the module. Steve has already said that LFM does more than efficiency, and I think my model could do more than that as well. Which brings up my doubts about using the bare adr as a function name here also.
Could we create a new module called pvmodule or perhaps even better pvarray? Initially LFM core functions and ADR efficiency and fitting could go in there there and eventually more stuff could be moved from pvsystem to reduce its size.
If this is too complex an issue we could discuss it under #1581, but I would really like to get this ADR code into the next release.
Are we talking about a module to contain functions that take in effective_irradiance and temp_cell and output DC quantities and/or efficiency? That would be a logical next step in reducing the scope of pvsystem.py.
There could be more than those two inputs perhaps. I would see pvarray as a logical destination for all SAPM, PVWATTS, SDE module/array functions, focusing on the electrical side of things. But such moves can be contemplated at leisure.
SAPM calculates measured values (A and V) of Isc, Imp, Vmp, Voc and Ix and Ixx using a different equation and coefficients for each one. I just looked at the first four as that's all I had from the CFV data.
MPM calculates any of the normalised LFM values (usually nIsc, nImp, nVmp and nVoc from a measurement without complete IV traces as in this poster or nIsc, nRsc, nFFi, nFFv, nRoc and nVoc for good indoor or outdoor IV traces where Rsc and Roc can be calculated) with the same equation.
Although the PVGIS model had only been used for prdc I generalised it to look at other normalised parameters isc, imp, vmp and voc.
It would be good to add these and other models to pvlib and compare their fits alongside factors such as robustness, ability to fit noisy data, meaningful coefficients, performance limits (e.g. low rsc) and degradation analysis (e.g. rising roc) etc.
I haven't seen the PVSC-49 papers being released yet but could post mine here or answer any other questions.
I think we need to allow a PV model that either fits the prdc (= measured_efficiency/reference_efficiency) or one of the other chosen parameters such as isc, rsc, imp, vmp, roc and voc.
As long as the reference values of isc, imp, vmp and voc are available it is straightforward to calculate measured raw values from normalised values or vice versa with meas_to_norm or norm_to_meas functions.,
There could be more than those two inputs perhaps. I would see pvarray as a logical destination for all SAPM, PVWATTS, SDE module/array functions, focusing on the electrical side of things. But such moves can be contemplated at leisure.
Regarding some terminology: I notice that Steve likes the term $PR_{DC}$ while I tend to use relative and/or normalized efficiency. Mostly we're talking about the same thing in a PV module context, but in a system context there is a possible distinction. I tend to see $PR_{DC}$ as referring to the entire system up to the inverter, whereas efficiency strikes me as more component-oriented (although it could be calculated for any subsystem as well of course).
Anyway, I just wanted to make this observation and see if anyone sees potential for confusion.
Ok, I went ahead and created the pvarray module. Let's see what reactions that provokes. :)
My reaction is that the name pvarray calls to mind a physical installation with characteristics like a racking configuration, GCR, and wiring topology. The efficiency models considered here seem abstracted from that by a step or two. Without thinking too hard about it, I think I'd favor pvmodule (pvdevice?) over pvarray for these functions.
As an aside, I found SAND2020-3877 to be an informative and engaging read. My compliments to the chefs.
Are we planning to eventually move some of the pvlib.pvsystem functionality to this new module? If so, as long as we've already deprecated pvlib.pvsystem.pvwatts_dc in #1558, we may as well move that one now so we don't have to deprecate it again later.
Activity
adriesse commentedon Sep 6, 2022
What do you think, could the module go in pretty much as-is, or should it be organized differently?
cwhanse commentedon Sep 6, 2022
I'm not in favor of adding the functions to
pvsystem.pybut that's the only current code module that makes any sense. Most functions return module efficiencyeta(or help do so). There's a gap to span between havingetaand getting DC power, which could be a new function inpvsystem.py. So for this base layer, I'd favor a new module e.g.pvlib.dc_efficiency.pyand I immediately dislike the name.adriesse commentedon Sep 8, 2022
I dislike that name too. :)
adriesse commentedon Nov 16, 2022
I would welcome more opinions on code organization before I continue.
Another option would be to just submit the ADR model and ADR fitting function. In that case, what would be the preferred place(s) to put them?
kandersolar commentedon Nov 18, 2022
#1572 seems OK to me so far.
dc_efficiencyseems too broad to me.adriesse commentedon Nov 27, 2022
Looking forward to some reviews...
adriesse commentedon Dec 1, 2022
I am having some second thoughts about where to put this code. In particular, I think that
pvefficiencymay be too narrow for the module. Steve has already said that LFM does more than efficiency, and I think my model could do more than that as well. Which brings up my doubts about using the bareadras a function name here also.Could we create a new module called
pvmoduleor perhaps even betterpvarray? Initially LFM core functions and ADR efficiency and fitting could go in there there and eventually more stuff could be moved frompvsystemto reduce its size.If this is too complex an issue we could discuss it under #1581, but I would really like to get this ADR code into the next release.
cwhanse commentedon Dec 1, 2022
Are we talking about a module to contain functions that take in
effective_irradianceandtemp_celland output DC quantities and/or efficiency? That would be a logical next step in reducing the scope of pvsystem.py.adriesse commentedon Dec 1, 2022
There could be more than those two inputs perhaps. I would see
pvarrayas a logical destination for all SAPM, PVWATTS, SDE module/array functions, focusing on the electrical side of things. But such moves can be contemplated at leisure.steve-ransome commentedon Dec 1, 2022
This is a poster I presented at PVSC this year where I compared some modelling methods http://www.steveransome.com/pubs/2206_PVSC49_philadelphia_4_presented.pdf
SAPM calculates measured values (A and V) of Isc, Imp, Vmp, Voc and Ix and Ixx using a different equation and coefficients for each one. I just looked at the first four as that's all I had from the CFV data.
MPM calculates any of the normalised LFM values (usually nIsc, nImp, nVmp and nVoc from a measurement without complete IV traces as in this poster or nIsc, nRsc, nFFi, nFFv, nRoc and nVoc for good indoor or outdoor IV traces where Rsc and Roc can be calculated) with the same equation.
Although the PVGIS model had only been used for prdc I generalised it to look at other normalised parameters isc, imp, vmp and voc.
It would be good to add these and other models to pvlib and compare their fits alongside factors such as robustness, ability to fit noisy data, meaningful coefficients, performance limits (e.g. low rsc) and degradation analysis (e.g. rising roc) etc.
I haven't seen the PVSC-49 papers being released yet but could post mine here or answer any other questions.
I think we need to allow a PV model that either fits the prdc (= measured_efficiency/reference_efficiency) or one of the other chosen parameters such as isc, rsc, imp, vmp, roc and voc.
As long as the reference values of isc, imp, vmp and voc are available it is straightforward to calculate measured raw values from normalised values or vice versa with meas_to_norm or norm_to_meas functions.,
cwhanse commentedon Dec 1, 2022
pvarrayto parallelpvsystemI take it.adriesse commentedon Dec 2, 2022
Ok, I went ahead and created the pvarray module. Let's see what reactions that provokes. :)
adriesse commentedon Dec 2, 2022
Regarding some terminology: I notice that Steve likes the term$PR_{DC}$ while I tend to use relative and/or normalized efficiency. Mostly we're talking about the same thing in a PV module context, but in a system context there is a possible distinction. I tend to see $PR_{DC}$ as referring to the entire system up to the inverter, whereas efficiency strikes me as more component-oriented (although it could be calculated for any subsystem as well of course).
Anyway, I just wanted to make this observation and see if anyone sees potential for confusion.
kandersolar commentedon Dec 2, 2022
My reaction is that the name
pvarraycalls to mind a physical installation with characteristics like a racking configuration, GCR, and wiring topology. The efficiency models considered here seem abstracted from that by a step or two. Without thinking too hard about it, I think I'd favorpvmodule(pvdevice?) overpvarrayfor these functions.As an aside, I found SAND2020-3877 to be an informative and engaging read. My compliments to the chefs.
adriesse commentedon Dec 2, 2022
Thanks, that's really nice to hear!
kandersolar commentedon Dec 19, 2022
Are we planning to eventually move some of the
pvlib.pvsystemfunctionality to this new module? If so, as long as we've already deprecatedpvlib.pvsystem.pvwatts_dcin #1558, we may as well move that one now so we don't have to deprecate it again later.cwhanse commentedon Dec 19, 2022
I would vote yes. What about moving PVArray? If I was looking for PVArray, I'd first guess pvarray.py....
adriesse commentedon Dec 20, 2022
No objection to either move, but maybe we should make a list of moving candidates?