Skip to content
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

Maximum power point tracking for mismatched devices (single-diode model) #1923

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

markcampanelli
Copy link
Contributor

  • Closes #xxxx
  • I am familiar with the contributing guidelines
  • Tests added
  • Updates entries in docs/sphinx/source/reference for API changes.
  • Adds description and name entries in the appropriate "what's new" file in docs/sphinx/source/whatsnew for all changes. Includes link to the GitHub Issue with :issue:`num` or this Pull Request with :pull:`num`. Includes contributor name and/or GitHub username (link with :ghuser:`user`).
  • New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.
  • Pull request is nearly complete and ready for detailed review.
  • Maintainer: Appropriate GitHub Labels (including remote-data) and Milestone are assigned to the Pull Request and linked Issue.

I would like some early feedback on this idea and code.

@markcampanelli markcampanelli changed the title Maximum power point tracking for mismatched devices (singlediode model) Maximum power point tracking for mismatched devices (single-diode model) Dec 2, 2023
@planted-jason-hoving
Copy link

@markcampanelli thanks for pointing me to this! It generally works well for me but I noticed a couple corner cases that need to be handled differently.

With ~zero irradiance at night the photocurrent drops to zero and the shunt resistance goes to inf, or at least that is the case for the CEC model. During the optimization search pvsystem.v_from_i will in turn use singlediode._lambert2w_v_from_i and that results in a log(negative number) error as it tries current values less than zero. Could be fixed with constraints on the minimize call. What I did for now was just return zero power if any photocurrent is zero, but I know there might be some cases where people want to still drive current through a shaded panel or something.

At very low irradiance, even with the constraints above added, I am getting some convergence issues on the scipy call. I was able to resolve it by adding a tolerance (say 1e-6A) that was fine for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants