-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added time-shift and az-tilt analysis tasks for validation hub reposi…
…tory
- Loading branch information
1 parent
3adbcd8
commit ffa1e51
Showing
185 changed files
with
307,403 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
**/data/files/* | ||
**/data/ground-truth/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,200 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
plots_unfiltered/ | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
cover/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
.pybuilder/ | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
# For a library or package, you might want to ignore these files since the code is | ||
# intended to run in multiple environments; otherwise, check them in: | ||
# .python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# poetry | ||
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. | ||
# This is especially recommended for binary packages to ensure reproducibility, and is more | ||
# commonly ignored for libraries. | ||
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control | ||
#poetry.lock | ||
|
||
# pdm | ||
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. | ||
#pdm.lock | ||
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it | ||
# in version control. | ||
# https://pdm.fming.dev/#use-with-ide | ||
.pdm.toml | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# pytype static type analyzer | ||
.pytype/ | ||
|
||
# Cython debug symbols | ||
cython_debug/ | ||
|
||
# PyCharm | ||
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can | ||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore | ||
# and can be added to the global gitignore or merged into this file. For a more nuclear | ||
# option (not recommended) you can uncomment the following to ignore the entire idea folder. | ||
#.idea/ | ||
|
||
# Created by https://www.toptal.com/developers/gitignore/api/macos | ||
# Edit at https://www.toptal.com/developers/gitignore?templates=macos | ||
|
||
### macOS ### | ||
# General | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Icon must end with two \r | ||
Icon | ||
|
||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
.com.apple.timemachine.donotpresent | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
|
||
### macOS Patch ### | ||
# iCloud generated files | ||
*.icloud | ||
|
||
# End of https://www.toptal.com/developers/gitignore/api/macos | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Kirsten Perry | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# az-tilt-estimation-validation | ||
PVInsight framework for the azimuth-tilt estimation algorithms (similar formatting to the time shift estimation repo). |
78 changes: 78 additions & 0 deletions
78
ec2/analysis_taks/az-tilt-estimation/assets/SubmissionInstructions.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Submission Instructions | ||
|
||
### Validation Data Structure | ||
|
||
Each system can have multiple inverter-level AC power data streams that can be analyzed, with each data stream validated independently of all other data streams in the system. | ||
Each data stream is a Pandas series, with a timezone-aware Pandas datetime index, and an AC power time series in kW. | ||
|
||
An example time series is shown in Figure 1. An example dataset is provided for reference here. | ||
|
||
![image info](./time_series_data.PNG) | ||
|
||
*Figure 1: Snapshot of the structure of the time series data analyzed for azimuth-tilt estimation.* | ||
|
||
Download an example data set here. | ||
|
||
### File Submission Requirements | ||
|
||
The PV Validation Hub only accepts .zip file submissions. Each zip file must containing the following files: | ||
1) **submission_wrapper.py**: This Python file contains the master function for running the routines. Please refer to **Submitted Function Structure** below for more information on the associated function structure. | ||
2) **requirements.txt**: This text file contains the associated python packages (and versions, if applicable) to pip-install in order to run the submission_wrapper.py file. | ||
3) If applicable, any additional .py files containing support functions for **submission_wrapper.py** | ||
|
||
### Submitted Function Structure | ||
|
||
In the **submission_wrapper.py** file, a standard function name must be used when validating a submitted algorithm. The standard function definition, which is required to run the validation, is as follows: | ||
|
||
``` | ||
def estimate_az_tilt(time_series, latitude=None, longitude=None, data_sampling_frequency=None): | ||
""" | ||
This is the required function definition for running azimuth-tilt estimation. | ||
Parameters | ||
---------- | ||
time_series: Required argument. Pandas series with a tz-aware datetime index. | ||
This is the AC power time series that is being tested for azimuth and tilt. | ||
latitude: Optional argument. Float. | ||
The associated latitude coordinate of the PV site that the AC power stream is associated with. | ||
longitude: Optional argument. Float. | ||
The associated longitude coordinate of the PV site that the AC power stream is associated with. | ||
data_sampling_frequency: Optional argument. Float. | ||
The data frequency of the time series being evaluated. | ||
Returns | ||
------- | ||
azimuth: Float. | ||
Predicted azimuth value. | ||
tilt: Float. | ||
Predicted tilt value. | ||
""" | ||
[YOUR ALGORITHM HERE] | ||
return azimuth, tilt | ||
``` | ||
|
||
### Analysis Results | ||
|
||
An automated results report containing the following metrics is returned following successful analysis: | ||
|
||
1) Mean average error (MAE) across all of the test cases, for both azimuth and tilt values. To calculate MAE, the ground-truth azimuth/tilt value is compared to its associated estimated value, and error is returned in degrees. | ||
3) Associated graphics, including error distributions for azimuth, tilt, and run time. Additionally, a scatter plot comparing algorithm run time vs. number of days in the AC power data set is provided. Example graphics are shown in Figures 3-6, respectively. | ||
|
||
![image info](./absolute_error_az_dist.png) | ||
|
||
*Figure 3: Error distribution for system azimuth.* | ||
|
||
![image info](./absolute_error_tilt_dist.png) | ||
|
||
*Figure 4: Error distribution for system tilt.* | ||
|
||
![image info](./run_time_dist.png) | ||
|
||
*Figure 5: Distribution of algorithm run times on individual time series data streams, in seconds.* | ||
|
||
![image info](./run_time_number_days.png) | ||
|
||
*Figure 6: Algorithm run time vs. number of days present in the AC power data tested.* | ||
|
||
|
Binary file added
BIN
+10.2 KB
ec2/analysis_taks/az-tilt-estimation/assets/absolute_error_az_dist.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.66 KB
ec2/analysis_taks/az-tilt-estimation/assets/absolute_error_tilt_dist.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"category_name": "az_tilt_estimation", | ||
"function_name": "estimate_az_tilt", | ||
"comparison_type": "scalar", | ||
"performance_metrics": [ "runtime", "absolute_error" ], | ||
"allowable_kwargs": [ "latitude", "longitude", "data_sampling_frequency"], | ||
"ground_truth_compare": [ "azimuth", "tilt" ], | ||
"public_results_table": "az-tilt-public-metrics.json", | ||
"private_results_columns": [ | ||
"system_id", | ||
"file_name", | ||
"run_time", | ||
"data_requirements", | ||
"absolute_error_azimuth", | ||
"absolute_error_tilt", | ||
"issue", | ||
"number_days" | ||
], | ||
"plots": [ | ||
{ | ||
"type": "histogram", | ||
"x_val": "absolute_error_azimuth", | ||
"title": "Azimuth Absolute Error Distribution", | ||
"save_file_path": "absolute_error_az_dist.png" | ||
}, | ||
{ | ||
"type": "histogram", | ||
"x_val": "absolute_error_tilt", | ||
"title": "Tilt Absolute Error Distribution", | ||
"save_file_path": "absolute_error_tilt_dist.png" | ||
}, | ||
{ | ||
"type": "histogram", | ||
"x_val": "run_time", | ||
"title": "Run Time Distribution", | ||
"save_file_path": "run_time_dist.png" | ||
}, | ||
{ | ||
"type": "scatter_plot", | ||
"x_val": "run_time", | ||
"y_val": "number_days", | ||
"title": "Run Time vs. Number Days in Data Set", | ||
"save_file_path": "run_time_number_days.png" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Description | ||
It is not uncommon for PV installation metadata to be improperly labeled, including azimuth, tilt, and mounting configuration. Errors and missing data can be especially frequent in solar fleets that have been recently | ||
acquired. Incorrect values for this critical metadata can affect the overall performance of PV system performance modelling. | ||
|
||
This analysis benchmarks algorithm performance for correctly identifying azimuth and tilt for fixed tilt systems using AC power time series data as an input. Real-world AC power data from fixed-tilt systems is used to assess algorithm performance. | ||
These systems have been manually reviewed to ensure correct azimuth and tilt values. For each system, ground truth azimuth and tilt values are compared to algorithm-estimated azimuth and tilt values and error in degrees is calculated. | ||
|
Oops, something went wrong.