# Urgent: Problem with the I-V Curve

73 views

### Ecem Onen

Jun 6, 2024, 7:25:59 AMJun 6
to pvlib-python
Hey everyone,

I'm a Ph.D. student specializing in photovoltaics. I'm currently working on calculating the I-V curve for various irradiance levels. However, I'm facing an issue where the lines on the graph appear to be straight, and I'm having trouble identifying the problem. Is anyone else experiencing similar issues? I'll include the code and the graph below for reference.
At the end of the message, I am including the code to find the missing parameters. Maybe the problem is with my parameters.

The main code:
from pvlib import pvsystem
import numpy as np
import matplotlib.pyplot as plt

# Updated Module Parameters
module_parameters_updated = {
'Name': 'Renogy RSP115DT 115W',
'V_mp': 18.8,  # V
'I_mp': 6.12,  # A
'V_oc': 21.9,  # V
'I_sc': 6.7,   # A
'alpha_sc': -0.0028,  # A/°C
'beta_voc': 0.0006,   # V/°C
'cells_in_series': 36,
'IL': 6.7,   # Light-generated current (A)
'I0': 6.12,  # Dark saturation current (A)
'Rs': 6.7,  # Series resistance (ohms)
'Rsh': 21.9,  # Shunt resistance (ohms)
'a': 788.4  # Product of diode ideality factor, cells in series, and thermal voltage
}

# Define voltage range for I-V curve
voltage = np.linspace(0, module_parameters_updated['V_oc'], 100)

# Define different irradiance levels (in W/m^2)
irradiance_levels = [200, 400, 600, 800, 1000]

# Plot I-V curves for different irradiance levels
plt.figure()

# Calculate I-V curve using singlediode function
result = pvsystem.singlediode(
saturation_current=module_parameters_updated['I0'],
resistance_series=module_parameters_updated['Rs'],
resistance_shunt=module_parameters_updated['Rsh'],
nNsVth=module_parameters_updated['a'],
ivcurve_pnts=100  # Set the number of points for the I-V curve
)

# Extract current and voltage from result
current = result['i']  # current values
voltage = result['v']  # voltage values

# Plot I-V curve

# Add labels, title, legend, and grid to the plot
plt.xlabel('Voltage (V)')
plt.ylabel('Current (I)')
plt.title('I-V Curves at Different Irradiance Levels')
plt.legend()
plt.grid(True)
plt.show()

The original parameters
from pvlib import pvsystem
import numpy as np
import matplotlib.pyplot as plt
from pvlib import pvsystem

# 1. Define Module Parameters
module_parameters = {
'Name': 'Renogy RSP115DT 115W',
'V_mp': 18.8,  # V
'I_mp': 6.12,  # A
'V_oc': 21.9,  # V
'I_sc': 6.70,  # A
'alpha_sc': -0.28 / 100,  # %/°C to A/°C
'beta_voc': 0.06 / 100,  # %/°C to V/°C
'cells_in_series': 36
}

# 2. Set Environmental Conditions
temp_cell = 25  # °C

# 3. Calculate Parameters
IL, I0, Rs, Rsh, a = pvsystem.calcparams_cec(
module_parameters['cells_in_series'] * module_parameters['V_oc'],
module_parameters['I_sc'], module_parameters['I_mp'],
module_parameters['V_oc'], module_parameters['I_sc'],
module_parameters['beta_voc']
)

# 4. Display Results
print("Light-generated current (IL):", IL, "A")
print("Dark saturation current (I0):", I0, "A")
print("Series resistance (Rs):", Rs, "ohms")
print("Shunt resistance (Rsh):", Rsh, "ohms")
print("Product of diode ideality factor, cells in series, and thermal voltage (a):", a)

# Update module parameters with calculated values
module_parameters['IL'] = IL
module_parameters['I0'] = I0
module_parameters['Rs'] = Rs
module_parameters['Rsh'] = Rsh
module_parameters['a'] = a

# Display updated module parameters
print("Updated Module Parameters:")
for key, value in module_parameters.items():
print(f"{key}: {value}")

Figure 2024-06-06 131121.png

### kevina...@gmail.com

Jun 6, 2024, 8:28:10 AMJun 6
to pvlib-python
Hello,

Several of the parameters seem implausible to me.  For example:

- 'I0': 6.12  -- this is many orders of magnitude higher than what is plausible.  Typical values are like 1e-10 A.
- 'Rs': 6.7  -- this is not impossible, but it is quite high.  Usually the series resistance is less than 1 ohm.
- 'Rsh': 21.9  -- this is very low.  Shunt resistance is typically hundreds or thousands of ohms.
- 'a': 788.4  -- this is very high.  Calculate this as diode_factor * cells_in_series * thermal voltage.  It is usually of order 1.0 (roughly).

I suggest taking a look at the parameters of similar modules in the CEC module database (pvlib.pvsystem.retrieve_sam('cecmod')) and comparing with your parameters.

Kevin

### Ecem Onen

Jun 6, 2024, 8:48:59 AMJun 6
to kevina...@gmail.com, pvlib-python
Yes, I thought so too because when I use another module it works perfectly but when I look for the 'Renogy RSP115DT 115W' I cannot find it. I wrote the module parameters from the data sheet and retrieved the other data by using this function.  'pvsystem.calcparams_cec'

I am new to pvlib and electrical engineering maybe I am doing something wrong but I cannot figure it out

['Renogy_RNG_175D', 'Renogy_RNG_180D', 'Renogy_RNG_185D', 'Renogy_RNG_215P', 'Renogy_RNG_220P', 'Renogy_RNG_225D', 'Renogy_RNG_225P', 'Renogy_RNG_230D', 'Renogy_RNG_230P', 'Renogy_RNG_235D', 'Renogy_RNG_235D_60', 'Renogy_RNG_235P', 'Renogy_RNG_235P_60', 'Renogy_RNG_240D', 'Renogy_RNG_240D_60', 'Renogy_RNG_240P_60', 'Renogy_RNG_245D', 'Renogy_RNG_245D_60', 'Renogy_RNG_245P_60', 'Renogy_RNG_250D_60', 'Renogy_RNG_250P', 'Renogy_RNG_250P_60', 'Renogy_RNG_260D', 'Renogy_RNG_260P', 'Renogy_RNG_265D', 'Renogy_RNG_270D', 'Renogy_RNG_270P', 'Renogy_RNG_275D', 'Renogy_RNG_280D', 'Renogy_RNG_280P', 'Renogy_RNG_285D', 'Renogy_RNG_285P', 'Renogy_RNG_290D', 'Renogy_RNG_290P', 'Renogy_RNG_295D', 'Renogy_RNG_295P', 'Renogy_RNG_300D', 'Renogy_RNG_300P', 'Renogy_RNG_305P', 'Renogy_RNG_310P', 'Renogy_RNG_315P', 'Renogy_RNG_320P', 'Renogy_RNG_325P']

--
You received this message because you are subscribed to the Google Groups "pvlib-python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pvlib-python...@googlegroups.com.
RSP115DT data sheet.pdf

### Mark Campanelli

Jun 6, 2024, 10:43:12 AMJun 6
to Ecem Onen, kevina...@gmail.com, pvlib-python
Hi Ecem,

Also check your number of cells in series (32 instead of 36) and the units on your temperature coefficients (absolute vs. relative). With these changes, you will probably have better luck with pvsystem.calcparams_cec.

Also, here is the fit I get using PVfit's "spec sheet" fitting mode. The SDM that PVfit uses is a somewhat different flavor than CEC, DeSoto, or PVsyst, but this result might give you a rough idea of what you might be looking for as a result from pvsystem.calcparams_cec (after some parameter translation). More details on PVfit's model and fitting methods can be found here: https://github.com/markcampanelli/pvpmc2024/blob/main/tutorial/PVfit_Tutorial.pdf.

from pvfit.common import E_hemispherical_tilted_W_per_m2_stc, T_degC_stc
from pvfit.modeling.dc.common import Material
import pvfit.modeling.dc.single_diode.model.simple.inference_spec_sheet as sdm_simple_inf_spec_sheet
from pvfit.measurement.iv.types import FTData, SpecSheetParameters

spec_sheet_parameters = SpecSheetParameters(
material=Material.monoSi,
N_s=32,
I_sc_A_0=6.70,
I_mp_A_0=6.12,
V_mp_V_0=18.8,
V_oc_V_0=21.9,
dI_sc_dT_A_per_degC_0=0.06/100 * 6.7,
dP_mp_dT_W_per_degC_0=-0.38/100 * 6.12 * 18.8,
dV_oc_dT_V_per_degC_0=-0.28/100 * 21.9,
E_W_per_m2_0=E_hemispherical_tilted_W_per_m2_stc,
T_degC_0=T_degC_stc,
)

sdm_simple_fit_spec_sheet = sdm_simple_inf_spec_sheet.fit(spec_sheet_parameters=spec_sheet_parameters)

pprint(sdm_simple_fit_spec_sheet["model_parameters"])
pprint(
sdm_simple_ae.compute_sde_model_parameters(
ft_data=FTData(F=1, T_degC=T_degC_stc),
model_parameters=sdm_simple_fit_spec_sheet["model_parameters"],
)
) {'E_g_eV_0': 1.184192994291296, 'G_p_S_0': 0.013607133055003067, 'I_rs_A_0': 4.5042751522164985e-09, 'I_sc_A_0': 6.7, 'N_s': 32, 'R_s_Ohm_0': 1.586628793340835e-07, 'T_degC_0': 25.0, 'n_0': 1.2639268713331901} {'G_p_S': array(0.01360713), 'I_ph_A': array(6.70000001), 'I_rs_A': array(4.50427515e-09), 'N_s': array(32), 'R_s_Ohm': array(1.58662879e-07), 'T_degC': array(25.), 'n': array(1.26392687)}

### cwh...@sandia.gov

Jun 6, 2024, 11:49:17 AMJun 6
to pvlib-python
Io is clearly incorrect, as is a. a should be on the order of 32 * 0.025 = 0.8

'beta_voc': 0.0006,   # V/°C is wrong, should be -0.28% * 21.9V = -0.061 V/C

If you are using pvlib.ivtools.fit_cec_sam to get the diode model parameters (I don't know how else you could do it with pvlib), then the positive temperature coefficient for Voc is likely behind both of these erroneous parameter values.