3 - Spectral Degradation#

Requirements:

  • spectral irradiance (measured or simulated)

  • wavelengths of spectral irradiance data

  • module RH

  • module temperature

Objectives:

  1. Read in spectral irradiance

  2. Calculate spectral degradation

# if running on google colab, uncomment the next line and execute this cell to install the dependencies and prevent "ModuleNotFoundError" in later cells:
# !pip install pvdeg==0.3.3
import os
import pandas as pd
import numpy as np
import pvdeg
from pvdeg import DATA_DIR
# This information helps with debugging and getting support :)
import sys, platform
print("Working on a ", platform.system(), platform.release())
print("Python version ", sys.version)
print("Pandas version ", pd.__version__)
print("pvdeg version ", pvdeg.__version__)
Working on a  Linux 6.5.0-1025-azure
Python version  3.11.9 (main, Jul 15 2024, 21:50:21) [GCC 11.4.0]
Pandas version  2.2.2
pvdeg version  0.1.dev1+g4f38099

1. Read in spectral irradiance data#

Spectral degradation has 4 main requirements:

  • Spectral Irradiance [W/m^2 nm]

  • Wavelength [nm]

  • Module Relative Humidity [%]

  • Module Temperature [C]

For more advanced scenarios, you may want to calculate the degradation of a particular layer within the module. Below, we are using backside irradiance and therefore a slightly different temperature and humidity have been calculated. To calculate degradation on the backside, we used pvdeg.humidity.rh_backsheet. For the the front side, you should use pvdeg.humidity.rh_surface_outside or rh_front_encap

For this tutorial we are using pre-generated data from a ray-tracing simulation. To calculate the degradation rate, we will need the wavelengths used in the simulation.

wavelengths = np.array(range(280,420,20))

SPECTRA = pd.read_csv(os.path.join(DATA_DIR,'spectra.csv'), header=0, index_col=0)
SPECTRA.head()
Spectra Temperature RH
timestamp
2021-03-09 10:00:00 [0.6892146677599185, 0.40215646494410884, 0.67... 45 59
2021-03-09 11:00:00 [0.15575709102178648, 0.5464374649246564, 0.68... 44 56
2021-03-09 12:00:00 [0.22782105874481207, 0.9056495270031296, 0.26... 59 39
2021-03-09 13:00:00 [0.3741943134512433, 0.035830980984344674, 0.4... 44 13
2021-03-09 14:00:00 [0.40321187996337626, 0.6473167864022122, 0.69... 25 39

2. Calculate Degradation#

The spectral degradation function has several optional paramters. For more information, refer to the documentation. Below is a function call with the minimum required information.

degradation = pvdeg.degradation.degradation(spectra=SPECTRA['Spectra'],
                                            rh_module=SPECTRA['RH'],
                                            temp_module=SPECTRA['Temperature'],
                                            wavelengths=wavelengths)
Removing brackets from spectral irradiance data