@@ -302,11 +302,40 @@ def calcparams_desoto(self, effective_irradiance, temp_cell, **kwargs):
302
302
"""
303
303
304
304
kwargs = _build_kwargs (['a_ref' , 'I_L_ref' , 'I_o_ref' , 'R_sh_ref' ,
305
- 'R_s' , 'alpha_sc' , 'EgRef' , 'dEgdT' ],
305
+ 'R_s' , 'alpha_sc' , 'EgRef' , 'dEgdT' ,
306
+ 'irrad_ref' , 'temp_ref' ],
306
307
self .module_parameters )
307
-
308
+
308
309
return calcparams_desoto (effective_irradiance , temp_cell , ** kwargs )
309
310
311
+ def calcparams_pvsyst (self , effective_irradiance , temp_cell ):
312
+ """
313
+ Use the :py:func:`calcparams_pvsyst` function, the input
314
+ parameters and ``self.module_parameters`` to calculate the
315
+ module currents and resistances.
316
+
317
+ Parameters
318
+ ----------
319
+ effective_irradiance : numeric
320
+ The irradiance (W/m2) that is converted to photocurrent.
321
+
322
+ temp_cell : float or Series
323
+ The average cell temperature of cells within a module in C.
324
+
325
+ Returns
326
+ -------
327
+ See pvsystem.calcparams_pvsyst for details
328
+ """
329
+
330
+ kwargs = _build_kwargs (['gamma_ref' , 'mu_gamma' , 'I_L_ref' , 'I_o_ref' ,
331
+ 'R_sh_ref' , 'R_sh_0' , 'R_sh_exp' ,
332
+ 'R_s' , 'alpha_sc' , 'EgRef' ,
333
+ 'irrad_ref' , 'temp_ref' ,
334
+ 'cells_in_series' ],
335
+ self .module_parameters )
336
+
337
+ return calcparams_pvsyst (effective_irradiance , temp_cell , ** kwargs )
338
+
310
339
def sapm (self , effective_irradiance , temp_cell , ** kwargs ):
311
340
"""
312
341
Use the :py:func:`sapm` function, the input parameters,
@@ -462,7 +491,7 @@ def first_solar_spectral_loss(self, pw, airmass_absolute):
462
491
coefficients = None
463
492
464
493
return atmosphere .first_solar_spectral_correction (pw ,
465
- airmass_absolute ,
494
+ airmass_absolute ,
466
495
module_type ,
467
496
coefficients )
468
497
@@ -946,12 +975,12 @@ def physicaliam(aoi, n=1.526, K=4., L=0.002):
946
975
947
976
948
977
def calcparams_desoto (effective_irradiance , temp_cell ,
949
- alpha_sc , a_ref , I_L_ref , I_o_ref , R_sh_ref , R_s ,
978
+ alpha_sc , a_ref , I_L_ref , I_o_ref , R_sh_ref , R_s ,
950
979
EgRef = 1.121 , dEgdT = - 0.0002677 ,
951
980
irrad_ref = 1000 , temp_ref = 25 ):
952
981
'''
953
- Calculates five parameter values for the single diode equation at
954
- effective irradiance and cell temperature using the De Soto et al.
982
+ Calculates five parameter values for the single diode equation at
983
+ effective irradiance and cell temperature using the De Soto et al.
955
984
model described in [1]. The five values returned by calcparams_desoto
956
985
can be used by singlediode to calculate an IV curve.
957
986
@@ -968,34 +997,34 @@ def calcparams_desoto(effective_irradiance, temp_cell,
968
997
module in units of A/C.
969
998
970
999
a_ref : float
971
- The product of the usual diode ideality factor (n, unitless),
1000
+ The product of the usual diode ideality factor (n, unitless),
972
1001
number of cells in series (Ns), and cell thermal voltage at reference
973
1002
conditions, in units of V.
974
1003
975
1004
I_L_ref : float
976
1005
The light-generated current (or photocurrent) at reference conditions,
977
1006
in amperes.
978
-
1007
+
979
1008
I_o_ref : float
980
1009
The dark or diode reverse saturation current at reference conditions,
981
1010
in amperes.
982
-
1011
+
983
1012
R_sh_ref : float
984
1013
The shunt resistance at reference conditions, in ohms.
985
-
1014
+
986
1015
R_s : float
987
1016
The series resistance at reference conditions, in ohms.
988
1017
989
1018
EgRef : float
990
1019
The energy bandgap at reference temperature in units of eV.
991
- 1.121 eV for crystalline silicon. EgRef must be >0. For parameters
1020
+ 1.121 eV for crystalline silicon. EgRef must be >0. For parameters
992
1021
from the SAM CEC module database, EgRef=1.121 is implicit for all
993
1022
cell types in the parameter estimation algorithm used by NREL.
994
1023
995
1024
dEgdT : float
996
1025
The temperature dependence of the energy bandgap at reference
997
- conditions in units of 1/K. May be either a scalar value
998
- (e.g. -0.0002677 as in [1]) or a DataFrame (this may be useful if
1026
+ conditions in units of 1/K. May be either a scalar value
1027
+ (e.g. -0.0002677 as in [1]) or a DataFrame (this may be useful if
999
1028
dEgdT is a modeled as a function of temperature). For parameters from
1000
1029
the SAM CEC module database, dEgdT=-0.0002677 is implicit for all cell
1001
1030
types in the parameter estimation algorithm used by NREL.
@@ -1011,28 +1040,21 @@ def calcparams_desoto(effective_irradiance, temp_cell,
1011
1040
Tuple of the following results:
1012
1041
1013
1042
photocurrent : numeric
1014
- Light-generated current in amperes at irradiance=S and
1015
- cell temperature=Tcell.
1043
+ Light-generated current in amperes
1016
1044
1017
1045
saturation_current : numeric
1018
- Diode saturation curent in amperes at irradiance
1019
- S and cell temperature Tcell.
1046
+ Diode saturation curent in amperes
1020
1047
1021
1048
resistance_series : float
1022
- Series resistance in ohms at irradiance S and cell temperature
1023
- Tcell.
1049
+ Series resistance in ohms
1024
1050
1025
1051
resistance_shunt : numeric
1026
- Shunt resistance in ohms at irradiance S and cell temperature
1027
- Tcell.
1052
+ Shunt resistance in ohms
1028
1053
1029
1054
nNsVth : numeric
1030
- Modified diode ideality factor at irradiance S and cell
1031
- temperature Tcell. Note that in source [1] nNsVth = a (equation
1032
- 2). nNsVth is the product of the usual diode ideality factor
1033
- (n), the number of series-connected cells in the module (Ns),
1034
- and the thermal voltage of a cell in the module (Vth) at a cell
1035
- temperature of Tcell.
1055
+ The product of the usual diode ideality factor (n, unitless),
1056
+ number of cells in series (Ns), and cell thermal voltage at
1057
+ specified effective irradiance and cell temperature.
1036
1058
1037
1059
References
1038
1060
----------
@@ -1051,8 +1073,6 @@ def calcparams_desoto(effective_irradiance, temp_cell,
1051
1073
1052
1074
See Also
1053
1075
--------
1054
- sapm
1055
- sapm_celltemp
1056
1076
singlediode
1057
1077
retrieve_sam
1058
1078
@@ -1143,7 +1163,7 @@ def calcparams_desoto(effective_irradiance, temp_cell,
1143
1163
1144
1164
# Boltzmann constant in eV/K
1145
1165
k = 8.617332478e-05
1146
-
1166
+
1147
1167
# reference temperature
1148
1168
Tref_K = temp_ref + 273.15
1149
1169
Tcell_K = temp_cell + 273.15
@@ -1152,9 +1172,9 @@ def calcparams_desoto(effective_irradiance, temp_cell,
1152
1172
1153
1173
nNsVth = a_ref * (Tcell_K / Tref_K )
1154
1174
1155
- # In the equation for IL, the single factor effective_irradiance is
1156
- # used, in place of the product S*M in [1]. effective_irradiance is
1157
- # equivalent to the product of S (irradiance reaching a module's cells) *
1175
+ # In the equation for IL, the single factor effective_irradiance is
1176
+ # used, in place of the product S*M in [1]. effective_irradiance is
1177
+ # equivalent to the product of S (irradiance reaching a module's cells) *
1158
1178
# M (spectral adjustment factor) as described in [1].
1159
1179
IL = effective_irradiance / irrad_ref * \
1160
1180
(I_L_ref + alpha_sc * (Tcell_K - Tref_K ))
@@ -1164,14 +1184,151 @@ def calcparams_desoto(effective_irradiance, temp_cell,
1164
1184
# Rsh = Rsh_ref * (S_ref / S) where S is broadband irradiance reaching
1165
1185
# the module's cells. If desired this model behavior can be duplicated
1166
1186
# by applying reflection and soiling losses to broadband plane of array
1167
- # irradiance and not applying a spectral loss modifier, i.e.,
1187
+ # irradiance and not applying a spectral loss modifier, i.e.,
1168
1188
# spectral_modifier = 1.0.
1169
1189
Rsh = R_sh_ref * (irrad_ref / effective_irradiance )
1170
1190
Rs = R_s
1171
1191
1172
1192
return IL , I0 , Rs , Rsh , nNsVth
1173
1193
1174
1194
1195
+ def calcparams_pvsyst (effective_irradiance , temp_cell ,
1196
+ alpha_sc , gamma_ref , mu_gamma ,
1197
+ I_L_ref , I_o_ref ,
1198
+ R_sh_ref , R_sh_0 , R_s ,
1199
+ cells_in_series ,
1200
+ R_sh_exp = 5.5 ,
1201
+ EgRef = 1.121 ,
1202
+ irrad_ref = 1000 , temp_ref = 25 ):
1203
+ '''
1204
+ Calculates five parameter values for the single diode equation at
1205
+ effective irradiance and cell temperature using the PVsyst v6
1206
+ model described in [1,2,3]. The five values returned by calcparams_pvsyst
1207
+ can be used by singlediode to calculate an IV curve.
1208
+
1209
+ Parameters
1210
+ ----------
1211
+ effective_irradiance : numeric
1212
+ The irradiance (W/m2) that is converted to photocurrent.
1213
+
1214
+ temp_cell : numeric
1215
+ The average cell temperature of cells within a module in C.
1216
+
1217
+ alpha_sc : float
1218
+ The short-circuit current temperature coefficient of the
1219
+ module in units of A/C.
1220
+
1221
+ gamma_ref : float
1222
+ The diode ideality factor
1223
+
1224
+ mu_gamma : float
1225
+ The temperature coefficient for the diode ideality factor, 1/K
1226
+
1227
+ I_L_ref : float
1228
+ The light-generated current (or photocurrent) at reference conditions,
1229
+ in amperes.
1230
+
1231
+ I_o_ref : float
1232
+ The dark or diode reverse saturation current at reference conditions,
1233
+ in amperes.
1234
+
1235
+ R_sh_ref : float
1236
+ The shunt resistance at reference conditions, in ohms.
1237
+
1238
+ R_sh_0 : float
1239
+ The shunt resistance at zero irradiance conditions, in ohms.
1240
+
1241
+ R_s : float
1242
+ The series resistance at reference conditions, in ohms.
1243
+
1244
+ cells_in_series : integer
1245
+ The number of cells connected in series.
1246
+
1247
+ R_sh_exp : float
1248
+ The exponent in the equation for shunt resistance, unitless. Defaults
1249
+ to 5.5.
1250
+
1251
+ EgRef : float
1252
+ The energy bandgap at reference temperature in units of eV.
1253
+ 1.121 eV for crystalline silicon. EgRef must be >0.
1254
+
1255
+ irrad_ref : float (optional, default=1000)
1256
+ Reference irradiance in W/m^2.
1257
+
1258
+ temp_ref : float (optional, default=25)
1259
+ Reference cell temperature in C.
1260
+
1261
+ Returns
1262
+ -------
1263
+ Tuple of the following results:
1264
+
1265
+ photocurrent : numeric
1266
+ Light-generated current in amperes
1267
+
1268
+ saturation_current : numeric
1269
+ Diode saturation current in amperes
1270
+
1271
+ resistance_series : float
1272
+ Series resistance in ohms
1273
+
1274
+ resistance_shunt : numeric
1275
+ Shunt resistance in ohms
1276
+
1277
+ nNsVth : numeric
1278
+ The product of the usual diode ideality factor (n, unitless),
1279
+ number of cells in series (Ns), and cell thermal voltage at
1280
+ specified effective irradiance and cell temperature.
1281
+
1282
+ References
1283
+ ----------
1284
+ [1] K. Sauer, T. Roessler, C. W. Hansen, Modeling the Irradiance and
1285
+ Temperature Dependence of Photovoltaic Modules in PVsyst,
1286
+ IEEE Journal of Photovoltaics v5(1), January 2015.
1287
+
1288
+ [2] A. Mermoud, PV modules modelling, Presentation at the 2nd PV
1289
+ Performance Modeling Workshop, Santa Clara, CA, May 2013
1290
+
1291
+ [3] A. Mermoud, T. Lejeune, Performance Assessment of a Simulation Model
1292
+ for PV modules of any available technology, 25th European Photovoltaic
1293
+ Solar Energy Conference, Valencia, Spain, Sept. 2010
1294
+
1295
+ See Also
1296
+ --------
1297
+ calcparams_desoto
1298
+ singlediode
1299
+
1300
+ '''
1301
+
1302
+ # Boltzmann constant in J/K
1303
+ k = 1.38064852e-23
1304
+
1305
+ # elementary charge in coulomb
1306
+ q = 1.6021766e-19
1307
+
1308
+ # reference temperature
1309
+ Tref_K = temp_ref + 273.15
1310
+ Tcell_K = temp_cell + 273.15
1311
+
1312
+ gamma = gamma_ref + mu_gamma * (Tcell_K - Tref_K )
1313
+ nNsVth = gamma * k / q * cells_in_series * Tcell_K
1314
+
1315
+ IL = effective_irradiance / irrad_ref * \
1316
+ (I_L_ref + alpha_sc * (Tcell_K - Tref_K ))
1317
+
1318
+ I0 = I_o_ref * ((Tcell_K / Tref_K ) ** 3 ) * \
1319
+ (np .exp ((q * EgRef ) / (k * gamma ) * (1 / Tref_K - 1 / Tcell_K )))
1320
+
1321
+ Rsh_tmp = (R_sh_ref - R_sh_0 * np .exp (- R_sh_exp )) / (1.0 - np .exp (- R_sh_exp ))
1322
+ Rsh_base = np .maximum (0.0 , Rsh_tmp )
1323
+
1324
+ Rsh = Rsh_base + (R_sh_0 - Rsh_base ) * \
1325
+ np .exp (- R_sh_exp * effective_irradiance / irrad_ref )
1326
+
1327
+ Rs = R_s
1328
+
1329
+ return IL , I0 , Rs , Rsh , nNsVth
1330
+
1331
+
1175
1332
def retrieve_sam (name = None , path = None ):
1176
1333
'''
1177
1334
Retrieve latest module and inverter info from a local file or the
0 commit comments