1. Introduction
With the transition toward low-carbon power systems, wind power has become an increasingly important source of electricity supply. According to the Global Wind Report 2026, global cumulative installed wind power capacity reached 1299 GW in 2025 and is expected to continue increasing in the coming years [
1]. Despite its environmental benefits, wind generation remains inherently weather-dependent and nondispatchable. Its variability and uncertainty affect generation scheduling, economic dispatch, reserve scheduling, and balancing operations [
2,
3]. Therefore, reliable wind power forecasts (WPFs) are essential inputs to the secure and economic operation of wind-rich power systems [
4,
5].
Over the past decades, a large number of studies have been devoted to improving wind power forecasting models. Early approaches mainly relied on physical models and numerical weather prediction (NWP). In these methods, meteorological variables are converted into wind power estimates using hub-height wind estimation, turbine power curves, and site-specific corrections. Although physical methods are interpretable, their performance can be affected by NWP errors, terrain complexity, and model mismatch. To reduce reliance on detailed physical modeling, statistical methods [
6] were introduced to capture temporal dependence directly from historical wind power data. With the increasing availability of supervisory control and data acquisition (SCADA) data, machine learning methods further improved forecasting performance by learning nonlinear relationships between meteorological inputs and power outputs [
7]. More recently, deep learning models, such as recurrent neural networks (RNNs) [
8,
9], convolutional neural networks (CNNs) [
10,
11], and attention-based models [
12,
13,
14], have been widely used to model temporal and multi-scale wind patterns. These methods have substantially improved forecast accuracy and provided system operators with more reliable inputs for generation scheduling and economic dispatch.
Despite these advances, wind power forecasting remains challenging because wind power exhibits rapid local fluctuations as well as long-range dependencies driven by meteorological evolution. Extending the input context can provide richer temporal information but also increases the computational burden, particularly for self-attention-based models whose complexity grows quadratically with sequence length. Selective state-space models, exemplified by Mamba, provide an efficient alternative by introducing input-dependent state transitions and processing a length-
T sequence in
time [
15,
16]. Existing Mamba-based WPF studies have focused primarily on improving statistical forecast accuracy, whereas their integration with downstream economic dispatch for decision-focused or value-oriented training remains insufficiently explored.
In power system operation, a WPF is not merely a standalone statistical output. It serves as an input to generation scheduling before wind power is realized. In a two-stage forecast-based economic dispatch process, the WPF affects the first-stage generation schedule, whereas the deviation revealed upon wind power realization gives rise to the subsequent balancing requirement [
17]. Therefore, two forecasts with the same mean absolute error (MAE) or mean squared error (MSE) can induce different realized recourse costs. For example, suppose that the realized wind power is
p.u. Forecasts of
and
p.u. have the same absolute error and are therefore equivalent under MAE. However, from an operational perspective, they may lead to different consequences. A forecast of
p.u., which overestimates the realized wind power, may result in insufficient scheduled thermal generation, thereby increasing the need for upward balancing and, in extreme cases, load shedding. In contrast, a forecast of
p.u., which underestimates the realized wind power, increases scheduled thermal generation and may therefore reduce shortage risk at the expense of greater wind curtailment when the realized wind power is high. When overforecasting and underforecasting have asymmetric operational consequences, symmetric statistical losses cannot distinguish between equal-magnitude errors of opposite signs [
18]. Therefore, a forecast should be evaluated not only by its statistical accuracy but also by the realized second-stage recourse cost induced by its forecast-based generation schedule. However, most existing wind power forecasting approaches, including advanced deep learning models, are still trained using conventional statistical losses and evaluated primarily using forecast-accuracy metrics [
19]. They do not explicitly account for the impact of forecast errors on first-stage dispatch decisions and second-stage recourse costs [
20,
21]. Therefore, it is necessary to study whether higher forecast accuracy necessarily leads to lower realized recourse cost.
The literature bearing on this accuracy–value mismatch falls into four streams, which the following two paragraphs address in turn. These are cost-oriented and probabilistic renewable forecasting, decision-focused learning and differentiable optimization, forecasting–optimization integration for trading and commitment, and forecasting under imbalance settlement in power-system operation.
The first stream designs forecast products according to downstream operational consequences. For example, Ref. [
20] proposed cost-oriented prediction intervals and showed that statistically calibrated intervals do not necessarily minimize downstream operating cost. Moreover, Ref. [
21] considered contextual selection of value-oriented prediction intervals, allowing the preferred interval to change with the operating condition. Both build on the asymmetric quantile-regression loss introduced by [
22], whose minimizer is the conditional quantile of the target. These approaches exploit the asymmetry between power shortfalls and surpluses by selecting decision-relevant forecast products without explicitly differentiating through the downstream optimization problem. The second stream uses end-to-end decision-focused learning together with differentiable optimization. Ref. [
23] proposed the Smart "Predict, then Optimize" framework, in which predictions are evaluated according to the decision loss they induce rather than solely by their deviation from the realized outcome. Earlier, Ref. [
24] trained a probabilistic model directly against the cost of the stochastic-optimization task it feeds, establishing that a task-based objective can outperform a likelihood-based one on the decision that matters. However, applying this principle to a constrained economic dispatch problem requires differentiation of the downstream operating objective with respect to the forecast. Ref. [
25] addressed this requirement by introducing differentiable convex optimization layers, which enable differentiation through the solution map of a parameterized convex program. This development makes it possible to train a forecasting model end-to-end by differentiating through the downstream economic dispatch problem rather than relying on a manually constructed statistical surrogate.
The third stream integrates forecasting with trading and commitment decisions. In renewable-energy trading, economic value has been used to identify decision-relevant forecasting features, while prescriptive models have been developed to integrate forecasting and trading decisions [
26,
27]. For network-constrained unit commitment, a closed-loop predict-and-optimize framework was developed in which forecasts jointly affect commitment and dispatch decisions [
28]. In addition, Ref. [
29] considered decision-focused electricity-price forecasting for commitment decisions. The fourth stream links renewable-energy forecasts directly to the operational cost they incur once the imbalance is settled. Ref. [
19] formulated cost-oriented WPF as a decision-focused learning problem. An iterative value-oriented renewable-energy forecasting framework was proposed in [
17], in which forecast updates are evaluated through their operational consequences. In addition, Ref. [
18] coupled WPFs with system operating costs through an economic dispatch model and Karush–Kuhn–Tucker (KKT)-based sensitivity analysis, and Ref. [
30] extended decision-focused learning to settings in which the decision itself alters the uncertainty it faces. Collectively, these studies establish that operational benefits can arise either from forecast products that reflect asymmetric costs or from decision-derived learning signals propagated through a downstream optimization model.
Despite these advances, the relationship between forecast accuracy and recourse-based dispatch value remains insufficiently understood. First, the recourse consequence of a WPF depends on how it changes the first-stage generation schedule and the resulting second-stage recourse actions. It therefore cannot be adequately assessed using forecast-accuracy metrics alone or by evaluating the first-stage dispatch under the assumption that the forecast equals the realization. Second, different training objectives may produce systematically different point forecasts. Symmetric forecasting losses prioritize statistical accuracy, fixed-quantile pinball losses encourage an asymmetric forecast shift, and decision-focused learning incorporates the downstream recourse consequence into training. The relative recourse-cost benefits of these formulations have not been sufficiently compared. Third, it remains unclear whether decision-focused learning provides benefits beyond the conservative forecast shift induced by asymmetric recourse penalties and how any additional benefit depends on forecast uncertainty and the sensitivity of the dispatch solution to forecast perturbations. These questions remain insufficiently addressed and motivate the present study.
Motivated by these research gaps, this paper proposes a dispatch-value-oriented forecasting (DVOF) framework for wind-integrated economic dispatch. The framework couples a Mamba-style wind forecaster with a solver-based differentiable economic dispatch layer. The forecaster is trained using a blended objective that combines an accuracy-oriented forecasting loss with the normalized second-stage recourse cost induced by the forecast-based generation schedule. The main contributions of this paper are summarized as follows:
- 1.
A Mamba-style forecaster is developed as the forecasting backbone of the proposed DVOF framework. The model combines a selective state-space architecture with a forecast-origin information set comprising historical wind power, horizon-aligned NWP forecasts, and calendar encodings. This architecture has linear sequence-length complexity and retains the meteorological information required for WPF.
- 2.
A DVOF architecture is proposed by coupling the Mamba-style forecaster with a solver-based differentiable economic dispatch layer. The dispatch layer solves a convex first-stage economic dispatch problem parameterized by the WPF and propagates the downstream recourse-cost gradient to the forecaster through KKT-based implicit differentiation. The training objective combines an accuracy-oriented forecasting loss with the normalized second-stage recourse cost arising from load shedding and wind curtailment. This formulation trains the forecaster to reduce realized recourse cost rather than minimizing pointwise forecast error alone.
- 3.
A verifiable test of the learning mechanism is introduced. Because the recourse model admits a closed-form optimal quantile, the quantile level a trained forecast attains can be measured directly and compared with it. This turns the question of whether the differentiable layer transmits the intended economic signal into a measurement rather than an assertion, and it applies equally to point and quantile forecasters.
- 4.
Case studies at the 1-h-ahead and 24-h-ahead forecast horizons evaluate the relationship between forecast accuracy and dispatch value on the Global Energy Forecasting Competition 2014 (GEFCom2014) dataset. Two quantile controls are used, a fixed reference quantile and one selected on validation data, so that the incremental contribution of the differentiable layer is judged against a properly tuned cost-aware forecaster. The results separate what the layer contributes, namely, automatic and condition-stable placement of the operating point, from what it does not, namely, a lower realized cost in a single-period problem.
The remainder of this paper is organized as follows.
Section 2 formulates the problem.
Section 3 presents the proposed method.
Section 4 reports and discusses the experimental results.
Section 5 concludes the paper.
3. Proposed Dispatch-Value-Oriented Forecasting Architecture
Figure 1 illustrates the proposed DVOF framework. At each forecast origin, the forecaster
maps the causal information set
to a deterministic WPF
. The differentiable dispatch layer then solves the first-stage economic dispatch problem in Equations (
3)–(5) using
, thereby determining the scheduled thermal generation
. Once the actual wind power
is observed, the residual imbalance is settled through load shedding or wind curtailment, yielding the realized recourse cost
. Thus,
is used to evaluate the forecast-induced schedule but is unavailable to the first-stage dispatch decision.
During training, the recourse-cost gradient is propagated from the settlement stage through the dispatch layer to the forecaster. The required sensitivity of the dispatch solution to the WPF is obtained primarily through KKT-based implicit differentiation, with a finite-difference fallback at numerically degenerate active-set configurations.
3.1. Mamba Forecaster
The wind-power forecaster maps a causal input , which is the matrix form of the context , to a wind forecast . The input has features, and T denotes the number of tokens available at the forecast time. NWP variables are aligned with the target horizon. Each token contains historical wind power, six NWP variables (10 m and 100 m wind components and the derived wind speeds), and four calendar encodings (sin/cos of hour-of-day and day-of-year).
The mapping is implemented as a Mamba-style state-space sequence model (SSM) [
15]. To make the architecture explicit, each module is denoted by a separate mapping function. The complete computation is
where
maps each
-dimensional observation to a
-dimensional token by a time-shared linear map applied to every row of
X,
denotes the learnable positional embedding,
denotes the
ℓth Mamba-style selective-SSM block, and
denotes layer normalization. The vector
is the representation of the last causal token. The forecasting head
comprises a linear layer, a GELU activation, and dropout, while
maps the resulting representation to the scalar wind-power forecast.
Selective-SSM Block
Let denote the sequence entering one block. The block is written as a composition of six functions, namely, normalization, linear projection, local convolution, selective scan, gate modulation, and residual output.
A residual copy
is retained, and the input is normalized to
, which stabilizes the relative scale of the wind-power, NWP and calendar features before they enter the recurrent state update. The normalized sequence is then expanded and split into a candidate dynamics branch
U and a gate branch
Z,
where
and
are the weight and bias of the in-block projection,
is a vector of ones, and
is the expanded inner width. The candidate branch carries the temporal content to be propagated, whereas the gate branch controls how much of the resulting dynamic feature reaches the next layer.
The candidate branch is first processed by a causal depthwise convolution,
where
applies a per-channel one-dimensional convolution of kernel width
k with
steps of left padding, so that each output position depends only on the current and preceding tokens, and
is the sigmoid linear unit activation function.
The selective part of the block generates the SSM coefficients from the current token rather than using fixed coefficients for all hours, which is
where
,
are the input-dependent state input and output projections,
N is the latent state dimension,
is the step bias, and
is a small positive floor that keeps the step strictly positive. The symbols
and
replace the
and
of the standard selective-SSM notation, so that they are not confused with the generator cost coefficients
and
in Equation (
2) or the context set
in Equation (
1). With
and learned skip coefficient
, the selective-SSM scan
is computed channel-wise as
initialized by
, where
is the latent state of channel
j. The input-dependent step
sets the memory length of that channel, so a block can hold a persistent wind state or discard it in favour of the current observation according to the token it is reading.
Finally, the scan output is modulated by the gate branch and projected back to the model width
where
is the gating signal,
Y is the output of the selective scan, ⊗ is the element-wise product,
is the output projection of the block, and
R restores the residual retained at its input.
The complete architecture is summarized in
Figure 2. Equations (
18)–(22) define the overall forward path.
3.2. Differentiable Economic Dispatch Layer
To train
through dispatch, Equations (
3)–(5) are exposed as a layer
. The forward pass solves the optimization problem, and the backward pass returns the sensitivity of the optimal solution to the wind forecast.
3.2.1. Forward Process
Collect the first-stage decision variables as
For numerical differentiation, the implementation augments the first-stage objective with a small quadratic regularization term
. The resulting regularized QP is
where
The box constraints collect the generator limits, , and . Because and , the matrix P is positive-definite, and the regularized QP is strictly convex. The coefficient is used to stabilize differentiation while introducing only a small perturbation to the first-stage objective.
The forward QP is solved through CVXPY using the first available solver in the order ECOS, CLARABEL, OSQP, and SCS. In the computing environment used for the reported experiments, ECOS was unavailable, and CLARABEL was therefore used for all forward dispatch solves. The solver is used only to obtain the optimal first-stage solution, whereas gradients with respect to the WPF are computed separately through the KKT-based implicit-differentiation procedure described below. The scheduled thermal generation of Equation (
6) is read from the first
G coordinates of the stacked solution:
3.2.2. Backward Process by Implicit Differentiation
Let
denote the locally active set of box constraints at
. Writing the box constraints in the canonical form
, where
E collects the box-constraint rows and is distinct from the generator count
G, the active constraints satisfy
Let
and
denote the multipliers associated with the balance equation and active box constraints, respectively. The active-set KKT conditions are
Under a locally unchanged active set and a nonsingular KKT system, differentiation with respect to
gives
Here, .
The vector is zero except when the forecast-dependent upper bound is active, in which case its corresponding entry equals one.
Because the training loss is scalar, the full solution Jacobian need not be formed. Let
denote the upstream gradient with respect to the dispatch solution. The system is assembled over the variables that are strictly inside their box constraints at
, because a variable held at a forecast-independent bound has zero local sensitivity. A diagonal term of
is added to
K so that the factorization remains well posed. The adjoint vector
is obtained from
Then, the gradient with respect to the WPF is
The second term of Equation (
36) is written for the general case. Because the balance equation gives
, the bound
is attained only when the demand equals the minimum total thermal output. Whenever the demand is larger, the gradient reduces to
, which is the case at every dispatch instance solved here.
3.2.3. Degeneracy Handling
The implicit-differentiation procedure may become unreliable when the active set changes or when the KKT matrix is singular or ill-conditioned. The layer therefore invokes the finite-difference fallback when the active-set construction is inconsistent, the condition number of K exceeds , the factorization of K fails, or the resulting gradient is nonfinite or has a magnitude greater than .
If any safeguard is triggered, the layer uses the central finite-difference approximation
using two additional forward solves. The estimated solution Jacobian is then contracted with the upstream gradient
.
Estimating the solution Jacobian rather than differentiating a particular downstream objective keeps the fallback applicable to the realized recourse cost in Equation (
9). At active-set transitions, the finite-difference fallback provides a numerical directional approximation for stochastic optimization. The frequency of the fallback was measured over the training split for three of the matched seeds at both horizons. The exact KKT branch was used in
of the
backward calls per seed at
H = 24 and in at least
of the
calls per seed at
H = 1. The dispatch quadratic program is therefore well conditioned over the operating range visited in this study, and the reported gradients come from exact implicit differentiation.
3.3. Dispatch-Value-Oriented Training Objective
The network produces a raw normalized output
, where the subscript
s marks a quantity expressed on the wind-power base
, which equals the wind rated power and is
p.u. in the case study. Because the normalized wind power cannot exceed unity, the dispatch input is additionally capped at one. The non-negative prediction used in the accuracy term and the bounded dispatch input are defined, respectively, as
The DVOF loss is
where
is defined in Equation (
9). Division by
controls the numerical scale of the recourse term, whereas
determines its relative contribution to training.
Applying the chain rule through the differentiable dispatch layer gives
Away from the nondifferentiable point
, the settlement sensitivity is
In the interior regime, scheduled thermal generation changes approximately one-for-one in the opposite direction to the WPF:
Consequently, shortage hours generate a stronger conservative learning signal than curtailment hours when
. For the recourse-only component, the equilibrium of these asymmetric signals corresponds to the conditional quantile
in Equation (
14). Under the blended DVOF objective, the MSE term moderates this conservative shift.
3.4. Training Procedure
Algorithm 1 states the two-stage procedure: MSE pretraining, then DVOF fine-tuning from the checkpoint with the lowest validation MAE, with the recourse-cost gradient propagated through the dispatch layer. Two properties of the protocol are worth making explicit. The realized wind power never enters the forecaster input or the first-stage dispatch decision. It is the supervised target during training and validation and the reference realization at test time. Checkpoint selection also changes with the objective, from validation MAE in stage 1 to validation recourse cost in stage 2, so each arm is selected by the criterion it is meant to optimize.
Because each recourse evaluation requires a dispatch solve, the recourse term is applied to a uniformly spaced subset of mini-batches while the MSE term is applied to every one. This sparse evaluation approximates the blended objective of Equation (
39), so
is an empirically selected coefficient conditional on the adopted update frequency rather than a transferable constant.
| Algorithm 1 Training of the proposed DVOF model |
Require: Training set , validation set , forecaster , differentiable dispatch layer , wind-power scale , and trade-off coefficient . Ensure: Best MSE model and best DVOF model .
- 1:
Stage 1: MSE pretraining - 2:
Initialize - 3:
for each pretraining epoch do - 4:
for each mini-batch do - 5:
Compute , , , and - 6:
Compute - 7:
Compute - 8:
Update using - 9:
end for - 10:
Evaluate validation MAE and save the checkpoint if it improves - 11:
end for - 12:
Restore the checkpoint with the lowest validation MAE - 13:
Set - 14:
Stage 2: DVOF fine-tuning - 15:
Initialize - 16:
Select a uniformly spaced subset of mini-batches for recourse-loss evaluation - 17:
for each fine-tuning epoch do - 18:
for each mini-batch do - 19:
Compute , , , and - 20:
Compute - 21:
Compute - 22:
if then - 23:
Obtain and compute - 24:
Set - 25:
else - 26:
Set - 27:
end if - 28:
Update using - 29:
end for - 30:
Evaluate validation recourse cost and save the checkpoint if it improves - 31:
end for - 32:
Restore the checkpoint with the lowest validation recourse cost - 33:
Set - 34:
return and
|