Skip to main content

PVGIS Simulator for Mosaik

Project description

This component simulates PV power output based on PVGIS (Photovoltaic Geographical Information System) photovoltaic performance data (the data is free to use). PVGIS provides information for any location in Europe and Africa, as well as a large part of Asia and America.

The PV simulator does not require any input, the only need to configure the PV system, geographical location and select an available reference year.

Since PVGIS only provides hourly data, any other step_size causes the data to be aggregated or splitted accordingly. If the step_size is less than an hour, it splits the value equally.

PV output data:

  • P[MW] - active power produced

PV system input data:

  • scale_factor - multiplies output [coef], might be used as a contol signal

Configuration:

  • scale_factor [coef] - multiplies power production once model is created, 1 is equal to 1 kW peak power installed

  • latitude [grad]

  • longitude [grad]

  • slope [grad] - inclination angle for the fixed plane

  • azimuth [grad] - orientation angle for the fixed plane

  • optimal_angle - if True, calculates and uses an optimal slope

  • optimal_both - if True, calculates and uses an optimal slope and azimuth

  • system_loss [%] - system inefficiency

  • pvtech - PV technology: “CIS” (defaul), “crystSi”, “CdTe”, “Unknown”

  • database - solar radiation database, PVGIS-SARAH2, PVGIS-NSRDB, PVGIS-ERA5, PVGIS-SARAH (default)

  • datayear - reference year from database

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 export the results.

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 = {
    'PVSim': {
        'python': 'mosaik_components.pv.pvgis_simulator:PVGISSimulator'
    },
    'CSV_writer': {
        'python': 'mosaik_csv_writer:CSVWriter',
    },
    ...
}

Initialize the PV-system:

# Create PV system with certain configuration
PVSIM_PARAMS = {
    'start_date' : START,
    'cache_dir' : './', # it caches PVGIS API requests
    'verbose' : True, # print PVGIS parameters and requests
}
pv_sim = world.start(
                "PVSim",
                step_size=STEP_SIZE,
                sim_params=PVSIM_PARAMS,
            )

Instantiate model entities:

PVMODEL_PARAMS = {
    'scale_factor' : 1000, # multiplies power production, 1 is equal to 1 kW peak power installed
    'lat' : 52.373,
    'lon' : 9.738,
    'slope' : 0, # default value,
    'azimuth' : 0, # default value,
    'optimal_angle' : True, # calculate and use an optimal slope
    'optimal_both' : False, # calculate and use an optimal slope and azimuth
    'pvtech' : 'CIS', # default value,
    'system_loss' : 14, # default value,
    'database' : 'PVGIS-SARAH', # default value,
    'datayear' : 2016, # default value,
}
pv_model = pv_sim.PVSim.create(1, **PVMODEL_PARAMS)

Connect with PV-simulator:

world.connect(
                    pv_model[0],
                    csv_writer,
                    'P[MW]',
                )

world.run(until=END)

Notes

The simulator configuration can be specified with the sim_params parameter in world.start:

  • cache_dir : ‘./’ - if not False, a local dir and file are used to store PVGIS API requests (may cause some problems in case of lack of space or restrictions on file discriptors)

  • verbose : True - output PVGIS API requests to stdout

  • gen_neg : False - if True, multiplies output power by (-1)

Changelog

1.2 - 2024-02-13

  • Control signal and gen_neg parameter are added

  • Minor changes

1.0 - 2024-01-11

  • Restructured as a mosaik component

  • Readme and examples added

  • Initial release of version implemented by Danila Valko

Authors

The adapter was initially developed by Danila Valko.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mosaik_pvgis-1.1.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

mosaik_pvgis-1.1-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file mosaik_pvgis-1.1.tar.gz.

File metadata

  • Download URL: mosaik_pvgis-1.1.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.13 Linux/5.4.109+

File hashes

Hashes for mosaik_pvgis-1.1.tar.gz
Algorithm Hash digest
SHA256 0b3776b2c850ec73cc24f460e3ef15b0c8163999affd63f79c775f7440fc918e
MD5 cc88f36aeaa8c96876859245e5e01cc0
BLAKE2b-256 80245835f67ad49f57e2428f1ec883c1935b26e5032a77e74f93769ed42c9c0d

See more details on using hashes here.

Provenance

File details

Details for the file mosaik_pvgis-1.1-py3-none-any.whl.

File metadata

  • Download URL: mosaik_pvgis-1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.13 Linux/5.4.109+

File hashes

Hashes for mosaik_pvgis-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 251dcf13e6bdb01cf6c8dbcded536cb7214b70ca91a82e346bb0dafa5e80e1be
MD5 e9c59250d3745048690f8da7943aeda7
BLAKE2b-256 4b286747e44b164ad4ce491b2bd5cf3992368814485b289406937f821f611763

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page