PERF_RATIO_NREL
This function computes the NREL weather-corrected Performance Ratio (PR) of a PV system.
It aggregates incident irradiance, ambient temperature, wind speed, and AC power over the provided data ranges. The calculation uses the SAPM temperature model and a weighted reference temperature derived from the data to weather-correct the PR, allowing for more stable long-term performance tracking.
Excel Usage
=PERF_RATIO_NREL(poa_global, temp_air, wind_speed, pac, pdc_ref, a, b, delta_t, gamma_pdc)
poa_global(list[list], required): Total incident irradiance (W/m^2).temp_air(list[list], required): Ambient dry bulb temperature (C).wind_speed(list[list], required): Wind speed at 10 meters height (m/s).pac(list[list], required): AC power output (kW).pdc_ref(float, required): PV array STC nameplate rating (kW).a(float, optional, default: -3.56): SAPM temperature model parameter a (unitless).b(float, optional, default: -0.075): SAPM temperature model parameter b (s/m).delta_t(float, optional, default: 3): SAPM temperature model parameter deltaT (C).gamma_pdc(float, optional, default: -0.00433): Power temperature coefficient (1/C).
Returns (float): Weather-corrected Performance Ratio (float), or an error string.
Example 1: Calculate PR with nominal arrays
Inputs:
| poa_global | temp_air | wind_speed | pac | pdc_ref |
|---|---|---|---|---|
| 1000 | 25 | 2 | 9.5 | 10 |
| 800 | 20 | 1 | 7.6 | |
| 900 | 22 | 3 | 8.5 |
Excel formula:
=PERF_RATIO_NREL({1000;800;900}, {25;20;22}, {2;1;3}, {9.5;7.6;8.5}, 10)
Expected output:
0.948148
Example 2: Calculate PR with custom SAPM and temperature coefficient parameters
Inputs:
| poa_global | temp_air | wind_speed | pac | pdc_ref | a | b | delta_t | gamma_pdc |
|---|---|---|---|---|---|---|---|---|
| 950 | 30 | 1.5 | 8.9 | 10 | -3.7 | -0.08 | 2.5 | -0.004 |
| 850 | 28 | 2.5 | 8 | |||||
| 780 | 24 | 3 | 7.1 |
Excel formula:
=PERF_RATIO_NREL({950;850;780}, {30;28;24}, {1.5;2.5;3}, {8.9;8;7.1}, 10, -3.7, -0.08, 2.5, -0.004)
Expected output:
0.930233
Example 3: Handle scalar weather and power inputs
Inputs:
| poa_global | temp_air | wind_speed | pac | pdc_ref |
|---|---|---|---|---|
| 1000 | 25 | 2 | 9.2 | 10 |
Excel formula:
=PERF_RATIO_NREL(1000, 25, 2, 9.2, 10)
Expected output:
0.92
Example 4: Process row-vector arrays for PR calculation
Inputs:
| poa_global | temp_air | wind_speed | pac | pdc_ref | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 700 | 900 | 1000 | 18 | 22 | 27 | 2 | 2.5 | 1.5 | 6.1 | 8.2 | 9 | 10 |
Excel formula:
=PERF_RATIO_NREL({700,900,1000}, {18,22,27}, {2,2.5,1.5}, {6.1,8.2,9}, 10)
Expected output:
0.896154
Python Code
Show Code
import pandas as pd
from pvanalytics.metrics import performance_ratio_nrel as result_func
def perf_ratio_nrel(poa_global, temp_air, wind_speed, pac, pdc_ref, a=-3.56, b=-0.075, delta_t=3, gamma_pdc=-0.00433):
"""
Calculate the NREL weather-corrected performance ratio from irradiance, temperature, and power data.
See: https://pvanalytics.readthedocs.io/en/stable/generated/pvanalytics.metrics.performance_ratio_nrel.html
This example function is provided as-is without any representation of accuracy.
Args:
poa_global (list[list]): Total incident irradiance (W/m^2).
temp_air (list[list]): Ambient dry bulb temperature (C).
wind_speed (list[list]): Wind speed at 10 meters height (m/s).
pac (list[list]): AC power output (kW).
pdc_ref (float): PV array STC nameplate rating (kW).
a (float, optional): SAPM temperature model parameter a (unitless). Default is -3.56.
b (float, optional): SAPM temperature model parameter b (s/m). Default is -0.075.
delta_t (float, optional): SAPM temperature model parameter deltaT (C). Default is 3.
gamma_pdc (float, optional): Power temperature coefficient (1/C). Default is -0.00433.
Returns:
float: Weather-corrected Performance Ratio (float), or an error string.
"""
try:
def flatten(data):
if not isinstance(data, list):
return [float(data)]
flat = []
for row in data:
if isinstance(row, list):
for val in row:
if val != "":
flat.append(float(val))
elif row != "":
flat.append(float(row))
return flat
# Convert inputs to pandas Series for pvanalytics
poa_s = pd.Series(flatten(poa_global))
temp_s = pd.Series(flatten(temp_air))
wind_s = pd.Series(flatten(wind_speed))
pac_s = pd.Series(flatten(pac))
n = len(poa_s)
if not (len(temp_s) == n and len(wind_s) == n and len(pac_s) == n):
return "Error: Input ranges must have the same number of valid elements"
if n == 0:
return "Error: Input arrays cannot be empty"
pdc_ref_val = float(pdc_ref)
a_val = float(a) if a is not None else -3.56
b_val = float(b) if b is not None else -0.075
dT_val = float(delta_t) if delta_t is not None else 3.0
gamma_val = float(gamma_pdc) if gamma_pdc is not None else -0.00433
pr = result_func(
poa_s, temp_s, wind_s, pac_s, pdc_ref_val,
a=a_val, b=b_val, deltaT=dT_val, gamma_pdc=gamma_val
)
return float(pr)
except Exception as e:
return f"Error: {str(e)}"Online Calculator
Total incident irradiance (W/m^2).
Ambient dry bulb temperature (C).
Wind speed at 10 meters height (m/s).
AC power output (kW).
PV array STC nameplate rating (kW).
SAPM temperature model parameter a (unitless).
SAPM temperature model parameter b (s/m).
SAPM temperature model parameter deltaT (C).
Power temperature coefficient (1/C).