SAM diode parameter extraction error

  • David
  • Topic Author
More
15 Aug 2020 19:27 - 17 Aug 2020 18:06 #8586 by David
I've been trying to create the IV curve for all the PV operating points over 1 year for some geographic locations. I am able to run the python module for some of the points but for some I get an error.  nrel-pysam.readthedocs.io/en/master/modules/SixParsolve.html

I am running the Pvsamv1 module to extract the PV information like the operating current, voltage, power, etc. for certain locations and for a specific PV panel which I get from the CEC Modules.xlsx file located in the libraries folder of the SAM software installation. 
I initiate a new instance of the module with SixParsolve.new(). To define the parameters for this I use:

SixParsolve.SixParameterSolver.Imp
SixParsolve.SixParameterSolver.Isc
SixParsolve.SixParameterSolver.Nser
etc.

My inputs before running the execute command are as follows:



It worked fine for inputs like this so i'm not sure what the issue is.



What i'm basically trying to do is apply inverter input limits so that i know how the inverter would clip the input. SAM's clipping method does not take into account the inverter max current so this is why I need to develop my own method. I'm trying to generate the IV curve to be able to know where the operating point would be if for some points they lie outside the inverter envelope. For example, lets say the y-axis is Pdc and x-axis is Vdc for the PV panel and when I connect the inverter I want to know where the new points will be. The only way to truly know where they will move to is if I have the IV curve of each point. The red is the inverter envelope and the 3 red points are some of the blue points that lie outside the inverter envelope. I want to find all the IV curves for all the points outside this envelope so i'm trying to generate the diode parameters SAM uses but for some of the points that lie outside this envelope i'm getting an error when I run the SixParameterSolver module as stated above.
Last edit: 17 Aug 2020 18:06 by David.

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

  • Paul Gilman
More
17 Aug 2020 17:57 #8597 by Paul Gilman
Replied by Paul Gilman on topic SAM diode parameter extraction error
Hi David,

Please attach the images you would like to include in your post as files, and then insert them into the message. Cutting and pasting images into the editor does not work reliably. I was able to recover two of the images you posted, but not the third showing the inverter limits.

Anyway, I think I understand what you're trying to do. The Six Parameter Solver sometimes cannot converge on a solution. It was written to work with parameters under design conditions at STC, so I don't think it is guaranteed to work under the full range of operating conditions. For example, in the the second example in your post has a low Tref value, which might be causing the error.

The pvsamv1 module reports the short circuit current, open circuit voltage, operating voltage, and operating power. That's not the entire I-V curve, but might be helpful for estimating a curve.

Best regards,
Paul.

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

  • David
  • Topic Author
More
17 Aug 2020 18:30 #8599 by David
Replied by David on topic SAM diode parameter extraction error
Ahh ok thanks.

Well I guess my next question would be for the pvsam1 simulations do they not use the single diode model to find the max power point voltage and current based on the IV curve ? Like if pvsam1 is giving me the voltage and current from the PV panel then should it not also be able to give me the IV curve that was used to calculate those voltages and currents ? 

Also, is it save to assume that the operating currents and voltages for the pvsam1 simulation would also be the max power current and voltages of the IV curve ?

From section 9 in ( www.nrel.gov/docs/fy15osti/64102.pdf ) you can see that using CEC Module Model  as the PV panel selection it uses the single diode model and solves it using Newtons method. It also states that the parameters are extracted using 6parsolve which is the same module i'm using for all the DC operating points which pvsam1 spits out. I'm also extracting the cell temperature and the irradiance because they account for some of the inputs to the sixparametersolver. It doesn't make sense to me that it will fail because pvsam1 is providing me the following inputs that I use for the sixparametersolver input:
SixParsolve.SixParameterSolver.Imp
SixParameterSolver.Isc
SixParameterSolver.Tref
SixParameterSolver.Vmp
SixParameterSolver.Voc
The rest of the sixparameter inputs i'm using come from the PV panel i've selected which is the same PV panel I've selected for pvsam1.

Unless pvsam1 solves for all the outputs using a different method i'm not sure why the sixparameter would ever not work since that is what pvsam1 is using in the SAM documentation in  www.nrel.gov/docs/fy15osti/64102.pdf  

Is there another method to obtain the IV curve which would be compatible with the results which pvsam1 gives ? As in is there another method to extract an IV curve where the results from pvsam1 would lie on the IV curve ? There are other user designed python modules which do solve the single diode model but when I use the outputs from pvsam1, pvsam1's operating voltages and current do not lie on the IV curve I generate so this is why i'm trying to use SAM to solve for the parameters. For the operating points that don't crash the sixparameter method I can generate an IV curve where the outputs from pvsam1 lie on the IV curve I generate and are also analogous with Vmp and Imp of the generated curve. 

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

  • Paul Gilman
More
17 Aug 2020 20:20 #8601 by Paul Gilman
Replied by Paul Gilman on topic SAM diode parameter extraction error
There is a more recent version of the SAM PV model technical reference published in 2018 instead of 2015 listed at sam.nrel.gov/photovoltaic/pv-sub-page-2.html. The descriptions in the section of the older manual you are referring to are still relevant.

The Six Parameter Solver (6parsolve) module calculates input parameters (I_L, IL0, R_s, etc.) for the single-diode equivalent model from data sheet parameters. It does not run as part of the pvsamv1 simulation. We do use 6parsolve to generate the parameter values at STC that are in the module library file you mentioned.

In other words, we run the Six Parameter Solver to generate parameters in the CEC module library CSV file, which are at STC. During a  PV model (pvsamv1) simulation, the model reads those parameters to calculate the operating voltage and current given incident irradiance and cell temperature

Best regards,
Paul.

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

  • David
  • Topic Author
More
17 Aug 2020 20:34 #8602 by David
Replied by David on topic SAM diode parameter extraction error
Ok so as per my question, does pvsam1 current and voltage outputs coincide with the Imp and Vmp of the IV curve ? Can we assume that ? 

Can you provide me the location of the code which uses the irradiance and cell temperature to compute the outputs from pvsam1 ?

Can we assume that the ouptuts from pvsam1 are even on an IV curve or is there a way to use any of the SAM modules to generate the correct IV curve that would align with the pvsam1 voltage and current outputs ?

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

  • Paul Gilman
More
18 Aug 2020 16:38 #8606 by Paul Gilman
Replied by Paul Gilman on topic SAM diode parameter extraction error
Hi David,

The pvsamv1 outputs Subarray [n] Operating DC Voltage (subarrayn_dc_voltage) and Subbarray [n] DC power gross (subarray1_dc_gross) are the voltage and power on the power curve at the maximum power point, unless there is inverter voltage clipping or power limiting. When there is voltage clipping, the model recalculates the power curve (See around Line 1812 of cmod_pvsamv1.cpp mentioned below).

The module also reports Subarray n Open circuit DC voltage (subarrayn_voc) and Subbary n Short circuit DC current (subarrayn_isc).

The code that performs these calculations is in ssc/cmod_pvsamv1.cpp (around Line 1677 at the moment) at github.com/NREL/ssc/blob/develop/ssc/cmod_pvsamv1.cpp:



And in shared/lib_cec6par.cpp at github.com/NREL/ssc/blob/develop/shared/lib_cec6par.cpp:



Functions involved in these calculations are also in shared/lib_pvmodel.cpp at github.com/NREL/ssc/blob/develop/shared/lib_pvmodel.cpp.

Here are a list of relevant modules. The SDKtool described at sam.nrel.gov/software-development-kit-sdk.html is useful for exploring the SSC modules:

6parsolve calculates a set of input parameters for the 6-parameter single-diode module model from parameters found on manufacturer datasheets. (Source code at github.com/NREL/ssc/blob/develop/ssc/cmod_6parsolve.cpp)

pv6parmod calculates the module current and voltage given a set of parameters from a manufacturer datasheet and time series of weather data. The results are arrays of hourly or subhourly time series data over one year. (Source code at github.com/NREL/ssc/blob/develop/ssc/cmod_pv6parmod.cpp)

singlediodeparams calculates a set of input parameters for the 6-parameter single-diode module model at operating conditions given irradiance and temperature values with a set of 6 reference parameters. (Source code at github.com/NREL/ssc/blob/develop/ssc/cmod_singlediode.cpp)

singlediode runs the 6-parameter single-diode model to calculate module current and voltage given a set of 6 parameters calculated by 6parsolve. (Source code also at github.com/NREL/ssc/blob/develop/ssc/cmod_singlediode.cpp)

Best regards,
Paul.

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

Moderators: Paul Gilman
Powered by Kunena Forum