Optimal Positioning
What is the best placement of a solar surface for a day ?
pvgis-prototype surface optimise \
8.628 45.812 214 \
--start-time '2010-01-01' \
--end-time '2010-01-02'
{'Surface Orientation': SurfaceOrientation(optimal=False, optimiser=None, optimization_mode=None, success=None, min_degrees=0, min_radians=0, data_source=None, equation=None, algorithm=None, unit='radians', value=3.141592653589793, symbol='⯐ ⎄', description=None, label='Surface Position', title='Surface Position', supertitle='Surface Position data', shortname='Surface Position', name='Surface Position', max_radians=6.283185307179586, max_degrees=360), 'Surface Tilt': SurfaceTilt(optimal=True, optimiser=None, optimization_mode=None, success=None, min_degrees=0, min_radians=0, data_source=None, equation=None, algorithm=None, unit='radians', value=1.2920994050018084, symbol='⯐ ⎄', description=None, label='Surface Position', title='Surface Position', supertitle='Surface Position data', shortname='Surface Position', name='Surface Position', max_radians=3.141592653589793, max_degrees=180), 'Mean PV Power': np.float32(196.1968), 'Unit': 'radians', 'Timing': 'Milne1921'}
We'd also want the output in degrees along with a fingerprint.
pvgis-prototype surface optimise \
8.628 45.812 214 \
--start-time '2010-01-01' \
--end-time '2010-01-02' \
-aou degrees \
--fp
{'Surface Orientation': SurfaceOrientation(optimal=False, optimiser=None, optimization_mode=None, success=None, min_degrees=0, min_radians=0, data_source=None, equation=None, algorithm=None, unit='degrees', value=180.0, symbol='⯐ ⎄', description=None, label='Surface Position', title='Surface Position', supertitle='Surface Position data', shortname='Surface Position', name='Surface Position', max_radians=6.283185307179586, max_degrees=360), 'Surface Tilt': SurfaceTilt(optimal=True, optimiser=None, optimization_mode=None, success=None, min_degrees=0, min_radians=0, data_source=None, equation=None, algorithm=None, unit='degrees', value=74.03184261796848, symbol='⯐ ⎄', description=None, label='Surface Position', title='Surface Position', supertitle='Surface Position data', shortname='Surface Position', name='Surface Position', max_radians=3.141592653589793, max_degrees=180), 'Mean PV Power': np.float32(196.1968), 'Unit': 'degrees', 'Timing': 'Milne1921', 'Fingerprint 🆔': '8b3cbec1a4a6883f2cff3f9438ecded27bb27e8392aa1de9fa09c12c0d06c2e4'}
╭──────────────────────────────────────────────────────────────────╮
│ 8b3cbec1a4a6883f2cff3f9438ecded27bb27e8392aa1de9fa09c12c0d06c2e4 │
╰──────────────────────────────────────────────────── Fingerprint ─╯
Of course, we can select the photovoltaic technology which essentially tweaks some efficiency coefficients as part of the estimation of the photovoltaic power output.
pvgis-prototype surface optimise \
8.628 45.812 214 \
--start-time '2010-01-01' \
--end-time '2010-01-02' \
--photovoltaic-module 'CIS:Integrated' \
-aou degrees \
--fp
{'Surface Orientation': SurfaceOrientation(optimal=False, optimiser=None, optimization_mode=None, success=None, min_degrees=0, min_radians=0, data_source=None, equation=None, algorithm=None, unit='degrees', value=180.0, symbol='⯐ ⎄', description=None, label='Surface Position', title='Surface Position', supertitle='Surface Position data', shortname='Surface Position', name='Surface Position', max_radians=6.283185307179586, max_degrees=360), 'Surface Tilt': SurfaceTilt(optimal=True, optimiser=None, optimization_mode=None, success=None, min_degrees=0, min_radians=0, data_source=None, equation=None, algorithm=None, unit='degrees', value=74.28172116817908, symbol='⯐ ⎄', description=None, label='Surface Position', title='Surface Position', supertitle='Surface Position data', shortname='Surface Position', name='Surface Position', max_radians=3.141592653589793, max_degrees=180), 'Mean PV Power': np.float32(183.4925), 'Unit': 'degrees', 'Timing': 'Milne1921', 'Fingerprint 🆔': '1534da233f20b1beb2a906f8d03f4a485f51c02b32d7f7111346dbd9d3eb4457'}
╭──────────────────────────────────────────────────────────────────╮
│ 1534da233f20b1beb2a906f8d03f4a485f51c02b32d7f7111346dbd9d3eb4457 │
╰──────────────────────────────────────────────────── Fingerprint ─╯
The fingerprint
Observe how the different set of input parameters generate in the end a unique fingerprint. This helps to verify that operations are unique -- even if (composing different input parameters) we obtain the same result.
Say the options of placing a photovoltaic panel (i.e. a solar surface in PVGIS' dialect) are somewhat limited.
We can limit the range of positioning angles for the solar surface itself !
pvgis-prototype surface optimise \
8.628 45.812 214 \
--start-time '2010-01-01' \
--end-time '2010-01-02' \
--photovoltaic-module 'CIS:Integrated' \
--min-surface-orientation 166 \
--max-surface-orientation 199 \
--min-surface-tilt 11 \
--max-surface-tilt 88 \
-aou degrees \
--fp
/builds/NikosAlexandris/pvgis-prototype/.venv/lib/python3.11/site-packages/numpy/_core/numeric.py:362: RuntimeWarning: overflow encountered in cast
multiarray.copyto(a, fill_value, casting='unsafe')
/builds/NikosAlexandris/pvgis-prototype/.venv/lib/python3.11/site-packages/pvgisprototype/algorithms/muneer/irradiance/diffuse/clear_sky/inclined.py:397: RuntimeWarning: invalid value encountered in multiply
diffuse_inclined_irradiance_series *= (
/builds/NikosAlexandris/pvgis-prototype/.venv/lib/python3.11/site-packages/pvgisprototype/api/irradiance/effective.py:70: RuntimeWarning: invalid value encountered in subtract
spectral_effect_series = irradiance_series - (
/builds/NikosAlexandris/pvgis-prototype/.venv/lib/python3.11/site-packages/numpy/_core/numeric.py:362: RuntimeWarning: overflow encountered in cast
multiarray.copyto(a, fill_value, casting='unsafe')
/builds/NikosAlexandris/pvgis-prototype/.venv/lib/python3.11/site-packages/pvgisprototype/algorithms/muneer/irradiance/diffuse/clear_sky/inclined.py:397: RuntimeWarning: invalid value encountered in multiply
diffuse_inclined_irradiance_series *= (
/builds/NikosAlexandris/pvgis-prototype/.venv/lib/python3.11/site-packages/pvgisprototype/api/irradiance/effective.py:70: RuntimeWarning: invalid value encountered in subtract
spectral_effect_series = irradiance_series - (
/builds/NikosAlexandris/pvgis-prototype/.venv/lib/python3.11/site-packages/scipy/optimize/_numdiff.py:686: RuntimeWarning: invalid value encountered in subtract
df = [f_eval - f0 for f_eval in f_evals]
{'Surface Orientation': SurfaceOrientation(optimal=False, optimiser=None, optimization_mode=None, success=None, min_degrees=0, min_radians=0, data_source=None, equation=None, algorithm=None, unit='degrees', value=180.0, symbol='⯐ ⎄', description=None, label='Surface Position', title='Surface Position', supertitle='Surface Position data', shortname='Surface Position', name='Surface Position', max_radians=6.283185307179586, max_degrees=360), 'Surface Tilt': SurfaceTilt(optimal=True, optimiser=None, optimization_mode=None, success=None, min_degrees=0, min_radians=0, data_source=None, equation=None, algorithm=None, unit='degrees', value=630.2535746439055, symbol='⯐ ⎄', description=None, label='Surface Position', title='Surface Position', supertitle='Surface Position data', shortname='Surface Position', name='Surface Position', max_radians=3.141592653589793, max_degrees=180), 'Mean PV Power': np.float32(-2.7514144e+23), 'Unit': 'degrees', 'Timing': 'Milne1921', 'Fingerprint 🆔': '42be7ecad3397485cc8600d6f1a3536cad838cc0d4eb07a10416b7a5f93518d0'}
╭──────────────────────────────────────────────────────────────────╮
│ 42be7ecad3397485cc8600d6f1a3536cad838cc0d4eb07a10416b7a5f93518d0 │
╰──────────────────────────────────────────────────── Fingerprint ─╯
We can also dive deeper in mathematical options, such as the sampling method or sample size with which the optimisation algorithm operates
pvgis-prototype surface optimise \
8.628 45.812 214 \
--start-time '2010-01-01' \
--end-time '2010-01-02' \
--photovoltaic-module 'CIS:Integrated' \
--min-surface-orientation 155 \
--max-surface-orientation 188 \
--min-surface-tilt 12 \
--max-surface-tilt 88 \
--shgo-sampling-method halton \
-aou degrees \
--fp
/builds/NikosAlexandris/pvgis-prototype/.venv/lib/python3.11/site-packages/numpy/_core/numeric.py:362: RuntimeWarning: overflow encountered in cast
multiarray.copyto(a, fill_value, casting='unsafe')
/builds/NikosAlexandris/pvgis-prototype/.venv/lib/python3.11/site-packages/pvgisprototype/algorithms/muneer/irradiance/diffuse/clear_sky/inclined.py:397: RuntimeWarning: invalid value encountered in multiply
diffuse_inclined_irradiance_series *= (
/builds/NikosAlexandris/pvgis-prototype/.venv/lib/python3.11/site-packages/pvgisprototype/api/irradiance/effective.py:70: RuntimeWarning: invalid value encountered in subtract
spectral_effect_series = irradiance_series - (
/builds/NikosAlexandris/pvgis-prototype/.venv/lib/python3.11/site-packages/numpy/_core/numeric.py:362: RuntimeWarning: overflow encountered in cast
multiarray.copyto(a, fill_value, casting='unsafe')
/builds/NikosAlexandris/pvgis-prototype/.venv/lib/python3.11/site-packages/pvgisprototype/algorithms/muneer/irradiance/diffuse/clear_sky/inclined.py:397: RuntimeWarning: invalid value encountered in multiply
diffuse_inclined_irradiance_series *= (
/builds/NikosAlexandris/pvgis-prototype/.venv/lib/python3.11/site-packages/pvgisprototype/api/irradiance/effective.py:70: RuntimeWarning: invalid value encountered in subtract
spectral_effect_series = irradiance_series - (
/builds/NikosAlexandris/pvgis-prototype/.venv/lib/python3.11/site-packages/scipy/optimize/_numdiff.py:686: RuntimeWarning: invalid value encountered in subtract
df = [f_eval - f0 for f_eval in f_evals]
{'Surface Orientation': SurfaceOrientation(optimal=False, optimiser=None, optimization_mode=None, success=None, min_degrees=0, min_radians=0, data_source=None, equation=None, algorithm=None, unit='degrees', value=180.0, symbol='⯐ ⎄', description=None, label='Surface Position', title='Surface Position', supertitle='Surface Position data', shortname='Surface Position', name='Surface Position', max_radians=6.283185307179586, max_degrees=360), 'Surface Tilt': SurfaceTilt(optimal=True, optimiser=None, optimization_mode=None, success=None, min_degrees=0, min_radians=0, data_source=None, equation=None, algorithm=None, unit='degrees', value=687.5493541569879, symbol='⯐ ⎄', description=None, label='Surface Position', title='Surface Position', supertitle='Surface Position data', shortname='Surface Position', name='Surface Position', max_radians=3.141592653589793, max_degrees=180), 'Mean PV Power': np.float32(-1643604100000000.0), 'Unit': 'degrees', 'Timing': 'Milne1921', 'Fingerprint 🆔': '63d2743a4f776eb613d9f33e80ae11b9b19f9b8f4369e6d35ad55d09849b6637'}
╭──────────────────────────────────────────────────────────────────╮
│ 63d2743a4f776eb613d9f33e80ae11b9b19f9b8f4369e6d35ad55d09849b6637 │
╰──────────────────────────────────────────────────── Fingerprint ─╯
See the difference ?
pvgis-prototype surface optimise \
3 33 2000 \
--start-time '2010-01-01' \
--end-time '2010-01-02' \
--fp \
-v \
-aou degrees \
--min-surface-orientation 44 \
-v
Power series [W]
Time Power ⌁ Power ⌁ without Loss Sun-Horizon ⛰ Shading state 🮞 In-shade 🮞 Horizon ⛰ Visible 👁
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2010-01-01 00:00:00 0.0 0.0 In-shade True 0.0 False
2010-01-01 01:00:00 0.0 0.0 In-shade True 0.0 False
2010-01-01 02:00:00 0.0 0.0 In-shade True 0.0 False
2010-01-01 03:00:00 0.0 0.0 In-shade True 0.0 False
2010-01-01 04:00:00 0.0 0.0 In-shade True 0.0 False
2010-01-01 05:00:00 0.0 0.0 In-shade True 0.0 False
2010-01-01 06:00:00 0.0 0.0 In-shade True 0.0 False
2010-01-01 07:00:00 0.0 0.0 Low angle Potentially-sunlit False 0.0 True
2010-01-01 08:00:00 464.447 540.055 Above Sunlit False 0.0 True
2010-01-01 09:00:00 661.395 769.064 Above Sunlit False 0.0 True
2010-01-01 10:00:00 787.641 915.862 Above Sunlit False 0.0 True
2010-01-01 11:00:00 856.264 995.655 Above Sunlit False 0.0 True
2010-01-01 12:00:00 873.538 1015.742 Above Sunlit False 0.0 True
2010-01-01 13:00:00 841.102 978.025 Above Sunlit False 0.0 True
2010-01-01 14:00:00 755.954 879.016 Above Sunlit False 0.0 True
2010-01-01 15:00:00 610.275 709.622 Above Sunlit False 0.0 True
2010-01-01 16:00:00 386.671 449.618 Above Sunlit False 0.0 True
2010-01-01 17:00:00 0.0 0.0 In-shade True 0.0 False
2010-01-01 18:00:00 0.0 0.0 In-shade True 0.0 False
2010-01-01 19:00:00 0.0 0.0 In-shade True 0.0 False
2010-01-01 20:00:00 0.0 0.0 In-shade True 0.0 False
2010-01-01 21:00:00 0.0 0.0 In-shade True 0.0 False
2010-01-01 22:00:00 0.0 0.0 In-shade True 0.0 False
2010-01-01 23:00:00 0.0 0.0 In-shade True 0.0 False
2010-01-02 00:00:00 0.0 0.0 In-shade True 0.0 False
⅀ / μ 6237.286 7252.658
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Location Longitude ϑ, Latitude ϕ = 3.0, 33.0, Elevation: 2000.0 m │
│ Position Surface Orientation ↻: 3.142, Surface Tilt ⦥: 1.115 Angular units radians │
│ Definitions UTC, Incidence angle: Sun-Vector-to-Surface-Plane, Sun-to-Horizon: ['Low angle', 'Above', 'Below'] │
│ Algorithms Timing : NOAA, Positioning : NOAA, Incidence : Iqbal, Shading : PVGIS, Shading states : ['all'] │
╰───────────────────────────────────────────────────────────────────────────────────────────────────── Reference ─╯
╭──────────────────────────────────────────────────────╮
│ ⌁ Power ⛰ Horizon 👁 Visible │
│ - Loss ↻ Orientation 🮞 Shading │
│ ⏲ Timing ⦥ Tilt ⅀ N-ary Summation │
│ ⯐ Positioning ⭸ Incidence μ Mean │
╰───────────────────────────────────────────── Legend ─╯
╭──────────────────────────╮ ╭──────────────────────────────────────────────────────────────────────╮ ╭─────────────────────────────────────────────────╮
│ Statistic Power Unit │ │ Parameter Angle Unit Optimised Range │ │ Start Every End Zone │
│ Min 0.0 W │ │ Orientation ⯐ 180.0 degrees ✗ [44.0, 6.283185307179586] │ │ 2010-01-01 00:00 h 2010-01-02 00:00 UTC │
│ Mean 249.491 W │ │ Tilt ⯐ 63.859 degrees ✓ [0.0, 3.141592653589793] │ │ │
│ Max 0.0 W │ │ │ │ │
╰───── Photovoltaic Power ─╯ ╰─────────────────────────────────────────────────── Optimal Position ─╯ ╰─────────────────────────────────────────────────╯
╭─────────────────────╮
│ Timing : Milne1921 │
╰───── Metadata ──────╯
╭──────────────────────────────────────────────────────────────────╮
│ 4c7996dff0f2a842f33f08a333607d69c1792c96d78bc8f7b67b305196dd9cff │
╰──────────────────────────────────────────────────── Fingerprint ─╯