Adding new modules and accessing data

256 views
Skip to first unread message

Hasan Jalal

unread,
Sep 20, 2020, 9:40:28 AM9/20/20
to pvlib-python
I have recently started working with Pvlib and do not have much idea. We have four types of solar panels including Cigs and Amorphous at our university. I have the data for these two solar cells in our university database. I need to add the data of these solar cells in Pvlib python library , analyse it and then do forecasting. How can I add new modules into Pvlib for cigs and amorphous cells and access the data for Poly crystalline and mono crystalline which is already present in the sandia database.
I would be grateful for your help.

cwh...@sandia.gov

unread,
Sep 21, 2020, 1:09:03 PM9/21/20
to pvlib-python
Hi,

If I understand correctly, you want to add parameters for one of the models to calculate module power. Could you clarify what data you have for these modules? Do you have IV curves, datasheets or both?

Cliff

Hasan Jalal

unread,
Sep 21, 2020, 1:31:41 PM9/21/20
to pvlib-python
For the Cigs and amorphous solar cells we have all the data which is collected like Voc, Isc , Vmpp. I need to add these data into the Pvlib library and then do further forecasting.

cwh...@sandia.gov

unread,
Sep 22, 2020, 3:06:55 PM9/22/20
to pvlib-python
With Voc, Isc, etc. in hand, pvlib provides functions to get model parameters for the CEC and De Soto module models. I'd recommend starting with the CEC model, since the fitting function is likely to be more reliable (i.e., convergence is more likely) than the De Soto fitting function. The CEC and De Soto models will generate nearly the same power values as output.

The CEC fitting function is pvlib.ivtools.sdm.fit_cec_sam. It requires an optional package to be installed: NREL-PySAM, see  https://github.com/NREL/pysam  for details.

Cheers,

Cliff
 

Hasan Jalal

unread,
Sep 24, 2020, 5:46:06 PM9/24/20
to pvlib-python
I am not sure I get you. I will try to explain what I am trying to do.
I am new to Pvlib and just started few days ago. We have four different solar cells installed in our university. I have attached the specifications of the four cells below. I want to add these cells into the PVlib library and then do further modeling on each of them. Can you please guide me how to proceed. I just need to know that how can I use the specifications of each solar cell mentioned below to integrate them with pvlib. In the cec and sandia database we only have silicon based solar cells. I would be grateful for your assistance.

Solibro_datasheet_SL2_G2-3_2017-12_Rev01_EN.pdf
Notice panneau Ben-Q POLYCRISTALLIN.pdf
Notice panneau Ben-Q MONOCRISTALLIN.pdf
sharp-solar-thin-film-130w-135w-nae130l5-nae135l5-NA-ExxxL5-glass-glass.pdf

cwh...@sandia.gov

unread,
Sep 25, 2020, 10:16:40 AM9/25/20
to pvlib-python
You are saying "cells" but the datasheets you have attached are for modules. Here,I'll assume you want to model each of these modules rather than a cell.

The CEC database distributed with pvlib contains parameters for the CEC module model, which are alpha_sc, a_ref, I_L_ref, I_o_ref, R_sh_ref, R_s. These parameters are described in the documentation for the function pvlib.pvystem.calcparams_cec.

What you want to do is to calculate values for these 6 parameters for each of the four modules. You don't need to add the parameters to the CEC database, you can provide them to pvlib in your own code.

The first parameter, alpha_sc, is found on the datasheet. Using the PM060P00 250W as an example, the value is the temperature coefficient for short-circuit current in units of A/C: 0.07%/C * 8.69A = 0.006083 A/C

You will also need the temperature coefficients for Voc and power in units of V/C and W/C, respectively:

beta_voc = -0.3%/C * 30.6V = -0.0918 V/C
gamma_pmp = -0.39%/C * 250W = -0.975 W/C

The other five parameters can be gotten as output from the pvlib.ivtools.sdm.fit_cec_sam function. For the PM060P00 250W module,

[I_L_ref, I_o_ref, R_s, R_sh_ref, a_ref] = pvlib.ivtools.sdm.fit_cec_sam(celltype='polySi', v_mp=30.6, i_mp=8.17, v_oc=37.4, i_sc=8.69, alpha_sc=0.006083, beta_voc=-0.0918, gamma_pmp=-0.975, cells_in_series=60)

If instead you want to model a single cell from the information on these data sheets, you need to scale several of the parameters obtained from pvlib.ivtools.sdm.fit_cec_sam

R_s / 60
R_sh_ref / 60
a_ref / 60

I hope this gets you started,

Cliff

Hasan Jalal

unread,
Sep 27, 2020, 12:23:09 PM9/27/20
to pvlib-python
Thank you so much for your response and it helped me get started. I tried to calculate the values of the five parameters using the pvlib.ivtools.sdm.fit_cec_sam function by the same code which you wrote above:

[I_L_ref, I_o_ref, R_s, R_sh_ref, a_ref] = pvlib.ivtools.sdm.fit_cec_sam(celltype='polySi', v_mp=30.6, i_mp=8.17, v_oc=37.4, i_sc=8.69, alpha_sc=0.006083, beta_voc=-0.0918, gamma_pmp=-0.975, cells_in_series=60) 

But as a result of this I am getting 
RuntimeError: Parameter estimation failed 

I tried searching this error on internet and pvlib documentation but couldn't find anything. Can you please help me with this. Do I need to store the output of this function in a separate array? What and how does this function outputs.

Moreover I wanted to ask that once I have the six parameters calculated for the four modules , how can I draw IV curves for them and do further modeling on each of the modules. 
Waiting for your response.

Mohammad Hasan Jalal
 

cwh...@sandia.gov

unread,
Sep 27, 2020, 12:32:24 PM9/27/20
to pvlib-python
Hi Mohammad,

Unfortunately, that parameter estimation is not guaranteed. pvlib wraps a function in the SAM library. The SAM function is solving a system of 6 equations for a minimum, and sometimes it does not converge. When the algorithm doesn't converge pvlib can't provide more information about what went wrong, since the only information provided by SAM is a failure flag.

Is there any similar module in the CEC module library?

If you are able to get values for those 6 parameters, you can model the IV curves by using two functions in sequence:
pvlib.pvsystem.calcparams_cec  - this function calculates values for the five parameters in the diode equation at each irradiance and temperature condition
pvlib.pvsystem.singlediode - this function solves the single diode equation for each irradiance and temperature condition.

Cliff

cwh...@sandia.gov

unread,
Sep 27, 2020, 12:52:59 PM9/27/20
to pvlib-python
I think the  PM060P00 and PM060P02 modules are in the CEC database as AU Optronics PM060P00_250 etc.

There don't appear to be any listings for Solibro CIGS modules, nor under Hanergy or Q-cells. The manufacturer name in the database doesn't necessarily change when a company is bought.

There are a few Sharp thin-film modules, but I don't recognize any that look like the one described the pdf you posted. 

A module would only be in that database if the manufacturer (or someone else) had submitted the information to the CEC to qualify the product for California's incentives.

Cliff

Hasan Jalal

unread,
Sep 27, 2020, 1:20:07 PM9/27/20
to pvlib-python
Respected Sir

Thanks a lot for your response. I have looked at the CEC and the Sandia database both and they only have modules for MonoSi and Polysi. I haven't seen any of the modules for cigs and amorphous technology in these databases. As you mentioned  PM060P00 and PM060P02 modules are in the CEC database. There are a few sharp modules but they are all of monoSi and polySi. 

So for the PM060P00 and PM060P02 modules,  I can just call them from the CEC database and calculate the six parameters for them ?

Can you tell me is there any other way to calculate the parameters for the other two modules (cigs and amorphous ones) so that I can do further modeling on them. Thats one of the tasks I have been assigned by my professor.

As far as I have understood once I have all the six parameters calculated, I can use pvlib.pvsystem.calcparams_cec and pvlib.pvsystem.singlediode to calculate the IV curves for the modules. But the function pvlib.pvsystem.calcparams_cec also needs some other parameters like 
effective_irradiance
EgRef
dEgdT   

How do we calculate these?
Are there any other methods apart from single diode model to model IV curves ?

Waiting for your reply

Mohammad Hasan Jalal

Hasan Jalal

unread,
Sep 27, 2020, 7:02:48 PM9/27/20
to pvlib-python
Respected Sir

I will be waiting for your reply. 
If you know any other method or function to calculate the parameters for the other two modules (cigs and amorphous ones) so that I can do further modeling on them. Thats one of the tasks I have been assigned by my professor. As the databases don't have any cigs or amorphous modules in them. I need to do modeling on these modules.

Mohammad Hasan Jalal

Hasan Jalal

unread,
Sep 28, 2020, 12:37:19 PM9/28/20
to pvlib-python
Respected Sir

Thanks a lot for your response. I have looked at the CEC and the Sandia database both and they only have modules for MonoSi and Polysi. I haven't seen any of the modules for cigs and amorphous technology in these databases. As you mentioned  PM060P00 and PM060P02 modules are in the CEC database. There are a few sharp modules but they are all of monoSi and polySi. 

So for the PM060P00 and PM060P02 modules,  I can just call them from the CEC database and calculate the six parameters for them ? Can you please tell me how to do that ?

Can you tell me is there any other way to calculate the parameters for the other two modules (cigs and amorphous ones) so that I can do further modeling on them. Thats one of the tasks I have been assigned by my professor.

As far as I have understood once I have all the six parameters calculated, I can use pvlib.pvsystem.calcparams_cec and pvlib.pvsystem.singlediode to calculate the IV curves for the modules. But the function pvlib.pvsystem.calcparams_cec also needs some other parameters like 
effective_irradiance
EgRef
dEgdT   

How do we calculate these?
Are there any other methods apart from single diode model to model IV curves ?

Waiting for your reply

Mohammad Hasan Jalal

cwh...@sandia.gov

unread,
Sep 28, 2020, 1:15:06 PM9/28/20
to pvlib-python
CIGS and a-Si modules are often simply termed "thin-film"

The CEC database provides the 6 parameters, you don't need to calculate them.

I'm happy to continue to answer questions about pvlib, but from the questions you are asking I think you will need to educate yourself a bit more on the models for PV modules. This paper is a good place to start:


Cheers,

Cliff

Hasan Jalal

unread,
Sep 28, 2020, 3:34:24 PM9/28/20
to pvlib-python
Respected Sir

Thanks a lot for your response. 
I have read the paper and done a bit of research and am now a bit confident about the modeling of IV curves.

But what I am still not able to find is about the thin film and amorphous modules. Can you tell me is there any other way to calculate the parameters for them so that I can do further modeling on them. I really need to get over with this. 
The datasheets of the modules I attached (cigs and amorphous), I need to model IV curves and then do further modeling on them. Once I have the results we will compare it with the original results collected at the lab.

I came across another method to draw IV curves and it uses two parameters instead of five. Do you have any idea about this ?

Waiting for your reply

Mohammad Hasan Jalal

Mark Mikofski

unread,
Sep 28, 2020, 6:14:41 PM9/28/20
to pvlib-python
Hi Hasan,

Sometimes the single diode model parameters are difficult to calculate from the datasheets and IV curve measurements, because the initial guesses are too far off. You need to get better initial guesses. There are some other tools you can try to get closer:
https://pvmodel.umh.es/

basically what you are trying to do is regress the singlediode model equations to fit the data points that you have. You can solve part of the system analytically, but the Shockley equation used as an analog for a solarcell is implicit, and cannot be solved explicitly. That's the challenge.

Hasan Jalal

unread,
Oct 1, 2020, 4:43:25 PM10/1/20
to pvlib-python
I have found the exact two modules of the Monosi and polysi in the CEC database and was able to model their IV curves using the single diode model.
However the data base doesn't have too many options for CIGS and amorphous and I wasn't able to find them in any of the databases. I have attached the data sheets of all the four modules below. Can you please tell me that using the information given on the datasheets how can I calculate the parameters for the cigs and amorphous to model their IV curves. I tried using the above two sites but wasn't able to figure out which specifications to use.

Regards
sharp-solar-thin-film-130w-135w-nae130l5-nae135l5-NA-ExxxL5-glass-glass (1).pdf
Solibro_datasheet_SL2_G2-3_2017-12_Rev01_EN (1).pdf
Notice panneau Ben-Q POLYCRISTALLIN (1).pdf
Notice panneau Ben-Q MONOCRISTALLIN (1).pdf

Hasan Jalal

unread,
Oct 2, 2020, 6:05:44 AM10/2/20
to pvlib-python
Respected Sir,
 
I was successful in calculating the values of electrical parameters of Amorphous module using pvlib.ivtools.sdm.fit_cec_sam. As you can see in the datasheet of the amorphous modules the temperature coefficients are given in %/C.

But the temperature coefficients for the CIGS are given in %/K. I was getting the Parameter estimation failed error when I tried with
pvlib.ivtools.sdm.fit_cec_sam and then I tried using pvlib.ivtools.sdm.fit_desoto but it was giving the same error.
I think this might be due to the fact that temperature coefficients are given in other units or is it fine? Do I need to convert the temperature coefficients ?

Can you please help me.

Regards
Mohammad Hasan Jalal

Hasan Jalal

unread,
Oct 7, 2020, 5:29:21 PM10/7/20
to pvlib-python
Respected Sir,
 
I was successful in calculating the values of electrical parameters of Amorphous module using pvlib.ivtools.sdm.fit_cec_sam. When I tried with the CIGS module I was getting the Parameter estimation failed error when I tried with pvlib.ivtools.sdm.fit_cec_sam and then I tried using pvlib.ivtools.sdm.fit_desoto but it was giving the same error.
Can you please tell me how to find the parameters for single diode model for CIGS using the datasheets through the website links you gave me , so that I can model their IV curves. Once I have their IV curves how can I incorporate the trackers (fixed and moving ) with the modules?
Is there any way to check that whether the IV curves I get have the correct values ?
I also wanted to know that how can I connect two modules in series in PVLIB and can you tell me the use of modelchain
Waiting for your reply.

Regards
Mohammad Hasan Jalal

kevina...@gmail.com

unread,
Oct 7, 2020, 6:18:43 PM10/7/20
to pvlib-python
Hello Mohammad, here are a few thoughts that I hope are helpful:

- %/C and %/K are equivalent; this is the percent change in output for each degree change in temperature, and a one degree C change is the same as a one degree K change.  However, please be sure to check the units required by the pvlib functions; see for example this note in our documentation: https://pvlib-python.readthedocs.io/en/stable/generated/pvlib.ivtools.sdm.fit_desoto.html
- If you cannot fit your CIGS module using any of the provided methods, you might consider using another model that does not require parameters for the single-diode equation, for example the SAPM and PVWatts models.  It sounds like maybe the level of detail of a full I-V curve isn't required for your application.  Of course, the tradeoff with simpler models is less accurate predictions.
- For how to model trackers and use ModelChain, please check the documentation at https://pvlib-python.readthedocs.io, there are short example programs as well as a pretty detailed page just about ModelChain there.  Otherwise we would just be copy/pasting from those pages into this thread!  If you have specific questions that aren't answered by the documentation, feel free to ask them.
- Modeling I-V curves is one thing, but it sounds like you want to do forecasting for outdoor systems, which will involve many other steps.  Here are some websites that give good background on PV modeling: https://pvpmc.sandia.gov/modeling-steps/  and  https://www.pveducation.org/pvcdrom/welcome-to-pvcdrom

Cheers,
Kevin

Hasan Jalal

unread,
Oct 8, 2020, 7:12:21 PM10/8/20
to pvlib-python
Respected Sir, 
Thanks for your reply.
I have tried reading the documentation and the links posted by you. In the documentation for model chain and trackers they have mostly used the modules from the databases. How can I use modules which are not in the database , like I have a CIGS and amorphous module which are not present in the database? 
Moreover after modeling of IV curves, I want to do forecasting on these different modules as you mentioned. What further steps do I need to take for further modeling. I want to do forecasting on these modules and then compare it with the data we record. 
I would be grateful for your help.'

Regards
Mohammad Hasan Jalal

Hasan Jalal

unread,
Oct 8, 2020, 7:50:40 PM10/8/20
to pvlib-python
I also wanted to ask that for calculating the parameters for single diode model , are these two the only methods?
Calculating values for   I_L_ref , I_o_ref , R_s , R_sh_ref , a_ref ?
pvlib.ivtools.sdm.fit_cec_sam 
pvlib.ivtools.sdm.fit_desoto
Is there any other method apart from the above two to calculate these values. If yes then please tell me how.

Mohammad Hasan Jalal

Mark Mikofski

unread,
Oct 9, 2020, 2:14:30 AM10/9/20
to Hasan Jalal, pvlib-python
Hi Hasan,

I agree with Kevin, you should check try the Sandia Array Performance Model or SAPM. It uses modules from the Sandia Module database. You can download a CSV file from NREL here:

Actually it's already included in pvlib here:

There is an online searchable version of the Sandia Module Database at PVFree here:

you can sort by cell technology or search for a-Si or CIS (in the database CIGS is listed as CIS) There are many modules listed.
For example, here is a Solar Frontier CIS module

Once you've found the module you want, I think you can get it from the NREL CSV file.


>>> from pvlib import pvsystem
>>> sandiamod = pvsystem.retrieve_sam('SandiaMod')
>>> solarfrontier = sandiamod['Solar_Frontier_SF_160S__2013_']  # replace spaces, hyphens, and square-brackets all with underscores, 
>>>  solarfrontier
Vintage                                                          2013
Area                                                             1.22
Material                                                          CIS
Cells_in_Series                                                   172
Parallel_Strings                                                    1
Isco                                                           2.0259
Voco                                                          112.505
Impo                                                           1.8356
Vmpo                                                          86.6752
Aisc                                                           0.0001
Aimp                                                          -0.0003
C0                                                             1.0096
C1                                                            -0.0096
Bvoco                                                         -0.3044
Mbvoc                                                               0
Bvmpo                                                         -0.2339
Mbvmp                                                               0
N                                                              1.2066
C2                                                            -0.5426
C3                                                           -15.2598
A0                                                             0.9354
A1                                                            0.06809
A2                                                           -0.02094
A3                                                            0.00293
A4                                                         -0.0001564
B0                                                                  1
B1                                                            -0.0152
B2                                                           0.001598
B3                                                         -5.682e-05
B4                                                          8.326e-07
B5                                                         -4.363e-09
DTC                                                              3.29
FD                                                                  1
A                                                             -3.6836
B                                                             -0.1483
C4                                                                NaN
C5                                                                NaN
IXO                                                               NaN
IXXO                                                              NaN
C6                                                                NaN
C7                                                                NaN
Notes               Source:  CFV Solar Test Lab.  Tested 2013.  Mo...
Name: Solar_Frontier_SF_160S__2013_, dtype: object

Now that you have the Solar Frontier CIS module, use the SAPM to calculate performance.
https://pvlib-python.readthedocs.io/en/stable/generated/pvlib.pvsystem.sapm.html#pvlib.pvsystem.sapm

For example, at a single instant in time when irradiance is Ee, and cell temperatures are Tc, the module power would be 115[W]

In [14]: Ee = 789  # effective irradiance [W/m^2]

In [15]: Tc = 56  # cell temperature [C]

In [16]: pvsystem.sapm(Ee, Tc, solarfrontier)
Out[16]:
OrderedDict([('i_sc', 1.6033902488100003),
             ('i_mp', 1.437725687890298),
             ('v_oc', 101.67335192014608),
             ('v_mp', 80.00858978088583),
             ('p_mp', 115.03040477985674),
             ('i_x', nan),
             ('i_xx', nan)])

now repeat with one all of the timesteps instead of just a single instance.

Then look in the Sandia modules for the amorphous a-Si modules.

Good Luck! Does this help?
-Mark


--
You received this message because you are subscribed to a topic in the Google Groups "pvlib-python" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pvlib-python/c7RN4cSnmxw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pvlib-python...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pvlib-python/b61773d4-7d9b-4587-9734-a1123680ba5fn%40googlegroups.com.


--
Being deeply loved by someone gives you strength;
loving someone deeply gives you courage.
Lao Tzu

Hasan Jalal

unread,
Oct 9, 2020, 6:52:03 AM10/9/20
to pvlib-python
Thank you for your reply.
Can you please tell me the values of EgRef and dEgdT values for amorphous and CIGS.
I have tried searching for it on the internet and Pvlib website but found nothing.
Waiting for your reply.

Mohammad Hasan Jalal

Mark Mikofski

unread,
Oct 9, 2020, 10:11:52 AM10/9/20
to Hasan Jalal, pvlib-python
There is a list of bad Gap energies in the pvsyst help docs (https://www.pvsyst.com/help/pvmodule_model.htm?zoom_highlightsub=gap+energy) but I also found this dept.  of energy website (https://www.energy.gov/eere/solar/copper-indium-gallium-diselenide) that says:

It was later found that by substituting gallium (Ga) for indium (In), the bandgap can be increased from about 1.04 electron-volts (eV) for copper indium diselenide (CIS) films to about 1.68 eV for copper gallium diselenide (CGS) films. 

So
CIS: 1.0 [eV]
CGS: 1.7 [eV]
CIGS: ? but better so close to 1.5[eV]???

According to wikipedia (https://en.m.wikipedia.org/wiki/Copper_indium_gallium_selenide_solar_cells) CIGS bandgap is device dependent caring continually between the two extremes but the give 1.5[eV]

Have you consulted Solar Frontier or Mua Sole? There's a partial list of cis/cigs mfg on gtm (https://www.google.com/amp/s/www.greentechmedia.com/amp/article/CIGS-Solar-Update-New-Efficiency-World-Record-MiaSole-at-Hanergy-Solar-F) you can see they were all acquired by Hanergy.

I don't know what the release sensitive of the band Gap is, that parameter is only used in SAM.

Now as Kevin indicated, the beauty of the Sandia array performance model (sapm) is that it doesn't require the parameters like bands gap

Hasan Jalal

unread,
Oct 18, 2020, 1:07:54 PM10/18/20
to pvlib-python
Respected Sir,

Thanks for all the help up till now. I have read the documentation but I have a few questions. Firstly the pvlib documentation mentions the single-axis tracker. I have two types of trackers in my system: the fixed one and the mobile one. The mobile tracker follows the sun and changes its position according to the sun throughout the day. While the fixed remains fixed. How can I incorporate both of these trackers into pvlib. 

Secondly, I have a system in which two MonoSi are connected in series, 2 Polysi in series, and 2 Amorphous in series. How can I model this in Pvlib?
I have read about modelchain but wasn't able to understand it a lot. Can you please tell me how to connect a module in series in pvlib, so that I can do further modeling on them?

Waiting for your reply

Regards
Mohammad Hasan Jalal

Hasan Jalal

unread,
Oct 26, 2020, 1:59:26 PM10/26/20
to pvlib-python

Respected Sir,

Thanks for all the help up till now. I have read the documentation but I have a few questions. Firstly the pvlib documentation mentions the single-axis tracker. I have two types of trackers in my system: the fixed one and the mobile one. The mobile tracker follows the sun and changes its position according to the sun throughout the day. While the fixed remains fixed. How can I incorporate both of these trackers into pvlib. I have researched a lot but haven't found anything yet.

Secondly, I have a system with mobile tracker in which two MonoSi are connected in series, 2 Polysi in series, and 2 Amorphous in series. How can I model this in Pvlib?
I have read about modelchain but wasn't able to understand it a lot. Can you please tell me how to connect a module in series in pvlib, so that I can do further modeling on them?

Waiting for your reply

Regards
Mohammad Hasan Jalal

Miguel Sánchez de León Peque

unread,
Dec 7, 2020, 1:46:22 PM12/7/20
to pvlib-python
I was reading this thread and maybe the problem of non-convergence is due to a bad `gamma_pmp` value. The originally suggested value of:

gamma_pmp = -0.39%/C * 250W = -0.975 W/C

Is in W/C, but the documentation says it should be in %/C. Using `-0.39` instead results in a successful parameter estimation:

pvlib.ivtools.sdm.fit_cec_sam(celltype='polySi', v_mp=30.6, i_mp=8.17, v_oc=37.4, i_sc=8.69, alpha_sc=0.006083
   ...: , beta_voc=-0.0918, gamma_pmp=-0.39, cells_in_series=60)

Hope it helps.

Reply all
Reply to author
Forward
0 new messages