Enhance SAM with features tailored to your specific needs! We collaborate with companies, universities, and organizations to privately fund new capabilities or analyses. Your investment drives innovation while benefiting the broader energy community. Email us to learn more.

pvsandiainv SSC module appears to use wrong equation

  • Miguel
  • Topic Author
More
21 Apr 2022 08:08 #10850 by Miguel
Hi Paul:

I have been working with the pvsandiainv module from SSC library and, checking the implementation of this module, I found what it is maybe a mistake in pvsandiainv code. If I am not wrong, pvsandiainv uses lib_sandia for ac power calculation and, exactly, sandia_inverter_t. The implemented equation is supposed to be equation 12.3 from the SAM Photovoltaic ModelTechnical Reference Update ( www.nrel.gov/docs/fy18osti/67399.pdf ) but, by checking the source code in  github.com/NREL/ssc/blob/patch/shared/lib_sandia.cpp , I found that the equation is wrong. In line 424, it seems to be a mistake when using C0 instead of C when multipliying by (Pdc[m] - B).

Could you please help me in clarifying this?

Thanks in advance.
Kind regards
Miguel

Please Log in or Create an account to join the conversation.

  • Paul Gilman
More
21 Apr 2022 11:52 #10857 by Paul Gilman
Hi Miguel,

The code in question is here:

github.com/NREL/ssc/blob/5ec04426cdfc4f83c397feb7c1ef66753ab9a70e/shared/lib_sandia.cpp#L424

The original source of that is Equation 1 on p. 14 of King, D.L.; Boyson, W.E.; and Kratochvil, J.A. (2004). Photovoltaic Array Performance Model. 41 pp.; Sandia Report No. 2004-3535. ( PDF 1.8 MB )

It is also described on the Sandia PVPMC website: pvpmc.sandia.gov/modeling-steps/dc-to-ac-conversion/sandia-inverter-model/

And, as you mention as Equation 12.3 on p. 74 of Gilman, P.; Dobos, A.; DiOrio, N.; Freeman, J.; Janzou, S.; Ryberg, D. (2018) SAM Photovoltaic Model Technical Reference Update. 93 pp.;
NREL/TP-6A20-67399. ( PDF 1.8 MB ).

I think there is a discrepancy between SAM and the documented equations. I will investigate and follow up when I learn more.

Best regards,
Paul.

Please Log in or Create an account to join the conversation.

  • Miguel
  • Topic Author
More
26 Apr 2022 01:29 #10882 by Miguel
Ok, thank you!

Regards
Miguel

Please Log in or Create an account to join the conversation.

  • cwhanse@sandia.gov
More
21 Jun 2022 13:28 #11165 by cwhanse@sandia.gov
Replied by cwhanse@sandia.gov on topic pvsandiainv SSC module appears to use wrong equation
One correction - the source equation is Eq. 1 on pg. 14 of King, D. L., S. Gonzalez, G. M. Galbraith, and W. E. Boyson (2007). Performance Model for Grid-Connected Photovoltaic Inverter. Sandia Report No. SAND2007-5036. September 2007.  Here.

Miguel is correct: the code is in error, multiplying by C0 instead of C from line 416.

Please Log in or Create an account to join the conversation.

Moderators: Paul Gilman
Powered by Kunena Forum