Giter Club home page Giter Club logo

soda's Introduction

PySoda

SoDa logo

PySoda is an irradiance-based synthetic Solar Data generation tool to generate realistic sub-minute solar photovoltaic (PV) power time series. Soda emulates the weather pattern for a certain geographical location using 30-min averaged irradiance and cloud type information from the National Solar Radiation Database (NSRDB)

Installation (Python)

Use Git to install pysoda in your current python environment

git clone https://github.com/Ignacio-Losada/SoDa.git
cd SoDa
pip3 install -r requirements.txt

Installation with Git (Conda)

Use Git to install a conda environment for pysoda

git clone https://github.com/Ignacio-Losada/SoDa.git
cd SoDa
conda env create -f environment.yml

Basic Usage

Once PySoda is installed, solar time series can be generated as follows.

First, you'll need to create an object with the coordinates of interest

import soda
lat = 33.9533
lon = -117.3962

site = soda.SolarSite(lat,lon)

Then, obtain the closest NSRDB point to the specified coordinates and retrieve the neccesary irradiance values. We recommend retrieving the 30-min average NSRDB irradiance data to obtain the best results

year = "2015"
leap_year = False
interval = "30"
utc = False
df = site.get_nsrdb_data(year,leap_year,interval,utc)

You'll also need to specify the solar panel configuration and obtain the 30-min averaged solar time series

clearsky = False
capacity = 1
DC_AC_ratio = 1.2
tilt = 33
azimuth = 180
inv_eff = 96
losses = 15
array_type = 0

pwr = site.generate_solar_power_from_nsrdb(clearsky,capacity,DC_AC_ratio,tilt,azimuth,inv_eff,losses,array_type)

Finally, you can generate stochastic solar time series for a given date at different time resolutions, e.g. 5 seconds

date = "2015-01-10"
resolution = "5S"
solar_data = site.generate_high_resolution_power_data(resolution, date)

This function will return a pandas dataframe with the solar generation. And we compare our results

SoDa results

Citing SoDa

If you find SoDa useful in your work, we kindly request that you cite the following publication:

@inproceedings{,
  author = {Ignacio Losada Carreno and Raksha Ramakrishna and Anna Scaglione and Daniel Arnold and Ciaran Roberts and Sy-Toan Ngo and Sean Peisert and David Pinney},
  title = {SoDa: An Irradiance-Based Synthetic Solar DataGeneration Tool},
  booktitle = {2020 IEEE International Conference on Smart Grid Communications (SmartGridComm)},
  year = {2020},
  month = {November},
  pages = {1-6},
  doi = {}
}

License

soda's People

Contributors

ignacio-losada avatar dpinney avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.