-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement one-diode models #115
Comments
Hi Cliff, I'm in support of making these changes. I also think #39 is relevant. |
Hi @cwhanse @mikofski Do you already have a WIP fork on a pvlib 1-diode model based implementation of PVMismatch? |
My suggestion in #39 was to keep the same (or similar) interface, but make |
One problem that @bmeyers found when he started working on #39 was that pvlib python doesn't have an expression for reverse bias. PVMismatch currently assumes a modified version of avalanche breakdown, but I think this should also be abstracted, and opened up to alternate expressions, such as a Zener breakdown model |
Got it.
I have a fork which has no work in it (yet). |
@mikofski are you thinking to separate the IV curve calculation into two functions: forward and reverse bias? |
No, I think it's best to include the reverse bias in the same equation as the forward - perhaps we could do this in There equations are in the docstring in the example below, and represent the 2nd order avalanche breakdown used in PVMismatch. It is basically appended to the shunt current. For reverse bias, we can do something like this:
|
I think we're saying the same thing: the currents are additive, so we can calculate |
Proceeding in my fork:
All proceeding fine until the Voc method which uses the quadratic equation to solve for Voc (neglecting Rsh). This technique only works for the 2diode approach. The docstring says "Estimate open circuit voltage". Is the value returned by |
Next issue: I'd prefer to change My preference would break the current API for |
yes, agreed, please break the api. I agree with your suggestion
This more or less follows the same pattern as for Sorry I haven't been more proactive on this. Thank you so much for driving this forward. I wish I could contribute more. |
Hi Cliff, The estimate Voc method is similar to the You're right about We can add a property, Also at some point we should make this code BLACK |
@cwhanse and @mikofski |
The current 2-diode model is still available, with changes to some attribute and property names. In this sense it's backward compatible. If by warn you mean issue a runtime warning if, for example, a user sets or references the old But if that's the way ahead, I recommend considering an overhaul of the whole API for the class layer. Using the named parameters as attributes with setters presupposes the diode model and is a bit awkward to extend. Worth considering the more general approach @mikofski suggests : a class with an attribute that points to a function which translates irradiance and temperature to the 5 (7) parameters for the one (two) diode equation. The downside is losing control over the naming of the parameters for the diode model. |
Opening a very general issue to discuss work that could be relevant to this project.
I have a need to compute IV curves taking into account various external influences (all modeled): soiling, shading, interconnect resistance, cell-to-cell variations e.g. cracking, and others. To accomplish this it appears I would need to make substantial changes and additions. Some of the external influences can be handled through a cell-by-cell map of effective irradiance; for others, it appears that PVMismatch would need some substantial work (to specify a value of series resistance by cell, for example).
I'd prefer to use a single diode equivalent circuit with one of the various sets of equations for model parameter dependence on irradiance and temperature. #88 is relevant, as is #75, #74, #57, other issues. I'm fairly sure I want that model to use photocurrent as input rather than Isc as expected by
pvcell.Aph
.How much of the above is of interest for PVMismatch's core? I'm OK if the answer is "not much but thanks anyway". I am reluctant to build on PVMismatch if major changes would only live in my fork.
The text was updated successfully, but these errors were encountered: