Worked example · fictitious teaching values · Published article, open code
BLEND persistence forecast: a worked example step by step
Worked example. All input values below are fictitious teaching values, not observations or results from the cited paper.
Result: with today’s 12:00 irradiance 600 W/m², yesterday’s 13:00 value 400 W/m² and a weight λ = 0.4 on the latest value, fitted on five past days, BLEND predicts 480 W/m² for 13:00.
The question
Should the next forecast follow the latest measurement or the recurring daily pattern? BLEND is a convex combination (a weighted average, weights between 0 and 1 adding up to 1) of both: persistence (the latest value) and cyclic persistence (the value at the same hour one cycle earlier), with one weight per hour of the day. CLIPER, in the table below, is the convex combination of persistence and the mean. The forecast: Î(t+h) = (1 − λ)·I(t+h−T) + λ·I(t), as in the article (I: irradiance in W/m²; t: forecast origin; h: horizon, here one hour; T: cycle length, here 24 hours; λ: weight of the latest value, between 0 and 1, no unit). Here the weight is a one-line least-squares fit on past days.
The theory
With \(r=I(t)\) the latest value, \(c=I(t+h-T)\) the value at the target hour one cycle earlier and \(y=I(t+h)\) the value to forecast:
$$\hat I(t+h)=(1-\lambda)\,c+\lambda\,r,$$ $$\lambda=\frac{\sum (y-c)(r-c)}{\sum (r-c)^2}\ \text{on past days, clipped to }[0,1].$$\(\lambda\) minimises \(\sum\big(y-c-\lambda(r-c)\big)^2\): a one-line least-squares fit, one weight per hour of the day. Full theory: BLEND guide.
Calculate it, without using the future
- Set the forecast origin t to 12:00 today, horizon h to one hour and cycle T to 24 hours. The target is 13:00 today.
- For each past day, note r = I(12:00), c = I(13:00 the day before) and y = I(13:00), the value that was to be forecast.
- Fit the weight of the latest value: λ = Σ (y − c)(r − c) / Σ (r − c)² = 29,000 / 72,500 = 0.4. Keep λ between 0 and 1.
- Today, r = 600 and c = 400: Î(13:00) = (1 − λ) c + λ r = 0.6 × 400 + 0.4 × 600 = 480 W/m².
| Day | r = I(12:00) | c = I(13:00, day before) | y = I(13:00) | r − c | y − c |
|---|---|---|---|---|---|
| Day −5 | 600 | 500 | 540 | 100 | 40 |
| Day −4 | 550 | 650 | 610 | -100 | -40 |
| Day −3 | 700 | 500 | 580 | 200 | 80 |
| Day −2 | 450 | 550 | 510 | -100 | -40 |
| Day −1 | 650 | 600 | 620 | 50 | 20 |
| Reference | Forecast W/m² |
|---|---|
| Ordinary persistence | 600 |
| Cyclic persistence (previous cycle, target phase) | 400 |
| BLEND, least-squares weight | 480 |
Run it
The table above, in five lines (Python 3, NumPy; executed on 22 October 2026). The MATLAB implementation is predict_P_BLEND_LS.m in the repository.
import numpy as np
r = np.array([600, 550, 700, 450, 650]) # I(12:00) on five past days, W/m2
c = np.array([500, 650, 500, 550, 600]) # I(13:00) the day before
y = np.array([540, 610, 580, 510, 620]) # I(13:00), the value to forecast
lam = np.clip(np.sum((y - c) * (r - c)) / np.sum((r - c) ** 2), 0, 1)
print(lam, (1 - lam) * 400 + lam * 600)Output:
0.4 480.0What the code shows
Out-of-sample benchmark of the MATLAB repository (v1.1.1, synthetic signal, 10 realizations, nRMSE, lower is better):
| Reference | CS | h = 1 | h = 2 | h = 3 | h = 6 | h = 9 |
|---|---|---|---|---|---|---|
| CLIPER on the ratio to trend x/CS (clear-sky reference) | yes | 0.213 | 0.287 | 0.328 | 0.354 | 0.354 |
| BLEND (one weight) on the ratio to trend x/CS (clear-sky reference) | yes | 0.219 | 0.303 | 0.359 | 0.413 | 0.398 |
| Smart persistence, multiplicative | yes | 0.230 | 0.336 | 0.421 | 0.561 | 0.593 |
| Stochastic persistence | yes | 0.260 | 0.388 | 0.470 | 0.474 | 0.468 |
| CLIPER on the difference to trend x − μ(phase) (one weight) | 0.223 | 0.299 | 0.337 | 0.354 | 0.354 | |
| CLIPER, weight per phase | 0.263 | 0.323 | 0.345 | 0.354 | 0.354 | |
| BLEND, weight per phase (least squares) | 0.302 | 0.398 | 0.445 | 0.488 | 0.495 | |
| BLEND, one weight, raw signal | 0.365 | 0.457 | 0.484 | 0.498 | 0.499 | |
| BLEND, simplified weight per phase (1 + ρ)/2 | 0.403 | 0.624 | 0.736 | 0.744 | 0.602 | |
| Cyclic persistence | 0.502 | 0.502 | 0.502 | 0.502 | 0.502 |

BLEND with a weight per phase improves on cyclic persistence at every horizon. Applying a reference to the ratio to trend x/CS (clear-sky reference) helps a lot on this signal: CLIPER on x/CS has the lowest mean errors, and stationary BLEND on x/CS is far better than BLEND on the raw signal. The simplified weight (1 + ρ)/2, also set for each phase, assumes the same mean at t and t + h; on a daily cycle it only helps at the first step.
What this study contributes
The published study develops a family of analytical forecasting operators for periodically correlated energy signals. The calculation illustrates its BLEND member; it does not reproduce the full benchmark of the article.
Limits that matter
A convex combination stays between its two inputs; this alone says nothing about forecast accuracy. The weight needs enough past cycles, changes with phase and horizon, and must not be fitted on the test period. Version 1.1.1 of the MATLAB code corrects errors of earlier versions and was audited independently.
Source definitions · MATLAB implementation (least-squares weight) · Full results table · Full method guide
Key point: weight the latest measurement (λ) and the same hour of the previous day (1 − λ), with one weight per hour fitted by least squares on past days. On the ratio to trend x/CS (the clear-sky index), persistence references become much stronger. A forecast and its observation must be aligned in time.
Authors, source and citation
Cyril Voyant, Candice Banes, Luis Garcia-Gutierrez, Gilles Notton, Milan Despotovic, Zaher Mundher Yaseen. Symmetry-constrained forecasting of periodically correlated energy processes. Applied Mathematical Modelling. doi:10.1016/j.apm.2026.116988 · BibTeX.
Cyril Voyant wrote this teaching page. The method belongs to the complete author team credited above.
Explore the research guide · Try the public-data comparison
Download the paper references (BibTeX, complete author lists)
See also: which forecast for which signal, with sliders · the course, slide by slide.
Need this method on your own data? Collaborate: a joint answer to a call for projects, a research contract with Mines Paris – PSL, or academic work with a clear valorization objective.
Links
| Article | C. Voyant et al., Applied Mathematical Modelling 157, 116988, 2026, doi:10.1016/j.apm.2026.116988 · BibTeX |
|---|---|
| Code | github.com/cyrilvoyant/cyclostationary-forecasting-matlab |
| Archive (all versions) | doi:10.5281/zenodo.18812333 (Zenodo) |
| Software Heritage | permanent archive of the repository |
| The story, for everyone | Better persistence, without training a neural network |
| The approach | Understand before you compute |
| Author | Cyril Voyant (Mines Paris – PSL, O.I.E.) · ORCID · www.cyrilvoyant.com |