Skip to content

Commit 5fd4a24

Browse files
authored
Merge pull request #3 from MLEEFS/new_spectral
Updates from First Solar to the spectral correction function.
2 parents 768805f + 1d719ab commit 5fd4a24

File tree

1 file changed

+57
-20
lines changed

1 file changed

+57
-20
lines changed

pvl_FSspeccorr.m

Lines changed: 57 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
% precipitable water, Pwat, using the following function:
1515
%
1616
% M = coeff(1) + coeff(2)*AMa + coeff(3)*Pwat + coeff(4)*AMa.^.5
17-
% + coeff(5)*Pwat.^.5 + coeff(6)*AMa./Pwat (1)
17+
% + coeff(5)*Pwat.^.5 + coeff(6)*AMa./Pwat.^0.5 (1)
1818
%
1919
% Default coefficients are determined for several cell types with
2020
% known quantum efficiency curves, by using the Simple Model of the
2121
% Atmospheric Radiative Transfer of Sunshine (SMARTS) [1].
2222
% Using SMARTS, spectrums are simulated with all combinations of AMa
2323
% and Pwat where:
24-
% * 0.5 cm <= Pwat <= 5 cm
25-
% * 0.8 <= AMa <= 4.75 (Pressure of 800 mbar and 1.01 <= AM <= 6)
24+
% * 0.1 cm <= Pwat <= 5 cm
25+
% * 1.0 <= AMa <= 5
2626
% * Spectral range is limited to that of CMP11 (280 nm to 2800 nm)
2727
% * spectrum simulated on a plane normal to the sun
2828
% * All other parameters fixed at G173 standard
@@ -31,7 +31,8 @@
3131
% Eq. 1 to determine the coefficients for each module.
3232
%
3333
% Function pvl_FSspeccorr was developed by Mitchell Lee and Alex Panchula,
34-
% at First Solar, 2015.
34+
% at First Solar, 2015. Detailed description of spectral correction
35+
% can be found in [2]
3536
%
3637
% Inputs:
3738
% Pwat - atmospheric precipitable water (cm). Can be
@@ -47,7 +48,7 @@
4748
% 'multisi','polysi' - coefficients for multi-crystalline silicon
4849
% modules. The module used to calculate the spectral
4950
% correction coefficients corresponds to the Mult-crystalline
50-
% silicon Manufacturer 2 Model C from [2].
51+
% silicon Manufacturer 2 Model C from [3].
5152
% custCoeff - allows for entry of user defined spectral correction
5253
% coefficients. Coefficients must be entered as a numeric row or
5354
% column vector of length 6. Derivation of coefficients requires use
@@ -69,12 +70,57 @@
6970
% [1] Gueymard, Christian. SMARTS2: a simple model of the atmospheric
7071
% radiative transfer of sunshine: algorithms and performance
7172
% assessment. Cocoa, FL: Florida Solar Energy Center, 1995.
72-
% [2] Marion, William F., et al. User's Manual for Data for Validating
73+
% [2] Lee, Mitchell, and Panchula, Alex. "Spectral Correction for
74+
% Photovoltaic Module Performance Based on Air Mass and Precipitable
75+
% Water." IEEE Photovoltaic Specialists Conference, Portland, 2016
76+
% [3] Marion, William F., et al. User's Manual for Data for Validating
7377
% Models for PV Module Performance. National Renewable Energy Laboratory, 2014.
7478
% http://www.nrel.gov/docs/fy14osti/61610.pdf
7579

7680

7781

82+
% Correct for AMa and Pwat having transposed dimensions
83+
if isrow(AMa)
84+
AMa = AMa';
85+
end
86+
87+
if isrow(Pwat)
88+
Pwat = Pwat';
89+
end
90+
91+
% --- Screen Input Data ---
92+
93+
% *** Pwat ***
94+
% Replace Pwat Values below 0.1 cm with 0.1 cm to prevent model from
95+
% diverging
96+
if min(Pwat) < 0.1
97+
Pwat(Pwat < 0.1) = 0.1;
98+
warning(['Exceptionally low Pwat values replaced with 0.1 cm to prevent',...
99+
' model divergence']);
100+
end
101+
102+
% Warn user about Pwat data that is exceptionally high
103+
if max(Pwat) > 8
104+
warning(['Exceptionally high Pwat values. Check input data:', ...
105+
' model may diverge in this range']);
106+
end
107+
108+
% *** AMa ***
109+
% Replace Extremely High AM with AM 10 to prevent model divergence
110+
% AM > 10 will only occur very close to sunset
111+
if max(AMa) > 10
112+
AMa(AMa > 10) = 10;
113+
end
114+
115+
% Warn user about AMa data that is exceptionally low
116+
if min(AMa) < 0.58
117+
warning(['Exceptionally low air mass: ',...
118+
'model not intended for extra-terrestrial use'])
119+
% pvl_absoluteairmass(1,pvl_alt2pres(4340)) = 0.58
120+
% Elevation of Mina Pirquita, Argentian = 4340 m. Highest elevation city
121+
% with population over 50,000.
122+
end
123+
78124
% If user input is a character array, use appropriate default coefficients.
79125
if ischar(varargin{1})
80126
modType = lower(varargin{1});
@@ -84,14 +130,14 @@
84130
% Coefficients for First Solar Series 4-2 (and later) modules.
85131
% For modeling the performance of earlier CdTe module series,
86132
% use the coefficients that are commented out
87-
% [0.7900, -0.0644, -0.01658, 0.1835, 0.09077, -0.002330];
88-
coeff = [0.8752, -0.04588, -0.01559, 0.08751, 0.09158, -0.002295];
133+
% [0.79418,-0.049883,-0.013402,0.16766,0.083377,-0.0044007];
134+
coeff = [0.86273, -0.038948, -0.012506, 0.098871, 0.084658, -0.0042948];
89135
case {'monosi','xsi'}
90136
% Coefficients for First Solar TetraSun Modules
91-
coeff = [0.8478, -0.03326, -0.0022953, 0.1565, 0.01566, -0.001712];
137+
coeff = [0.85914, -0.020880, -0.0058853, 0.12029, 0.026814, -0.0017810];
92138
case {'polysi','multisi'}
93139
% Coefficients for Multi-Si: Manufacturer 2 Model C
94-
coeff = [0.83019, -0.04063, -0.005281, 0.1695, 0.02974, -0.001676];
140+
coeff = [0.84090, -0.027539, -0.0079224, 0.13570, 0.038024, -0.0021218];
95141
otherwise
96142
error('Incorrect module type for use of default parameters')
97143
end
@@ -100,16 +146,7 @@
100146
coeff = varargin{1};
101147
end
102148

103-
% Correct for AMa and Pwat having transposed dimensions
104-
if isrow(AMa)
105-
AMa = AMa';
106-
end
107-
108-
if isrow(Pwat)
109-
Pwat = Pwat';
110-
end
111-
112149
% Evaluate Spectral Shift
113-
M = coeff(1) + coeff(2)*AMa + coeff(3)*Pwat + coeff(4)*AMa.^.5 + coeff(5)*Pwat.^.5 + coeff(6)*AMa./Pwat;
150+
M = coeff(1) + coeff(2)*AMa + coeff(3)*Pwat + coeff(4)*AMa.^.5 + coeff(5)*Pwat.^.5 + coeff(6)*AMa./Pwat.^0.5;
114151
end
115152

0 commit comments

Comments
 (0)