Open toddkarin opened 4 years ago
That function is a rather faithful implementation of the method in De soto's paper. In my opinion, this function is primarily of academic interest, as the method behind the current in NREL-PySAM fits almost the same model (the Adjust parameter can be set to 0. in most situations), and is more robust. The NREL-PySAM method is available through pvlib.ivtools.fit_sdm_cec_sam.
The code for fit_sdm_desoto could be made more robust, perhaps by exposing a new argument to provide initial guesses of parameters in place of the hardwired initial values.
Problem: pvsystem.fit_sdm_desoto fails with certain valid inputs I found some issues with fit_sdm_desoto on certain inputs where the algorithm fails to converge.
To Reproduce Try running this script:
I get the error:
Note if you change I_o_ref to 1e-10 or to 20e-10, the algorithm succeeds. There isn't a good reason for it to fail with a saturation current of 8e-10 or 10e-10, etc. Perhaps a change of variable is needed in order to convince the algorithm it is making progress?