feedinlib.models.Pvlib

class feedinlib.models.Pvlib(**kwargs)[source]

Model to determine the feed-in of a photovoltaic module using the pvlib.

The pvlib [1] is a python library for simulating the performance of photovoltaic energy systems. For more information about the photovoltaic model check the documentation of the pvlib [2].

Notes

In order to use this model various power plant and model parameters have to be provided. See power_plant_requires as well as requires for further information. Furthermore, the weather data used to calculate the feed-in has to have a certain format. See feedin() for further information.

References

[1]pvlib on github
[2]pvlib documentation

Methods

__init__(**kwargs)
feedin(weather, power_plant_parameters, **kwargs) Calculates power plant feed-in in Watt.
instantiate_module(**kwargs) Instantiates a pvlib.PVSystem object.

Attributes

power_plant_requires The power plant parameters this model requires to calculate a feed-in.
pv_system_area Area of PV system in m^2.
pv_system_peak_power Peak power of PV system in Watt.
requires The parameters this model requires to calculate a feed-in.
__init__(**kwargs)[source]
feedin(weather, power_plant_parameters, **kwargs)[source]

Calculates power plant feed-in in Watt.

This function uses the pvlib.ModelChain to calculate the feed-in for the given weather time series and PV system. By default the AC feed-in is returned. Set mode parameter to ‘dc’ to retrieve DC feed-in.

Parameters:
  • weather (pandas.DataFrame) – Weather time series used to calculate feed-in. See weather parameter in pvlib’s Modelchain run_model method for more information on required variables, units, etc.
  • power_plant_parameters (dict) – Dictionary with power plant specifications. Keys of the dictionary are the power plant parameter names, values of the dictionary hold the corresponding value. The dictionary must at least contain the required power plant parameters (see power_plant_requires) and may further contain optional power plant parameters (see pvlib.PVSystem).
  • location (tuple or shapely.Point) – Geo location of the PV system. Can either be provided as a tuple with first entry being the latitude and second entry being the longitude or as a shapely.Point.
  • mode (str (optional)) –

    Can be used to specify whether AC or DC feed-in is returned. By default mode is ‘ac’. To retrieve DC feed-in set mode to ‘dc’.

    mode also influences the peak power of the PV system. See pv_system_peak_power for more information.

  • **kwargs – Further keyword arguments can be used to overwrite pvlib.ModelChain parameters.
Returns:

Power plant feed-in time series in Watt.

Return type:

pandas.Series

instantiate_module(**kwargs)[source]

Instantiates a pvlib.PVSystem object.

Parameters:**kwargs – See power_plant_parameters parameter in feedin() for more information.
Returns:PV system to calculate feed-in for.
Return type:pvlib.PVSystem
power_plant_requires

The power plant parameters this model requires to calculate a feed-in.

The required power plant parameters are:

module_name, inverter_name, azimuth, tilt, albedo/surface_type

module_name (str)
Name of the PV module as in the Sandia module database. Use get_power_plant_data() with dataset = ‘sandiamod’ to get an overview of all provided modules. See the data set documentation [3] for further information on provided parameters.
inverter_name (str)
Name of the inverter as in the CEC inverter database. Use get_power_plant_data() with dataset = ‘cecinverter’ to get an overview of all provided inverters. See the data set documentation [4] for further information on provided parameters.
azimuth (float)

Azimuth angle of the module surface (South=180).

See also PVSystem.surface_azimuth in pvlib documentation.

tilt (float)

Surface tilt angle in decimal degrees. The tilt angle is defined as degrees from horizontal (e.g. surface facing up = 0, surface facing horizon = 90).

See also PVSystem.surface_tilt in pvlib documentation.

albedo (float)
The ground albedo. See also PVSystem.albedo in pvlib documentation.
surface_type (str)
The ground surface type. See SURFACE_ALBEDOS in pvlib.irradiance module for valid values.

References

[3]Sandia module database documentation
[4]CEC inverter database documentation
pv_system_area

Area of PV system in m^2.

pv_system_peak_power

Peak power of PV system in Watt.

The peak power of the PV system can either be limited by the inverter or the PV module(s), wherefore in the case the mode parameter, which specifies whether AC or DC feed-in is calculated, is set to ‘ac’ (which is the default), the minimum of AC inverter power and maximum power of the module(s) is returned. In the case that mode is set to ‘dc’ the inverter power is not considered and the peak power is equal to the maximum power of the module(s).

requires

The parameters this model requires to calculate a feed-in.

The required model parameters are:

location

location (tuple or shapely.Point)
Geo location of the PV system. Can either be provided as a tuple with first entry being the latitude and second entry being the longitude or as a shapely.Point.