Skip to content

Power Prediction

Use machine learning models to predict solar power output based on system parameters and environmental conditions.

Endpoint

POST /solar/predict

Request

{
  "latitude": 35.0,
  "longitude": -110.0,
  "capacity_kw": 1000,
  "tilt": 30.0,
  "azimuth": 180.0,
  "dc_ac_ratio": 1.2,
  "gcr": 0.4
}

Parameters

Field Type Required Default Description
latitude float Yes - Site latitude
longitude float Yes - Site longitude
capacity_kw float Yes - DC capacity (kW)
tilt float No 30.0 Panel tilt (degrees)
azimuth float No 180.0 Panel azimuth (degrees)
dc_ac_ratio float No 1.2 DC/AC ratio
gcr float No 0.4 Ground coverage ratio

Response

{
  "annual_energy_kwh": 1850500,
  "monthly_energy_kwh": [
    125000, 138000, 165000, 178000, 195000, 198000,
    192000, 180000, 160000, 142000, 118000, 109500
  ],
  "capacity_factor": 0.211,
  "specific_yield": 1850.5,
  "performance_ratio": 0.82,
  "model_version": "xgboost-v1.2",
  "prediction_confidence": 0.92
}

Response Fields

Field Description
annual_energy_kwh Predicted annual AC energy
monthly_energy_kwh 12-element array of monthly predictions
capacity_factor Predicted capacity factor
specific_yield Energy per kWp installed
performance_ratio System efficiency ratio
model_version ML model version used
prediction_confidence Model confidence score

Code Examples

import requests

response = requests.post(
    "https://api.tessellaterenewables.com/solar/predict",
    json={
        "latitude": 35.0,
        "longitude": -110.0,
        "capacity_kw": 1000,
        "tilt": 32.0,
        "azimuth": 180.0,
        "dc_ac_ratio": 1.25,
        "gcr": 0.38
    }
)

result = response.json()

print(f"Annual Energy: {result['annual_energy_kwh']:,} kWh")
print(f"Capacity Factor: {result['capacity_factor']:.1%}")
print(f"Specific Yield: {result['specific_yield']:,.0f} kWh/kWp")
print(f"Confidence: {result['prediction_confidence']:.0%}")
const response = await fetch(
  'https://api.tessellaterenewables.com/solar/predict',
  {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      latitude: 35.0,
      longitude: -110.0,
      capacity_kw: 1000,
      tilt: 32.0,
      azimuth: 180.0
    })
  }
);

const result = await response.json();
console.log(`Annual: ${result.annual_energy_kwh.toLocaleString()} kWh`);

Batch Predictions

For multiple configurations, make parallel requests:

import asyncio
import aiohttp

async def predict_config(session, config):
    async with session.post(
        "https://api.tessellaterenewables.com/solar/predict",
        json=config
    ) as response:
        return await response.json()

async def batch_predict(configs):
    async with aiohttp.ClientSession() as session:
        tasks = [predict_config(session, c) for c in configs]
        return await asyncio.gather(*tasks)

# Compare different tilts
configs = [
    {"latitude": 35, "longitude": -110, "capacity_kw": 1000, "tilt": t}
    for t in [20, 25, 30, 35, 40]
]

results = asyncio.run(batch_predict(configs))
for config, result in zip(configs, results):
    print(f"Tilt {config['tilt']}°: {result['annual_energy_kwh']:,} kWh")

Model Information

The prediction model is an XGBoost ensemble trained on:

  • 50,000+ real solar installations
  • NASA POWER irradiance data
  • PVWatts simulation data

Accuracy metrics: - Mean Absolute Error: ~3.5% - R² Score: 0.94