Thank you for the quick response. :) Yes, of course. But I am going to bed soon. I can answer you tomorrow morning again.
import pvlib
from pvlib.location import Location
from pvlib.pvsystem import PVSystem
import pandas as pd
import matplotlib.pyplot as plt
celltype = 'monoSi'
pdc0 = 415
v_mp = 44.1 #Spannung im Maximum Power Point
i_mp = 9.08 #Stromstärke im Maximum Power Point
v_oc = 53.4 #open circuit voltage, wo Linie die x-Achse schneidet I(U)-Graph, für I=0, Leerlaufspannung
i_sc = 9.60 #short circuit current, wo Linie die y-Achse scheidet, für U=0, Kurzschlussstrom
alpha_sc = 0.0005 * i_sc #Temperaturkoeffizienten für I in %/°C
beta_voc = -0.0029 * v_oc #Temperaturkoeffizienten für U in %/°C
gamma_pdc = -0.37 #Temperaturkoeffizienten für P in %/°C, muss nicht durch 100 geteilt werden, da der prozentwert abgebildet wird
cells_in_series = 6*27
temp_ref = 25
location = Location(latitude=51.31322846025836, longitude=12.372779830086992,
tz='Europe/Berlin', altitude=135, name='NieperBau')
surface_tilt=45
surface_azimuth=0
start="2020-01-01 00:00"
end="2020-01-07 23:00"
poa_data_2020 = pd.read_csv("poa_data_2020_io.csv", index_col=0)
poa_data_2020.index = pd.date_range(start="2020-01-01 00:00",
periods=len(poa_data_2020.index),
freq="h")
poa_data = poa_data_2020[start:end]
solarpos = location.get_solarposition(times=pd.date_range(start=start, end=end
, freq="h"))
aoi = pvlib.irradiance.aoi(
surface_tilt, surface_azimuth, solarpos.apparent_zenith, solarpos.azimuth)
iam = pvlib.iam.ashrae(aoi)
effective_irradiance = poa_data["poa_direct"] * iam + poa_data["poa_diffuse"]
temp_cell = pvlib.temperature.faiman(poa_data["poa_global"], poa_data["temp_air"],
poa_data["wind_speed"])
I_L_ref, I_o_ref, R_s, R_sh_ref, a_ref, Adjust = pvlib.ivtools.sdm.fit_cec_sam(
celltype = celltype,
v_mp = v_mp,
i_mp = i_mp,
v_oc = v_oc,
i_sc = i_sc,
alpha_sc = alpha_sc,
beta_voc = beta_voc,
gamma_pmp = gamma_pdc,
cells_in_series = cells_in_series,
temp_ref = temp_ref)
#values for reference conditions from above are now applied to the acutual irradiance data and corresponding cell temperatures
cec_params = pvlib.pvsystem.calcparams_cec(effective_irradiance, #calculated before
temp_cell, #calculated from the faimann model
alpha_sc,
a_ref,
I_L_ref,
I_o_ref, #the rest is calculated by the fitting function above
R_sh_ref,
R_s,
Adjust)
mpp = pvlib.pvsystem.max_power_point(*cec_params,
method='newton')
# mpp.plot(figsize=(16,9))
# # plt.show()
system = PVSystem(modules_per_string=1, strings_per_inverter=1) #definition des systems, um auch mehrere Zellen kombinieren zu können und auszurechnen
dc_scaled = system.scale_voltage_current_power(mpp) #dc output
dc_scaled.plot(figsize=(16,9))
plt.show()