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(ename: str, latitude: float = 57.38, longitude: float = 36.23, start_time: str = '2016-01-01 00:00:00', timezone: str = 'Europe/Berlin', azimuth: float = 180, tilt: float = 35.0, cos_phi: float = 0.9, step_size: int = 60 * 15)

Bases: abc.ABC

Baseclass model for pv lib model implementations.

_VALID_PARAMETERS
classmethod get_valid_parameters()

Returns dictionary containing valid parameter types and values.

Returns:

valid parameters for this model

Return type:

dict

_retrieve_weather_step(time: int)

Calculate current weather data.

Parameters:

time (int) – Current simulation time step

_set_power()

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

abstract step(time: int)

Handles stepping of pvlib entity.

Parameters:

time (int) – Current simulation time

class PVLib(ename: str, p_rated: float = 10000, latitude: float = 57.38, longitude: float = 36.23, start_time: str = '2016-01-01 00:00:00', 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, step_size: int = 60 * 15)

Bases: PVLibBase

An electrical photovoltaic system model from pv lib.

classmethod get_valid_parameters()

Returns dictionary containing valid parameter types and values.

Returns:

valid parameters for this model

Return type:

dict

step(time: int)

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

Parameters:

time (int) – Current simulation time

class PVLibExact(ename: 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, start_time: str = '2016-01-01 00:00:00', timezone: str = 'Europe/Berlin', azimuth: float = 180, tilt: float = 35, cos_phi: float = 0.9, step_size: int = 60 * 15)

Bases: PVLibBase

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

classmethod get_valid_parameters()

Returns dictionary containing valid parameter types and values.

Returns:

valid parameters for this model

Return type:

dict

step(time: int)

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

Parameters:

time (int) – Current simulation time