PVWATTS_DC
Overview
The PVWATTS_DC function calculates the direct current (DC) power output of a photovoltaic (PV) module using the PVWatts DC model developed by the National Renewable Energy Laboratory (NREL). This model is widely used for estimating the energy production of grid-connected PV systems and is the core algorithm behind NREL’s PVWatts Calculator, a standard tool in the solar industry.
This implementation uses the pvlib-python library, an open-source community-developed toolbox for simulating photovoltaic energy system performance. For detailed parameter descriptions, see the pvlib.pvsystem.pvwatts_dc documentation.
The PVWatts DC model calculates power output based on effective irradiance (solar radiation reaching the cells), cell temperature, and a temperature coefficient that accounts for performance degradation at elevated temperatures. The governing equation is:
P_{dc} = \frac{G_{poa,eff}}{1000} \times P_{dc0} \times (1 + \gamma_{pdc} \times (T_{cell} - T_{ref}))
where:
- P_{dc} is the DC power output (W)
- G_{poa,eff} is the effective irradiance transmitted to the PV cells (W/m²)
- P_{dc0} is the module power at standard test conditions (1000 W/m² and reference temperature) (W)
- \gamma_{pdc} is the temperature coefficient of power, typically between -0.002 and -0.005 per °C
- T_{cell} is the cell temperature (°C)
- T_{ref} is the cell reference temperature, typically 25°C
The temperature coefficient (\gamma_{pdc}) is a critical parameter that quantifies how much power output decreases as cell temperature rises above the reference temperature. Crystalline silicon modules typically have coefficients around -0.004/°C, meaning power drops approximately 0.4% for each degree Celsius above 25°C.
For the full technical specification, refer to the PVWatts Version 5 Manual (Dobos, 2014).
This example function is provided as-is without any representation of accuracy.
Excel Usage
=PVWATTS_DC(effective_irradiance, temp_cell, pdc_zero, gamma_pdc, temp_ref)
effective_irradiance(int, required): The effective_irradiance valuetemp_cell(int, required): The temp_cell valuepdc_zero(int, required): The pdc_zero valuegamma_pdc(float, required): The gamma_pdc valuetemp_ref(float, optional, default: 25): The temp_ref value
Returns (float): DC power output (float), or error message string.
Examples
Example 1: Demo case 1
Inputs:
| effective_irradiance | temp_cell | pdc_zero | gamma_pdc | temp_ref |
|---|---|---|---|---|
| 1000 | 25 | 300 | -0.003 | 25 |
Excel formula:
=PVWATTS_DC(1000, 25, 300, -0.003, 25)
Expected output:
300
Example 2: Demo case 2
Inputs:
| effective_irradiance | temp_cell | pdc_zero | gamma_pdc | temp_ref |
|---|---|---|---|---|
| 1000 | 35 | 300 | -0.003 | 25 |
Excel formula:
=PVWATTS_DC(1000, 35, 300, -0.003, 25)
Expected output:
291
Example 3: Demo case 3
Inputs:
| effective_irradiance | temp_cell | pdc_zero | gamma_pdc | temp_ref |
|---|---|---|---|---|
| 800 | 25 | 300 | -0.003 | 25 |
Excel formula:
=PVWATTS_DC(800, 25, 300, -0.003, 25)
Expected output:
240
Example 4: Demo case 4
Inputs:
| effective_irradiance | temp_cell | pdc_zero | gamma_pdc | temp_ref |
|---|---|---|---|---|
| 1000 | 35 | 300 | -0.003 | 20 |
Excel formula:
=PVWATTS_DC(1000, 35, 300, -0.003, 20)
Expected output:
286.5
Python Code
import micropip
await micropip.install(["pvlib"])
from pvlib.pvsystem import pvwatts_dc as pvlib_pvwatts_dc
def pvwatts_dc(effective_irradiance, temp_cell, pdc_zero, gamma_pdc, temp_ref=25):
"""
Calculate the DC power output of a PV module using the PVWatts DC model.
See: https://pvlib-python.readthedocs.io/en/stable/reference/generated/pvlib.pvsystem.pvwatts_dc.html
This example function is provided as-is without any representation of accuracy.
Args:
effective_irradiance (int): The effective_irradiance value
temp_cell (int): The temp_cell value
pdc_zero (int): The pdc_zero value
gamma_pdc (float): The gamma_pdc value
temp_ref (float, optional): The temp_ref value Default is 25.
Returns:
float: DC power output (float), or error message string.
"""
try:
return pvlib_pvwatts_dc(float(effective_irradiance), float(temp_cell), float(pdc_zero), float(gamma_pdc), float(temp_ref))
except Exception as e:
return f"Error: {e}"