SunPower / PVMismatch

An explicit Python PV system IV & PV curve trace calculator which can also calculate mismatch.
http://sunpower.github.io/PVMismatch/
BSD 3-Clause "New" or "Revised" License
79 stars 30 forks source link

fixes #50 - generates pvcell coeffs from iec 61853 #51

Closed mikofski closed 7 years ago

mikofski commented 7 years ago

Signed-off-by: Mark Mikofski mark.mikofski@sunpowercorp.com

mikofski commented 7 years ago

@bmeyers this is ready for review for like a release candidate release. Can you take a quick look and let me know if you think it's okay to merge and release as v3.1rc1? Don't worry about the ugly jacobian expressions, they were generated by sympy, but I didn't simplify them at all, takes too much time and the calculation savings is in μs. Their validity is checked in the tests, so if you're inclined you can validate the sympy expressions.

I won't work any more on this for awhile, but it is good enough to use with PVMismatch the way that PVMismatch is currently implemented, IE: with 2-diode model and no irradiance modification of either Isat2 or Rsh.

Unfortunately the errors of off-STC conditions vary widely between module types. This will be resolved by switching to either CEC or PVSyst model or by adding modifiers to either Rsh, Isat2 or both.

The gen_coeff methods can be used with arrays of input if the optimizer method is set to 'lm', or input at any (irr, tc) condition using the default 'hbrj' solver. Generating coefficients over the entire IEC61853 matrix do confirm that Isat1 and Rs are constant for all (irr, tc), but Isat2 and Rsh vary with irradiance.

The next time we visit this, we should look into resolving the irradiance dependence of Isat2 and Rsh.

bmeyers commented 7 years ago

@mikofski taking a look now. looks like a lot of work!

bcbourne commented 7 years ago

Mark, have we done any testing with measured 61853 data to confirm that the generated coefs are consistent with the test data?

-Ben Bourne SunPower Corporation 650-208-6957 (c) 510-260-8388 (o)

Sent from my mobile phone

On Mar 23, 2017, at 10:28 AM, Mark Mikofski notifications@github.com<mailto:notifications@github.com> wrote:

@bmeyershttps://github.com/bmeyers this is ready for review for like a release candidate release. Can you take a quick look and let me know if you think it's okay to merge and release as v3.1rc1? Don't worry about the ugly jacobian expressions, they were generated by sympy, but I didn't simplify them at all, takes too much time and the calculation savings is in μs. Their validity is checked in the tests, so if you're inclined you can validate the sympy expressions.

I won't work any more on this for awhile, but it is good enough to use with PVMismatch the way that PVMismatch is currently implemented, IE: with 2-diode model and no irradiance modification of either Isat2 or Rsh.

Unfortunately the errors of off-STC conditions vary widely between module types. This will be resolved by switching to either CEC or PVSyst model or by adding modifiers to either Rsh, Isat2 or both.

The gen_coeff methods can be used with arrays of input if the optimizer method is set to 'lm', or input at any (irr, tc) condition using the default 'hbrj' solver. Generating coefficients over the entire IEC61853 matrix do confirm that Isat1 and Rs are constant for all (irr, tc), but Isat2 and Rsh vary with irradiance.

The next time we visit this, we should look into resolving the irradiance dependence of Isat2 and Rsh.

— You are receiving this because your review was requested. Reply to this email directly, view it on GitHubhttps://github.com/SunPower/PVMismatch/pull/51#issuecomment-288797604, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADfNiumpXygCRSecoFMw14p4bLCNC7Esks5roqungaJpZM4MhFDn.

mikofski commented 7 years ago

@BenBourne unfortunately, the generated 2-diode coefficients have two issues:

  1. The 2-diode model as implemented (without irradiance modifiers for Rsh and Isat2) do not fit all of the data well. In particular there are errors at low temperature and high temperature. The errors vary from module to module. EG for P series the errors were smaller than for E series.
  2. The 2-diode model as implemented fits better when only STC values are used. When all IEC61853 measurements are used, the variaitions in Rsh and Isat2 are too large to be fit by a common set of parameters for the entire range of IEC61853. In order to fit the entire range we will have to either:
    • use irradiance modifiers with either Rsh, Isat2 or both
    • switch to either CEC or PVSyst model

This is as good as we can get it for right now. When we have time to revisit this, and improve the models to reduce the error. For now I think this PR satisfies the need to provide PVMismatch parameters at STC for any module in the SAPM database.

P-series (fit with only STC measurments)

pvmismatch_gen_p17-345w_coeffs

E-series (fit with only STC measurments)

pvmismatch_gen_coeffs

bmeyers commented 7 years ago

Excellent work, Mark!

mikofski commented 7 years ago

For cubic dependence of Isat1 see

Also in tests with data for PVLife the first diode in two diode model fits this relation very close. In only one diode model doesn't fit as well