-
Notifications
You must be signed in to change notification settings - Fork 1.1k
IV curve fitting #1228
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
Comments
It would be a nice extension to extract the maximum power point from the IV data. I've seen too many IV curves where the measurement instrument couldn't sweep to 0 voltage, or would sweep past Voc, to trust that the end points are in the IV data. Rather than have the fit function figure out what should be done, it seemed to me to be a better design to have the user resolve those issues. Looks like we could use a This fitting exercise would make a nice addition to the pvlib Examples Gallery, happy to help put that together. |
It's index 159. There's several instances where the IV data are slightly non-monotonic (current increases with voltage). Way down in the details of that fitting algorithm, a quadratic spline is fit that preserves monotonicity. That's where the failure originates; for two of the data intervals, the spline has undefined coefficients. A few points with increasing current wouldn't usually cause this step to fail. Hard to say why it happens in this particular case. I recommend simply dropping the IV curve as the easiest way to move forward. If you'd rather keep it, then I'd subset the data to remove points where current increases. |
It would be nice to modify the code so that if fitting fails for some of the IV curves, the function returns nan for those entries. We can't always be sure that filtering will remove all the "bad" cruves. Also, why isn't there a diode factor fit for each run? There is only one diode factor returned for the entire set. |
I agree. #1235
If you want instead to fit the single diode equation to each IV curve, I'd suggest |
That makes sense. |
I just tried using https://github.com/DuraMAT/pvpro/blob/master/examples/nist-iv03_process.py Data available: This is the IV curve that the algorithm failed on: |
Which IV curve index is that failed one? I would like to isolate and save input data that cause failures, to better understand why the algorithm didn't work. |
index was 617. Here is the iv curve you can copy/paste. voltage = np.array([ 0.34, 0.68, 1.02, 1.36, 1.7 , 2.04, 2.38, 2.72, 3.06, current = np.array([7.002207 , np.nan, np.nan, np.nan, np.nan, |
The
|
I'm open to better handling of nan's, but my current view is that the |
I've run |
Is |
Two thoughts:
@mikofski the |
At certain times of year, it seems there is a tight relationship between n_diode and Isat: But other times of year, there is significant spread: But this can be corrected by changing Eg_ref: But, I still need a way to find the "true" diode factor and saturation current at ref from this data. Or I can try to go back to |
What is the source of the temperature data? |
Temperature data is an RTD mounted to the back of the single module. There are 4 different sensors on the one module, I used the one mounted in the center. |
I would use the cubic temperature dependence of Isat and supply the temperature data to regress the Isat term to fit the constraint like this: |
Summarizing possible actions mentioned in this Issue discussion:
The other ideas about failing gracefully are tracked in #1235 |
@cwhanse I am trying to fit IV curve traces from the NIST dataset available here: https://pvdata.nist.gov/
Why doesn't pvlib.ivtools.sdm.fit_desoto_sandia provide a diode factor fit for each run?
It is unclear why we must input v_oc, i_sc, v_mp, i_mp since the IV curve is given. Could it be possible for fit_desoto_sandia to extract these values automatically?
It would be helpful if you can check over the code to make sure I am doing this correctly. This code could be provided as an example in pvlib once it is working well.
Please see example code and data here:
https://github.com/DuraMAT/pvpro/blob/master/examples/nist-iv02_process.py
https://github.com/DuraMAT/pvpro/tree/master/examples/data
The text was updated successfully, but these errors were encountered: