There is an elaborate mathematical system for calculating electricity yield from solar radiation. In this article, I will briefly describe the core algorithm behind most solar yield calculators.

Note: The SPAC (Solar Panel Angle Calculator) application incorporates several key improvements over this standard baseline algorithm.

Popular online solar yield estimation tools:

Pyranometer and Pyrheliometer

Calculating basic theoretical solar energy potential for ideal conditions is relatively straightforward. However, real-world yield depends heavily on local cloud cover, atmospheric humidity, and pollution. Historically—when PV investments carried high capital costs—onsite ground irradiance measurements were mandatory to establish precise feasibility data.

Solar irradiation is primarily measured using two distinct sensor types:

  1. Pyranometers: Measure total global solar radiation (both direct and diffuse) falling on a flat surface.
  2. Pyrheliometers: Measure exclusively the direct beam component of solar radiation by tracking the sun continuously.

Pyranometers are the most common sensors in solar engineering. Two primary operational designs dominate the market: Li-Cor silicon photodiode sensors and Thermopile black-and-white sensors.

Pyranometer sensor

Pyranometer (Global Solar Irradiance)

Pyrheliometer sensor

Pyrheliometer (Direct Normal Irradiance)

The Working Principle

Black-and-white thermopile pyranometers detect radiation through temperature differentials between alternating black (absorbing) and white (reflecting) segments. While thermopiles capture the entire solar spectrum evenly, silicon photodiode pyranometers (like the popular Li-Cor series) have wavelength-dependent spectral responses—typically measuring up to $1100\text{ nm}$. Because crystalline silicon PV modules share a similar spectral response cutoff, silicon pyranometers became an industry standard for PV site assessments.

To estimate the energy collected on a tilted panel over a specific timeframe (e.g., monthly), solar calculators first decompose total measured horizontal irradiance ($I_h$) into its direct horizontal component ($I_{bh}$) and diffuse component ($I_{dh}$):

$$I_h = I_{bh} + I_{dh}$$

Clear Sky Index ($K_{th}$)

Decomposing horizontal radiation requires calculating the clearness index ($K_{th}$). It represents the ratio of measured horizontal insolation on Earth's surface ($I_h$) to theoretical extraterrestrial horizontal insolation ($I_o$) at the same latitude and time:

$$K_{th} = \frac{I_h}{I_o}$$

A higher $K_{th}$ value indicates clear, cloudless skies and low atmospheric turbidity, whereas lower values represent overcast or polluted atmospheric conditions.

Mean Horizontal Extraterrestrial Insolation

Integrating extraterrestrial solar radiation from sunrise to sunset projected onto a flat surface yields daily extraterrestrial horizontal irradiation ($I_o$):

$$I_o = \frac{24}{\pi} \cdot SC \cdot \left[1 + 0.034 \cos\left(\frac{360 \cdot n}{365}\right)\right] \cdot \left[\cos(L)\cos(\delta)\sin(H_{sr}) + H_{sr}\sin(L)\sin(\delta)\right]$$
Where:
  • $SC$ – Solar Constant ($\approx 1367 \text{ W/m}^2$)
  • $n$ – Day number of the year ($1$ to $365$)
  • $L$ – Geographic Latitude
  • $H_{sr}$ – Sunrise hour angle (in radians)
  • $\delta$ – Solar declination angle for the given period

Once $K_{th}$ is derived, empirical correlations (such as the Liu-Jordan method) are applied to calculate the diffuse ($I_{dc}$) and ground-reflected ($I_{rc}$) radiation components reaching a tilted surface at slope angle $\Sigma$:

$$I_{dc} = f(I_{dh}, \Sigma) \quad \text{and} \quad I_{rc} = f(I_h, \Sigma, \rho_{ground})$$

Direct beam radiation hitting the tilted collector ($I_{bc}$) depends heavily on the solar incidence angle ($\theta$), which is governed by panel tilt, azimuth, solar elevation angle, and solar azimuth.

Direct horizontal radiation ($I_{bh}$) relates to direct normal irradiance ($I_b$) via solar altitude angle ($\alpha$):

$$I_{bh} = I_b \cdot \sin(\alpha)$$

Thus, direct beam radiation incident on the tilted module surface ($I_{bc}$) is expressed as:

$$I_{bc} = I_b \cdot \frac{\cos(\theta)}{\sin(\alpha)}$$

Slope Factor ($R_b$)

Combining the direct radiation equations yields the relationship between direct horizontal radiation and direct radiation on the tilted module surface:

$$I_{bc} = I_{bh} \cdot \left(\frac{\cos\theta}{\sin\beta}\right) = I_{bh} \cdot R_b$$

The geometric ratio $R_b$ is known as the slope factor. For short time steps (e.g., 10-minute intervals), $R_b$ is calculated directly from instantaneous sun position geometry.

For daily or monthly averages based on summary irradiance data ($I_h$), an integrated mean slope factor ($\overline{R}_b$) must be calculated:

$$\overline{R}_b = f(\text{Latitude}, \text{Panel Tilt }, \delta_{avg}, \text{Solar Hour Angle})$$
Algorithm calculation structure code snippet

Implementation example of the solar geometric calculations

PV Module Modeling & Thermal Losses

Next, electrical output is modeled based on specific module parameters (STC rating, NOCT, temperature coefficients) and local ambient conditions.

Because cell efficiency decreases as operating temperature rises above Standard Test Conditions ($25^\circ\text{C}$), average operating cell temperature ($T_{cell}$) is calculated using Nominal Operating Cell Temperature (NOCT):

$$T_{cell} = T_{amb} + \left(\frac{\text{NOCT} - 20^\circ\text{C}}{800}\right) \cdot G$$

Finally, DC array output is converted to net AC power output by applying systemic derating factors (inverter efficiency, mismatch, wiring resistance, and module soiling):

$$P_{AC} = P_{DC} \cdot \prod \eta_{losses} \quad (\text{System Efficiency Derate: } 0.85 \text{ to } 0.95)$$

Final Energy Calculation

Assuming an MPPT-enabled inverter, total expected energy output ($W$) over a given timeframe is derived as:

$$W = P_{AC} \cdot h_{peak}$$

This represents the standard calculation workflow used by most traditional solar web tools. However, to eliminate excessive monthly approximations and account for exact incident angle modifier dynamics, I developed the SPAC (Solar Panel Angle Calculator) algorithm to perform step-by-step vector calculations for superior accuracy.