Solar Tilt Optimizer

Find the best panel tilt (fixed or seasonal) for more kWh.

Dec 22, 2024
Solar Tilt Optimizer app screenshot with results and Energy vs Tilt plot
Figure 1. Live app results panel and Energy-vs-Tilt curve.

Project Overview

The Solar Tilt Optimizer is a Streamlit app that computes the best fixed tilt and a simple two-position seasonal schedule (summer / winter). It works with realistic TMY weather or quick clear-sky mode and outputs a clean Energy-vs-Tilt plot plus CSV/PNG downloads. Time was allocated to an extensive literature overview, learning many complex yet exciting math and physics concepts related to light and absorption.

Impact: A few percent more annual kWh from the same array improves payback and reduces grid emissions—small tilt gains scale across schools, municipal buildings, and rooftops.
Sidebar with site and weather inputs
Figure 2. Site & Weather inputs: latitude/longitude, TMY vs clear-sky, azimuth, albedo, module params.

How It Works

  • Weather: Pulls PVGIS TMY for realism or uses Ineichen clear-sky as an upper bound.
  • Sunlight on the panel: Transposes beam/diffuse light to the tilted plane (Perez with fallbacks).
  • Angle losses: Applies the ASHRAE incidence-angle modifier (IAM) on the beam component.
  • Temperature: Estimates cell temperature (SAPM; falls back to Faiman) and reduces power when hot.
  • Search: Scans a grid of tilts and picks the angle(s) that maximize annual energy.
Flowchart of the physics pipeline from weather to energy
Figure 3. Processing flow—weather → transposition → IAM → temperature → DC power → energy.

A little math...

$$E_{\text{POA}} = E_b\,\mathrm{IAM}(\theta) + E_{d,\text{sky}} + \rho_g\,\mathrm{GHI}\,F_{\text{ground}}$$ $$\mathrm{IAM}(\theta) = 1 - b_0\!\left(\frac{1}{\cos\theta}-1\right)$$ $$P_{\mathrm{DC}}(t) = \eta_{\mathrm{STC}}\,A\,E_{\mathrm{POA}}(t)\,\bigl[1+\gamma_P\,(T_c(t)-25^\circ\mathrm{C})\bigr]$$ $$E(\theta) = \sum_{t} P_{\mathrm{DC}}(t;\theta)\,\Delta t$$

In plain terms: EPOA is the sunlight that actually hits the tilted panel (beam × IAM + sky + ground); IAM(θ) shows how oblique angles reduce beam; PDC(t) turns that sunlight into electrical power with temperature losses; and E(θ) sums power over time to find the tilt that makes the most energy.

Annual energy versus tilt curve
Figure 6. Energy-vs-Tilt curve: an easy way to see why the recommended angle wins.

Environmental Angle

More solar kWh means less fossil generation. If a site gains even 2-4% energy from better tilt, multiply that by thousands of modules and years of operation—those avoided kWh translate into measurable CO₂ reductions.

Next Steps

  • Bifacial & rear-side modeling (view factors + albedo seasonality).
  • Snow/soiling loss options and roof/racking tilt constraints.
  • Batch/API mode for portfolio studies and automatic reports.

Key Features

Fixed & Seasonal Tilts

Best annual tilt plus a two-position summer/winter schedule.

TMY or Clear-Sky

Realistic PVGIS TMY or fast no-cloud upper bound for exploration.

Physics Inside

Perez/Hay-Davies, ASHRAE IAM, SAPM/Faiman temperature, temp-co power.

Ready to Share

Energy curve CSV, plot PNG, and a simple capacity-factor readout.


Project Details

Duration

Oct-Dec 2024

Impact

Higher kWh from the same array ⇒ lower LCOE & fewer CO₂ emissions—especially meaningful at scale (schools, municipal rooftops, fleets).

Technologies Used

Python Streamlit pvlib NumPy Pandas Matplotlib PVGIS TMY Ineichen (Clear-sky)

Outcomes

  • Best fixed & seasonal tilts in minutes
  • Energy-vs-tilt curve & downloads
  • Percent-level kWh gains, lower emissions
  • Version-robust physics pipeline