Optimal Positioning

What is the best placement of a solar surface for a day?

pvgis surface optimise \
8.628 45.812 214 \
--start-time '2010-01-01'  \
--end-time '2010-01-02'
╭──────────────────────────────────────────────────────╮ ╭──────────────────╮
│ Position  Orientation : 3.142, Tilt : 1.095          │ │  ↻  Orientation  │
│ Location  longitude, latitude = 0.151, 0.8, Unitless │ │  ∡  Tilt         │
│ Mean PV Power  200.42                                │ │  ⏲  Timing       │
│ Algorithms  Timing : Milne1921, Zone : UTC,          │ │                  │
╰────────────────────────────────────────── Reference ─╯ ╰───────── Legend ─╯

We'd also want the output in degrees along with a fingerprint.

pvgis surface optimise \
8.628 45.812 214 \
--start-time '2010-01-01' \
--end-time '2010-01-02' \
-aou degrees \
--fp
╭─────────────────────────────────────────────────────────╮
│ Position  Orientation : 180.0, Tilt : 62.711            │
│ Location  longitude, latitude = 8.628, 45.812, Unitless │
│ Mean PV Power  200.42                                   │
│ Algorithms  Timing : Milne1921, Zone : UTC,             │
╰───────────────────────────────────────────── Reference ─╯
╭───────────────────╮                                      
│  ↻   Orientation  │                                      
│  ∡   Tilt         │                                      
│  ⏲   Timing       │                                      
│  🆔  Fingerprint  │                                      
╰────────── Legend ─╯                                      
╭──────────────────────────────────────────────────────────────────╮
│ 984309726471b8785b49e5b6b336a2dcd9097e12090cc6afbc3932d9681615ea │
╰──────────────────────────────────────────────────── 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 surface optimise \
8.628 45.812 214 \
--start-time '2010-01-01' \
--end-time '2010-01-02' \
--photovoltaic-module 'CIS:Integrated' \
-aou degrees \
--fp
╭─────────────────────────────────────────────────────────╮
│ Position  Orientation : 180.0, Tilt : 62.1              │
│ Location  longitude, latitude = 8.628, 45.812, Unitless │
│ Mean PV Power  188.573                                  │
│ Algorithms  Timing : Milne1921, Zone : UTC,             │
╰───────────────────────────────────────────── Reference ─╯
╭───────────────────╮                                      
│  ↻   Orientation  │                                      
│  ∡   Tilt         │                                      
│  ⏲   Timing       │                                      
│  🆔  Fingerprint  │                                      
╰────────── Legend ─╯                                      
╭──────────────────────────────────────────────────────────────────╮
│ 784bfad06b532e0ba2f3e0047e7d03e9d38a7c66dfca071cb920a65e57896c71 │
╰──────────────────────────────────────────────────── 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 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
/usr/local/lib/python3.11/site-packages/numpy/_core/numeric.py:386: RuntimeWarning: overflow encountered in cast
  multiarray.copyto(a, fill_value, casting='unsafe')
/usr/local/lib/python3.11/site-packages/pvgis/algorithms/pvgis/diffuse/inclined.py:516: RuntimeWarning: invalid value encountered in multiply
  diffuse_inclined_irradiance_series *= (
/usr/local/lib/python3.11/site-packages/pvgis/algorithms/pvgis/diffuse/inclined.py:523: RuntimeWarning: invalid value encountered in divide
  diffuse_inclined_irradiance_series
/usr/local/lib/python3.11/site-packages/pvgis/api/power/efficiency.py:379: RuntimeWarning: invalid value encountered in subtract
  spectral_effect_series = irradiance_series - (
/usr/local/lib/python3.11/site-packages/numpy/_core/_methods.py:132: RuntimeWarning: overflow encountered in reduce
  ret = umr_sum(arr, axis, dtype, out, keepdims, where=where)
/usr/local/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]
╭─────────────────────────────────────────────────────────╮
│ Position  Orientation : 180.0, Tilt : 630.254           │
│ Location  longitude, latitude = 8.628, 45.812, Unitless │
│ Mean PV Power  -2.7514131235310574e+23                  │
│ Algorithms  Timing : Milne1921, Zone : UTC,             │
╰───────────────────────────────────────────── Reference ─╯
╭───────────────────╮                                      
│  ↻   Orientation  │                                      
│  ∡   Tilt         │                                      
│  ⏲   Timing       │                                      
│  🆔  Fingerprint  │                                      
╰────────── Legend ─╯                                      
╭──────────────────────────────────────────────────────────────────╮
│ 5bfeac6a708ddf028a519ed3e8c986b6afe3f0c40e3c58a4b84bf5c1dab382cd │
╰──────────────────────────────────────────────────── Fingerprint ─╯

We can also dive deeper in mathematical options, such as the sampling method or sample size with which the optimisation algorithm operates

pvgis 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 \
--sampling-method-shgo halton \
-aou degrees \
--fp
/usr/local/lib/python3.11/site-packages/numpy/_core/numeric.py:386: RuntimeWarning: overflow encountered in cast
  multiarray.copyto(a, fill_value, casting='unsafe')
/usr/local/lib/python3.11/site-packages/pvgis/algorithms/pvgis/diffuse/inclined.py:516: RuntimeWarning: invalid value encountered in multiply
  diffuse_inclined_irradiance_series *= (
/usr/local/lib/python3.11/site-packages/pvgis/algorithms/pvgis/diffuse/inclined.py:523: RuntimeWarning: invalid value encountered in divide
  diffuse_inclined_irradiance_series
/usr/local/lib/python3.11/site-packages/pvgis/api/power/efficiency.py:379: RuntimeWarning: invalid value encountered in subtract
  spectral_effect_series = irradiance_series - (
/usr/local/lib/python3.11/site-packages/numpy/_core/_methods.py:132: RuntimeWarning: overflow encountered in reduce
  ret = umr_sum(arr, axis, dtype, out, keepdims, where=where)
/usr/local/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]
╭─────────────────────────────────────────────────────────╮
│ Position  Orientation : 180.0, Tilt : 687.549           │
│ Location  longitude, latitude = 8.628, 45.812, Unitless │
│ Mean PV Power  -1643608419598336.0                      │
│ Algorithms  Timing : Milne1921, Zone : UTC,             │
╰───────────────────────────────────────────── Reference ─╯
╭───────────────────╮                                      
│  ↻   Orientation  │                                      
│  ∡   Tilt         │                                      
│  ⏲   Timing       │                                      
│  🆔  Fingerprint  │                                      
╰────────── Legend ─╯                                      
╭──────────────────────────────────────────────────────────────────╮
│ 5797a67ba637b9f88091d45690c6adcfe7638606e14eac048b44516c0eba9a6a │
╰──────────────────────────────────────────────────── Fingerprint ─╯

See the difference?

pvgis surface optimise \
3 33 2000 \
--start-time '2010-01-01' \
--end-time '2010-01-02' \
--fp \
-v \
-aou degrees \
--min-surface-orientation 44
{'surface_orientation': SurfaceOrientation(value=180.0, unit='degrees', min_radians=0, max_radians=6.283185307179586, min_degrees=0, max_degrees=360, optimal=False, optimizer=None), 'surface_tilt': SurfaceTilt(value=63.81414463038747, unit='degrees', min_radians=0, max_radians=3.141592653589793, min_degrees=0, max_degrees=180, optimal=True, optimizer='L-BFGS-B'), 'Mean PV Power': np.float32(260.24988), 'unit': 'degrees', 'time_algorithm': 'Milne1921', 'fingerprint': '4ca7e582747399e7056cc50464e49b658ff6d8bd7e2aef3c572c1d787eb72b0e'}
╭──────────────────────────────────────────────────────────────────╮
│ 4ca7e582747399e7056cc50464e49b658ff6d8bd7e2aef3c572c1d787eb72b0e │
╰──────────────────────────────────────────────────── Fingerprint ─╯