How Gridalytics Works
Understanding electricity demand forecasting, units, and how to read the predictions
Understanding the Units
All demand values in Gridalytics are shown in MW (Megawatts) — this is the standard unit used by the Delhi SLDC (State Load Despatch Centre) and the Indian power grid.
Instantaneous power — how much electricity Delhi is consuming right now
Delhi Load: 4,200 MW at 3:00 PM
Energy consumed over time. 1 MWh = using 1 MW for 1 hour
Daily energy = Avg MW x 24 hours
Large-scale energy measure. 1 MU = 1,000 MWh = 1 million kWh
Delhi daily: ~90-96 MU/day
Key Insight: MW is like the speedometer of the power grid
Think of MW as the speed of a car (how fast energy is flowing right now) and MWh as the distance traveled (total energy consumed over time). When we say "demand is 4,000 MW", it means Delhi's grid is delivering 4,000 megawatts of power at that instant. Over a full day at that rate, it would consume 4,000 x 24 = 96,000 MWh = 96 MU of energy.
How 5-Min, Hourly, and Daily Predictions Relate
All three prediction types show demand in MW, but at different time scales:
| Resolution | What Each Value Means | Points/Day | Example |
|---|---|---|---|
5-Minute | Average MW during that 5-min window | 286 | 5:00 AM → 2,850 MW |
Hourly | Average MW during that hour (avg of 12 five-min readings) | 24 | 5:00 AM hour → 2,870 MW |
Daily | Average MW across all 24 hours (avg of all 286 five-min readings) | 1 | March 29 → 3,800 MW (avg) |
Why daily and hourly values look similar:
If hourly predictions range from 2,500 MW (night) to 5,200 MW (afternoon peak), the daily prediction will be their average: ~3,800 MW. This is correct — they're both measuring the same thing (instantaneous power in MW), just averaged over different time periods. The daily value is NOT the sum of hourly values.
To calculate total daily energy consumption:
Daily Energy = Average Demand (MW) x 24 hours = MWh
Example: 3,800 MW x 24h = 91,200 MWh = 91.2 MU
Data Source: Delhi SLDC
All demand data comes from the Delhi State Load Despatch Centre (SLDC), operated by Delhi Transco Limited (DTL). The SLDC monitors and controls the Delhi power grid in real-time.
| Data | Source | Interval | Coverage |
|---|---|---|---|
| SCADA Demand | delhisldc.org/Loaddata.aspx | 5 min | 2021 - present (201K+ rows) |
| Weather | Open-Meteo API (free) | 1 hour | 2021 - present (45K+ rows) |
| Air Quality (AQI) | Open-Meteo Air Quality API | Daily | 2025 - present (356 rows) |
| Holidays | Python holidays lib + curated | Daily | 2015 - 2026 (472 entries) |
| Weather Forecast | Open-Meteo Forecast API | 1 hour | Up to 16 days ahead |
Delhi's power is distributed by 5 DISCOMs (distribution companies):
BRPL
South & West
BYPL
Central & East
TPDDL
North & NW
NDMC
Lutyens' Delhi
MES
Cantonment
How the AI Models Work
Gridalytics uses multiple machine learning models trained on 93 engineered features derived from demand history, weather, holidays, time patterns, and seasonal cycles.
| Model | Type | Best For | MAPE |
|---|---|---|---|
| LightGBM champion | Gradient Boosting | 5-Minute | 0.18% |
| LightGBM (Optuna) | Gradient Boosting | Hourly | 0.50% |
| XGBoost champion | Gradient Boosting | Hourly | 0.52% |
| LightGBM champion | Gradient Boosting | Daily | 2.65% |
| SARIMAX | Statistical (ARIMA) | Daily | 4.18% |
| BiLSTM | Deep Learning (PyTorch) | Hourly | 6.66% |
| NeuralProphet | Neural + Decomposition | Daily | 7.68% |
MAPE (Mean Absolute Percentage Error) is the primary accuracy metric. A MAPE of 0.52% means the model's predictions are, on average, within 0.52% of the actual demand. For a 4,000 MW demand, that's an error of just ~21 MW.
Feature categories (93 total):
Lag Features (5)
Past demand values
Rolling Stats (21)
Trends & volatility
Weather (15)
Temp, humidity, solar
Time Encoding (18)
Hour, day, season cycles
Fourier Terms (18)
Periodic patterns
Calendar (11)
Holidays, festivals, AQI
Time Flags (3)
Peak, night, morning
Diff Features (2)
Rate of change
How to Read the Forecasts
The Blue Line (Actual Demand)
Shows real historical demand data from the Delhi SLDC. Only available for past dates.
The Orange Dashed Line (Forecast)
Shows the model's predicted demand. For past dates, you can compare this with the blue line to see accuracy. For future dates, only the orange line appears.
The Shaded Band (Confidence Interval)
Shows the 90% prediction interval — the model is 90% confident the actual demand will fall within this band. Wider bands = more uncertainty.
Peak Demand
The highest predicted MW value in the forecast period. This is the most critical number for grid operators — the grid must have enough capacity to meet peak demand or risk blackouts. Delhi's all-time peak was 8,656 MW (June 19, 2024, 3:06 PM).
Total Energy (MWh / MU)
The sum of predicted demand multiplied by the time interval. For hourly forecasts: Total Energy = Sum of all hourly MW values (since each represents 1 hour). Divide by 1,000 to get MU (Million Units).
Prediction Accuracy Tracking
Every day, Gridalytics automatically:
- Predicts tomorrow's demand and records the prediction
- The next day, fetches the actual demand from SLDC
- Computes the error (MAPE) and logs it
- Monitors if accuracy is degrading (drift detection)
Over the last 29 days of live tracking, the system achieved an average MAPE of 0.97% — meaning predictions were within 1% of actual demand on average.
Visit the Accuracy page to see the full predicted vs actual history, rolling MAPE trend, and drift detection status.
Delhi Electricity Demand Patterns
Delhi has some of the most extreme seasonal demand variation in the world:
| Season | Months | Typical Demand | Key Driver |
|---|---|---|---|
| Winter | Nov - Feb | 2,500 - 4,000 MW | Low demand, minimal heating |
| Spring | Mar - Apr | 3,500 - 5,500 MW | Rapidly rising, AC usage begins |
| Summer | May - Jun | 5,000 - 8,500+ MW | Peak demand! AC dominates (45-48C) |
| Monsoon | Jul - Sep | 4,500 - 7,000 MW | High humidity drives AC even at lower temps |
| Autumn | Oct | 3,000 - 4,500 MW | Transitional, AQI worsens (stubble burning) |
The summer peak (8,500+ MW) is more than 3x the winter minimum (2,500 MW). This extreme variation is driven almost entirely by air conditioning. Delhi generates almost no power locally — all electricity is purchased from generators across Northern India.
Sub-Regional (DISCOM) Forecasting
Delhi's electricity is distributed by 5 DISCOMs (distribution companies). Gridalytics forecasts demand for each sub-region by applying historical demand ratios to the total Delhi forecast.
| DISCOM | Full Name | Area | Approx Share |
|---|---|---|---|
| BRPL | BSES Rajdhani Power Ltd | South & West Delhi | ~35% |
| NDPL/TPDDL | Tata Power Delhi Distribution Ltd | North & Northwest | ~25% |
| BYPL | BSES Yamuna Power Ltd | Central & East Delhi | ~20% |
| NDMC | New Delhi Municipal Council | Lutyens' Delhi (New Delhi) | ~10% |
| MES | Military Engineering Services | Delhi Cantonment | ~5% |
The ratios are computed dynamically from the last 30 days of actual SCADA data. You can see the DISCOM breakdown on the Dashboard (horizontal bar chart) and request per-region forecasts via the API.
What-If Scenario Testing
The What-If page lets you override weather and event conditions to explore their impact on demand. This is useful for:
- Grid capacity planning — "What if we get a 48°C heatwave next week?"
- Emergency preparedness — "How much extra power do we need for Diwali?"
- Pollution impact — "If AQI hits 500 (hazardous), how does demand change?"
- Sensitivity analysis — "How much does each °C increase add to demand?"
Available parameters (7 total):
Temperature
5-50°C
Humidity
10-100%
AQI
0-500
Cloud Cover
0-100%
Holiday
On/Off
Festival
6 types
Resolution
5min/hr/day
How to interpret results: The blue line shows the baseline forecast (using actual/predicted conditions). The orange line shows your scenario. A positive percentage change means the scenario increases demand — the grid needs more power. A negative change means lower demand. Both average and peak impacts are shown separately because peak capacity is the critical safety constraint.
Choosing a Model
On the Forecast page, you can select which model to use via the Model dropdown:
- Auto (Best) — Uses the champion model for the selected resolution. Recommended for most use cases.
- LightGBM — Gradient boosting. Fastest, best for 5-minute. Optuna-tuned version available for hourly.
- XGBoost — Gradient boosting. Champion for hourly resolution.
- Ensemble — Weighted average of all loaded models. Can be more stable but not always most accurate.
- LSTM / BiLSTM — Deep learning. Captures sequence patterns but less accurate than tree models on this data.
For most users, Auto is the best choice. It automatically selects the champion model for each resolution (LightGBM for 5-min and daily, XGBoost for hourly).