Skip to content

Repository files navigation

Measured-vs-simulated-PV

This package has been created based on the work presented in this article: https://doi.org/10.1016/j.rser.2024.115044 The data used for the article are in the publication data folder. The aim of this package is to facilate the data sharing of measured PV profiles, compare measured and simulated PV power production data, and analyse the influence of using measured or simulated PV power data for e-fuel techno-economic assessments.

The complete package documentation is available here: https://measured-vs-simulated-pv.readthedocs.io/en/latest/

The data used to run this package are:

This package contains:

  • Functions for extracting PV power production data from PVGIS and Renewables.ninja
  • Data analysis tools and graphs to compare measured and simulated data
  • A simple e-fuel techno-economic assessment model to study the error propagation

Sharing PV measured data

We would like to expand the analysis to other sites, so if you are allowed to publicly share high resolution PV power measurement data, that would help us a lot!

We do not need all the data points but the normalized hourly aggregated values. Higher resolution data can be shared but only two days are enough (one cloudy day and one sunny day).

To share PV power data, please contact us at giulia.montanari@polito.it or njbca@dtu.dk.

Installation guide

1- Download and install the code editor VSCode. Make sure to select the "Add to PATH" option when installing

2- Download and install Python.

3- Add the Python extension in the code editor (in "Extensions marketplace" on the left sidebar)

4- Open the terminal inside VS Code by clicking Terminal > New Terminal. Run the following command to create an environment .venv:

python -m venv .venv

7- Activate the environment writting in the terminal

.venv\Scripts\Activate.ps1

Note (from here)

On Microsoft Windows, it may be required to enable the Activate.ps1 script by setting the execution policy for the user. You can do this by issuing the following PowerShell command:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

8- Install the package:

pip install simeasren

Run example scripts

In VS code, create a new python script and copy on of the file in the example folder.

The Full_analysis.py example shows a simplified version of the analysis made in this publication https://doi.org/10.1016/j.rser.2024.115044

To personalize the analysis:

1- Fill up the "User defined" informations:

  • Location: the name should match with one of the location in the src/simeasren/data/measured_PV folder
  • Year: Specific year to run the simulation (the year must exist in the measured data)
  • H2_end_user_min_load: for the H2 techno-economic assessment, define the flexibility of the hydrogen end-user choosing its minimal load between 0 and 1
  • Solver: selected solver for the H2 techno-economic assessment. cbc is the default free solver. To use Gurobi, it has to be installed on your machine with a valid license. To use others solvers, check the PulP documentation
  • Renewablesninja_token: follow step 2

2- To generate profiles with Renewables.ninja, you have to set up a Renewable Ninja API token:

  • Visit Renewables.ninja's registration page and create an account
  • Once logged in go to your profile page to generate your API token
  • Copy your API token
  • In the code, paste your token in front of the rn_token variable: rn_token = 'your-token-here'

3- Run the Full_analysis.py file clicking on the small arrow on the top right of the VS Code window (make sure that you are running with the correct environment set-up in the installation step). A result folder will be created on your local machine.

More advanced e-fuel techno-economic assessments can also be performed using the "OptiPlant" tool

APIs Used and documentation

This project integrates with two APIs to gather solar production data:

PVGIS API: The Photovoltaic Geographical Information System (PVGIS) API provides solar irradiation and solar production data for various geographical locations. API Documentation: https://re.jrc.ec.europa.eu/pvg_tools/en/tools.html#PVP

Renewable Ninja API: Renewable Ninja provides simulation data for solar and wind energy production at any location worldwide. API Documentation: https://www.renewables.ninja/api

If using this script or related data, please remember to credit Renewables.ninja, PVGIS and cite https://doi.org/10.1016/j.rser.2024.115044 appropriately in your work :)

Support

If you have questions or would like to discuss about PV power data sharing do not hesitate to send an e-mail at giulia.montanari@polito.it or njbca@dtu.dk.

About

This repository contains measured data from real photovoltaic (PV) plants, along with Python scripts for extracting PV energy production data from PVGIS and Renewable Ninja. It also includes Python scripts for data analysis, graph creation, and error analysis, facilitating a comparison between measured and simulated PV energy production data.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages