README¶
# residuals_weather_storage
Analyzing Weather Data and ESM Residual Load Predictions for Energy Storage Design
Description¶
This project encompasses two main tasks: loading and analyzing weather or residual energy data. With or without an energy storage. it is part of DFG SPP 2403 “Carnot Batteries: Inverse Design from Markets to Molecules.”
Getting Started¶
Please review the script run_weather_load_storage.py. This script loads solar or wind data for a specified DWD weather station and year (or multiple years, as detailed in the dwd_analyze_store_second_threshold.py dictionary of stations). Simplified energy load data is generated for each station. A specific storage size is defined, and the energy data is analyzed in terms of time-resolved residuals with and without storage. The analysis focuses on the duration and energy integrals of periods with negative residuals, as well as the immediately following periods with positive residuals. The results are used to assess levels of autonomy or equivalents of full charging/discharging cycles.
The relative values of power, energy load, and storage can be set arbitrarily. The factor used to multiply the (relative) energy load acts as a measure of the extent of the installation for residuals relative to energy load. Storage size can also be chosen in different units, such as hours of average power input that can be stored.
## Weather Data
Weather data is downloaded from the DWD for various weather stations, specifically for solar and wind measurements. Example sources include:
Solar Data: https://opendata.dwd.de/climate_environment/CDC/observations_germany/climate/10_minutes/solar/historical
Wind Data: https://opendata.dwd.de/climate_environment/CDC/observations_germany/climate/10_minutes/wind/historical
The typical resolution of the data is 10 minutes, which is often converted to hourly data. For solar data, values are summed to compute the integral power for the given hour. For wind speeds, the mean values are calculated for each hour. Files are either read directly from the website and stored, or read from the local directory. Please refer to the script `dwd_analyze_store_second_threshold.py`.
Functions within this script include:
Loading the Data: load_data() with the option hourly you can resample
From solar the ‘power’ is directly taken , while for wind the power is estimated by taking the cube of the wind speed until the speed for the nominal load is reached. This is added to a new column in the DataFrame.
Simplified energy load data is calculated in load_curve_simple.py, currently either as step functions or sinusoids, varying between a daily maximum and nightly minimum, and differing between weekdays and weekends.
Residuals are calculated from the load power times a factor - power (from solar or wind). The factor is a measure of the extension of renewables in the system.
Analyzing periods with positive and negative residual loads and writing the period durations, integrals , and following periods with opposite sign into new pandas DataFrames: one for all periods, one for periods with available energy (followed by a pause of stored length), and one for the following pauses.
many plots are created, including histograms and scatterplots of the nef vs. pos residual periods.
The usage of storages are assessed with a simple storage model, its size is given in hours and is the stored energy (kWh) divided by the mean negative residual power.