pecos.pv module¶
The pv module contains custom methods for PV applications.
-
pecos.pv.
insolation
(G, tfilter=None, per_day=True)[source]¶ Compute insolation defined as:
\(H=\int{Gdt}\)
where \(G\) is irradiance and \(dt\) is the time step between observations. The time integral is computed using the trapezoidal rule. Results are given in [irradiance units]*seconds.
Parameters: G : pd.DataFrame
Irradiance time series
tfilter : pd.Series (optional)
Time filter containing boolean values for each time index
per_day : boolean (optional)
Flag indicating if the results should be computed per day, default = True
Returns: H : pd.DataFrame
Insolation
-
pecos.pv.
energy
(P, tfilter=None, per_day=True)[source]¶ Convert energy defined as:
\(E=\int{Pdt}\)
where \(P\) is power and \(dt\) is the time step between observations. The time integral is computed using the trapezoidal rule. Results are given in [power units]*seconds.
Parameters: P : pd.DataFrame
Power time series
tfilter : pd.Series (optional)
Time filter containing boolean values for each time index
per_day : boolean (optional)
Flag indicating if the results should be computed per day, default = True
Returns: E : pd.DataFrame
Energy
-
pecos.pv.
performance_ratio
(E, H_poa, P_ref, G_ref=1000)[source]¶ Compute performance ratio defined as:
\(PR=\dfrac{Y_{f}}{Yr} = \dfrac{\dfrac{E}{P_{ref}}}{\dfrac{H_{poa}}{G_{ref}}}\)
where \(Y_f\) is the observed energy (AC or DC) produced by the PV system (kWh) divided by the DC power rating at STC conditions. \(Y_r\) is the plane-of-array insolation (kWh/m2) divided by the reference irradiance (1000 W/m2).
Parameters: E : pd.DataFrame with a single column or pd.Series
Energy (AC or DC)
H_poa : pd.DataFrame with a single column or pd.Series
Plane of array insolation
P_ref : float
DC power rating at STC conditions
G_ref : float (optional)
Reference irradiance, default = 1000
Returns: PR : pd.DataFrame
Performance ratio
-
pecos.pv.
normalized_current
(I, G_poa, I_sco, G_ref=1000)[source]¶ Compute normalized current defined as:
\(NI = \dfrac{\dfrac{I}{I_{sco}}}{\dfrac{G_{poa}}{G_{ref}}}\)
where \(I\) is current, \(I_{sco}\) is the short circuit current at STC conditions, \(G_{poa}\) is the plane-of-array irradiance, and \(G_{ref}\) is the reference irradiance.
Parameters: I : pd.DataFrame with a single column or pd.Series
Current
G_poa : pd.DataFrame with a single column or pd.Series
Plane of array irradiance
I_sco : float
Short circuit current at STC conditions
G_ref : float (optional)
Reference irradiance, default = 1000
Returns: NI : pd.DataFrame
Normalized current
-
pecos.pv.
normalized_efficiency
(P, G_poa, P_ref, G_ref=1000)[source]¶ Compute normalized efficiency defined as:
\(NE = \dfrac{\dfrac{P}{P_{ref}}}{\dfrac{G_{poa}}{G_{ref}}}\)
where \(P\) is the observed power (AC or DC), \(P_{ref}\) is the DC power rating at STC conditions, \(G_{poa}\) is the plane-of-array irradiance, and \(G_{ref}\) is the reference irradiance.
Parameters: P : pd.DataFrame with a single column or pd.Series
Power (AC or DC)
G_poa : pd.DataFrame with a single column or pd.Series
Plane of array irradiance
P_ref : float
DC power rating at STC conditions
G_ref : float (optional)
Reference irradiance, default = 1000
Returns: NE : pd.DataFrame
Normalized efficiency
-
pecos.pv.
performance_index
(E, E_predicted)[source]¶ Compute performance index defined as:
\(PI=\dfrac{E}{\hat{E}}\)
where \(E\) is the observed energy from a PV system and \(\hat{E}\) is the predicted energy over the same time frame. \(\hat{E}\) can be computed using by first predicting power using
pecos.pv.basic_pvlib_performance_model
or methods inpvlib.pvsystem
and then convert power to energy usingpecos.pv.enery
.Unlike with the performance ratio, the performance index should be very close to 1 for a well functioning PV system and should not vary by season due to temperature variations.
Parameters: E : pd.DataFrame with a single column or pd.Series
Observed energy
E_predicted : pd.DataFrame with a single column or pd.Series
Predicted energy
Returns: PI : pd.DataFrame
Performance index
-
pecos.pv.
energy_yield
(E, P_ref)[source]¶ Compute energy yield is defined as:
\(EY=\dfrac{E}{P_{ref}}\)
where \(E\) is the observed energy from a PV system and \(P_{ref}\) is the DC power rating of the system at STC conditions.
Parameters: E : pd.DataFrame with a single column or pd.Series
Observed energy
P_ref : float
DC power rating at STC conditions
Returns: EY : pd.DataFrame
Energy yield
-
pecos.pv.
clearness_index
(H_dn, H_ea)[source]¶ Compute clearness index defined as:
\(Kt=\dfrac{H_{dn}}{H_{ea}}\)
where \(H_{dn}\) is the direct-normal insolation (kWh/m2) \(H_{ea}\) is the extraterrestrial insolation (kWh/m2) over the same time frame. Extraterrestrial irradiation can be computed using
pvlib.irradiance.extraradiation
. Irradiation can be converted to insolation usingpecos.pv.insolation
.Parameters: H_dn : pd.DataFrame with a single column or pd.Series
Direct normal insolation
H_ea : pd.DataFrame with a single column or pd.Series
Extraterrestrial insolation
Returns: Kt : pd.DataFrame
Clearness index
-
pecos.pv.
basic_pvlib_performance_model
(parameters, latitude, longitude, wind_speed, air_temp, poa_global, poa_diffuse=None, model='SAPM')[source]¶ Compute a very basic pv performance model using the SAPM or single diode model from pvlib. Input includes observed wind speed, air temperature, and POA irradiance. Default model options, defined in pvlib, are used to compute the performance model. Use pvlib directly to customize the model.
Parameters: parameters : dict
Model parameters, see
pvlib.pvsystem
module for more detailslatitude : float
Latitude
longitude : float
Longitude
wind speed : pd.DataFrame with a single column or pd.Series
Wind speed time series
air_temp : pd.DataFrame with a single column or pd.Series
Air temperature time series
poa_global : pd.DataFrame with a single column or pd.Series
Global POA irradiance time series
poa_diffuse : pd.DataFrame with a single column or pd.Series (optional)
Diffuse POA irradiance time series, default = 0
model : string (optional)
‘SAPM’ or ‘singlediode’, default = ‘SAPM’
Returns: model : pd.DataFrame
Predicted Isc, Imp, Voc, Vmp