Skip to main content

mosaik-pvlib

This component combines the PVLib and Mosaik co-simulation environment to calculate the active/reactive PV power output. The original code by Fernando Penaherrera was part of the ZDIN-ZLE project.

The PV system simulator uses the following meteorological data as input:

  • GHI[W/m2] - Global irradiance (direct normal irradiance)

  • Wind[m/s] - Wind speed

  • Air[C] - Air temperature

  • Air[Pa] - Air pressure (hourly measurements, by default)

PV system output data:

  • P[MW] - active power produced

The library provides three easily interpretable PV configurations:

  • HOUSE

  • BUILDING

  • SIMPLE

An example scenario is located in the ´demo´ folder.

Other options

Please pay attention to the input data. If you want to use only Direct Normal Irradiance input data as part of the co-simulation, then mosaik-pv is suitable, if you want to use full weather information (global irradiance, wind speed, air temperature and pressure) then mosaik-pvlib is suitable. If you are satisfied with historical performance estimates for a particular location or have no other input data, then mosaik-pvgis is the best solution which is based on PVGIS performance data.

Installation

  • To use this project, you have to install at least version 3.2.0 of mosaik

  • It is recommended, to use the Mosaik-CSV Library to import meteo data

If you don’t want to install this project through PyPI, you can use pip to install the requirements.txt file:

pip install -r requirements.txt

How to Use

Specify simulators configurations within your scenario script:

SIM_CONFIG = {
    'MeteoSim': {
        'python': 'mosaik_csv:CSV'
    },
    'PVSim': {
        'python': 'mosaik_components.pv.photovoltaic_simulator:PVSimulator'
    },
    ...
}

Initialize the PV- and meteo-simulator:

# Create weather/meteo simulator
meteo_sim = world.start("MeteoSim", sim_start=START, datafile=METEO_DATA)

# Create PV system with certain configuration
pv_count = 5
pv_config = {str(i) : generate_configurations(Scenarios.HOUSE) for i in range(pv_count)}
pv_sim = world.start(
                "PVSim",
                start_date=START,
                step_size=STEP_SIZE,
                pv_data=pv_config,
            )

Instantiate model entities:

meteo_model = meteo_sim.Braunschweig.create(1)
pv_model = pv_sim.PVSim.create(pv_count)

Connect meteo input with PV-simulator:

world.connect(
                    meteo_model[0],
                    pv_model[0],
                    ("GlobalRadiation", "GHI[W/m2]"),
                    ("AirPressHourly", "Air[Pa]"),
                    ("AirTemperature", "Air[C]"),
                    ("WindSpeed", "Wind[m/s]"),
                )

CSV-Formatting

For the simulator to work correctly, both .csv files have to be specifically formatted!

meteo-data

The meteo_data.csv is formatted accordingly to the conventions of the mosaik_csv simulator:

Wind
Date,wind_speed
YYYY-MM-DD HH:mm:ss,v1
YYYY-MM-DD HH:mm:ss,v2
...
Braunschweig
Time,GlobalRadiation,AirPressHourly,AirTemperature,WindSpeed
YYYY-MM-DD HH:mm:ss,2.1,92.0,0.0,0.0
  • Each entry in the .csv needs a Date in the YYYY-MM-DD HH:mm:ss format and a set of values.

Changelog

1.0 - 2024-01-11

  • Restructured as a mosaik component

  • Readme and examples are added

  • Initial release of version implemented by Fernando Penaherrera

Authors

The adapter was initially developed by Fernando Penaherrera and updated by Danila Valko.

Metadata

Release files for mosaik-pvlib 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mosaik-pvlib 1.0
File Size Uploaded
mosaik_pvlib-1.0.tar.gz 12.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mosaik-pvlib 1.0
File Interpreter ABI Platform
mosaik_pvlib-1.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.2 kB

Release files / mosaik_pvlib-1.0.tar.gz

Download URL mosaik_pvlib-1.0.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2238c36ad7c2d5844335e0be935aa3a02a77414eddfcc4e401c563f9f8e8d2dc
BLAKE2b-256 checksum
How to use checksums
b3bfccd98a461114b29d65c416ad453cd361e8206ba75ca4ca5d2dfbafdf112e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.10.13 Linux/5.4.109+

Release files / mosaik_pvlib-1.0-py3-none-any.whl

Download URL mosaik_pvlib-1.0-py3-none-any.whl
Size 13.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e0625176d513cad8c5af6bf06bd89c8c6451f39c035a4122403f98658b4a5bc2
BLAKE2b-256 checksum
How to use checksums
1c4b354d455f74daab6773481f48a18c7e51d8c50f984e8fb95f6ada3c4cc4f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.10.13 Linux/5.4.109+

Release history Release notifications | RSS feed

This release

1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page