eelib.core.devices.pv.pv_lib_model

eElib pvlib photovoltaic model. The pv module and inverter are both modeled together.

Caution

It contains weather data from different years between 2005 and 2016 and handles them as if they all belong to the same simulated year.

See https://pvlib-python.readthedocs.io/en/stable/index.html for further reference: William F. Holmgren, Clifford W. Hansen, and Mark A. Mikofski. ‘pvlib python: a python package for modeling solar energy systems.’ Journal of Open Source Software, 3(29), 884, (2018). https://doi.org/10.5281/zenodo.8368494

Copyright (c) 2023 pvlib python Contributors Copyright (c) 2014 PVLIB python Development Team Copyright (c) 2013 Sandia National Laboratories

Author: elenia@TUBS
Copyright 2024 elenia
This file is part of eELib, which is free software under the terms of the GNU GPL Version 3.

Module Contents

Classes

PVLibBase

Baseclass model for pv lib model implementations.

PVLib

An electrical photovoltaic system model from pv lib.

PVLibExact

An electrical photovoltaic system model from pv lib using specific modules and inverters.

class PVLibBase(eid: str, latitude: float = 57.38, longitude: float = 36.23, timezone: str = 'Europe/Berlin', azimuth: float = 180, tilt: float = 35.0, cos_phi: float = 0.9, start_time: str = None, step_size: int = 60 * 15)

Bases: abc.ABC

Baseclass model for pv lib model implementations.

_VALID_PARAMETERS
eid
latitude = '57.38'
longitude = '36.23'
azimuth = '180'
tilt = '35.0'
timezone = "'Europe/Berlin'"
cos_phi = '0.9'
p = '0'
p_min = '0'
p_max = '0'
q = '0'
p_set
voltage_control
step_size = '900'
timestep = 'None'
start_time = 'None'
weather
weather_step = 'None'
classmethod get_valid_parameters() dict

Returns dictionary containing valid parameter types and values.

Returns:

valid parameters for this model

Return type:

dict

_calc_from_weather_full()

From stored weather data, calculate the output for all timesteps.

_set_power()

Set active power from set value or to maximum and within limits, set reactive power.

Splitting up the _set_power method makes it easier to adopt other voltage control concepts in sub-classes. _set_power stays always untouched and either _set_active_power or _set_reactive_power need to be adopted for the chosen voltage_control.

_set_active_power()

Set the active power from set value or to maximum and within limits.

_set_reactive_power()

Set reactive power.

abstractmethod step(timestep: int)

Handles stepping of pvlib entity.

Parameters:

timestep (int) – Current simulation timestep

class PVLib(eid: str, p_rated: float = 10000, latitude: float = 57.38, longitude: float = 36.23, timezone: str = 'Europe/Berlin', azimuth: float = 180, tilt: float = 35.0, gamma_pdc: float = -0.004, cos_phi: float = 0.9, inverter_efficiency: float = 0.96, losses_standby: float = 3.6, min_power: float = 56.0, start_time: str = None, step_size: int = 60 * 15)

Bases: PVLibBase

An electrical photovoltaic system model from pv lib.

p_rated = '10000'
inverter_efficiency = '0.96'
gamma_pdc = '-0.004'
losses_standby = '3.6'
min_power = '56.0'
location
system
pvlib_mc
classmethod get_valid_parameters() dict

Returns dictionary containing valid parameter types and values.

Returns:

valid parameters for this model

Return type:

dict

step(timestep: int)

Performs simulation step of eELib pv_lib model. Simply extracts the value corresponding to the current simulation time.

Parameters:

timestep (int) – Current simulation time

class PVLibExact(eid: str, latitude: float = 57.38, longitude: float = 36.23, altitude_m: float = 75, module_name: str = 'SunPower_SPR_220__PVL____2006_', num_modules_per_string: int = 9, num_strings: int = 4, inverter_name: str = 'SMA_America__SB5000US__240V_', num_inverters: int = 2, timezone: str = 'Europe/Berlin', azimuth: float = 180, tilt: float = 35, cos_phi: float = 0.9, start_time: str = None, step_size: int = 60 * 15)

Bases: PVLibBase

An electrical photovoltaic system model from pv lib using specific modules and inverters.

module
inverter
num_modules_per_string = '9'
num_strings = '4'
num_inverters = '2'
p_rated
temperature_model_parameters
system
pvlib_mc
classmethod get_valid_parameters() dict

Returns dictionary containing valid parameter types and values.

Returns:

valid parameters for this model

Return type:

dict

step(timestep: int)

Performs simulation step of eELib pv_lib model. Simply extracts the value corresponding to the current simulation time.

Parameters:

timestep (int) – Current simulation time