In the rapid development of economy, the integration of renewable energy sources into power grids has presented numerous challenges. Wind power, characterized by its inherent randomness and volatility, introduces significant disturbances to grid stability when directly connected. To mitigate these issues, I have focused on two critical aspects: wind power forecasting and the optimal configuration of an energy storage system. This work aims to enhance the controllability and grid compatibility of wind turbines. I have developed a composite algorithm for power prediction and an optimized energy storage system strategy to suppress power fluctuations effectively.
My research begins with the processing of non-stationary wind power data. I fused multi-source data including historical power and meteorological variables. For missing values, I employed a quartile-based differencing method for identification and used a missing-forest interpolation technique for imputation, preserving the original data characteristics more effectively than conventional mean-filling or forward/backward filling methods. After cleaning, I applied dimensionality reduction, discretization, and normalization to meet the requirements of deep learning models.
The core of my prediction methodology is a hybrid model named SSA-RF-LSTM-Attention. Using Pearson correlation analysis, I established wind power forecasting indicators incorporating multiple influencing factors. Then, a Random Forest (RF) algorithm was used for feature selection to reduce model complexity. To improve prediction accuracy and robustness, I integrated the Sparrow Search Algorithm (SSA) to optimize the parameters of a Long Short-Term Memory (LSTM) network. Additionally, an Attention mechanism was introduced to address gradient vanishing/exploding issues and to capture relevant historical information dynamically. This composite model significantly improved prediction performance compared to FCNetwork, ElmanRNN, LSTM, LSTM-Attention, and RF-LSTM-Attention models, as evidenced by lower RMSE and higher R² values.
For suppressing wind power fluctuations, I designed a hybrid energy storage system (HESS) composed of batteries and supercapacitors to handle low-frequency and high-frequency components respectively. I compared empirical mode decomposition (EMD) and variational mode decomposition (VMD) methods, finding that VMD effectively reduces mode aliasing. By using VMD to decompose the energy storage reference power, I assigned the high-frequency components to supercapacitors and low-frequency components to batteries. Considering the charging/discharging characteristics and state-of-charge (SOC) constraints, I formulated an optimization model to minimize the total annual cost of the energy storage system. To solve this non-linear, multi-constraint problem, I improved the Whale Optimization Algorithm (IWOA) by integrating a cosine convergence factor and Levy flight strategy. The IWOA demonstrated superior convergence accuracy and efficiency. The simulation results confirmed that the proposed VMD-IWOA strategy significantly suppresses wind power fluctuations while reducing the required capacity and overall economic cost of the energy storage system, simultaneously enhancing supply reliability.
Introduction and Background
Fossil fuels have dominated the global energy structure for over a century. However, their use causes severe environmental pollution and greenhouse gas emissions. Wind power, as a clean and renewable energy source, has developed rapidly. By 2024, global wind capacity reached significant levels, and China has become the largest market for wind energy. Despite its benefits, wind power’s unpredictability and intermittency pose challenges to grid operation. Large-scale integration of wind farms reduces the controllability of power generation, making it difficult to maintain frequency and voltage stability. To address these issues, two complementary approaches are essential: accurate wind power prediction and the deployment of an energy storage system. The energy storage system can smooth power output, reduce scheduling difficulty, and enhance the overall efficiency of wind power utilization.
Wind power forecasting methods are generally classified into physical, statistical, and hybrid approaches. Physical models rely on numerical weather prediction (NWP) and terrain information, but they are computationally expensive. Statistical models, including time series analysis, support vector machines, artificial neural networks, and deep learning, extract patterns from historical data. Hybrid models combine physical and statistical methods to leverage their strengths. Deep learning models, particularly LSTM, have shown great promise in capturing long-term dependencies in wind power time series. However, their hyperparameters significantly affect performance. I therefore propose an optimized LSTM integrated with feature selection and attention mechanisms.
Energy storage technologies include mechanical, electrochemical, electromagnetic, and phase-change forms. Among these, lithium-ion batteries and supercapacitors are widely used. Batteries provide high energy density, while supercapacitors deliver high power density and long cycle life. A hybrid energy storage system (HESS) can exploit these complementary characteristics to handle both high-frequency and low-frequency power variations, thus prolonging battery life and reducing system cost. The optimal sizing of HESS is a challenging optimization problem involving multiple constraints such as SOC, power limits, and economic factors. Many studies have applied heuristic algorithms like particle swarm optimization (PSO) and genetic algorithms to solve this problem, but these often suffer from premature convergence. In my work, I improve the Whale Optimization Algorithm to achieve better optimization results.
Wind-Storage Combined System Analysis
The frequency characteristics of wind power output are crucial for designing an effective energy storage system. I analyzed the power spectral density using Fast Fourier Transform (FFT) applied to actual wind farm data. The results show that wind power contains high-frequency components with small amplitude and low-frequency components with large amplitude. To meet grid connection requirements, I set a limit of 30 MW for 10-minute maximum power variation and 9 MW for 1-minute maximum power variation in a 90 MW wind farm. Raw data exceeded these limits, necessitating the use of an energy storage system to smooth the output.
I compared distributed and centralized configurations for the storage system. The centralized topology, where the energy storage system is connected at the grid-connection point, is more cost-effective and easier to maintain. Therefore, I adopted the centralized structure. For the hybrid energy storage system, I selected a topology in which both the battery and supercapacitor are connected to a DC bus through bidirectional DC/DC converters. This allows independent control of each storage unit, improves system flexibility, and extends battery lifetime.
The dynamic model of the supercapacitor is based on a first-order RC equivalent circuit. The capacitance, internal resistance, and terminal voltage relationships are described by the following equations:
$$C = \frac{I_c(t)}{dV/dt} \quad (2-1)$$
$$R_{ch} = \frac{\Delta V_{ch}}{I} \quad (2-2)$$
For the battery, a Thevenin equivalent circuit model is used, capturing the open-circuit voltage, internal resistance, and transient behavior:
$$U_{LB} = U_{oc} – R_o I_{LB} – U_c \quad (2-3)$$
$$\frac{dU_c}{dt} = \frac{I_{LB}}{C_{Tp}} – \frac{U_c}{R_{Tp} C_{Tp}} \quad (2-4)$$
The state of charge (SOC) of the battery is given by:
$$SOC_{LB} = SOC_{LB0} – \frac{1}{Q_{LB}} \int_0^t I_{LB} dt \quad (2-5)$$
In the wind-storage combined system, the power balance at the point of common coupling is:
$$P_w(t) = P_o(t) + P_{hess}(t) \quad (2-6)$$
$$P_{hess}(t) = P_b(t) + P_{sc}(t) \quad (2-7)$$
Here, \(P_w(t)\) is the wind farm output, \(P_o(t)\) is the grid target power, \(P_{hess}(t)\) is the energy storage system reference power, \(P_b(t)\) is the battery power, and \(P_{sc}(t)\) is the supercapacitor power.
Data Preprocessing and Feature Selection
Accurate forecasting requires high-quality data. The raw wind power dataset includes multiple variables such as wind speed, wind direction, nacelle position, generator speed, humidity, temperature, and atmospheric pressure. I first performed anomaly detection using the interquartile range (IQR) method. Data points outside the range \([Q_1 – 1.5 \cdot IQR, Q_3 + 1.5 \cdot IQR]\) were considered anomalous and handled accordingly. For missing values, I used the missing forest interpolation method, which is a non-parametric imputation technique based on random forests. This method preserves the distribution of the original data and is more robust than simple mean or median imputation.
After cleaning, I normalized all features to the range [0,1] using min-max scaling:
$$x^* = \frac{x – x_{min}}{x_{max} – x_{min}} \quad (3-1)$$
To select the most relevant input features, I computed Pearson correlation coefficients between each candidate variable and wind power output. The correlation heat map showed that wind speed at hub height has the highest correlation (0.74-0.76). Wind direction, temperature, humidity, and pressure have lower correlations. I then applied a random forest (RF) algorithm to rank feature importance. The RF method calculates the importance of each feature based on the Gini impurity decrease. The top six features were selected as inputs for the prediction model.
Table 1 presents the feature importance scores obtained from the RF algorithm, highlighting the dominant role of wind speed features.
| Feature | Importance (%) |
|---|---|
| Wind speed at 30m | 38.5 |
| Wind speed at hub height | 27.3 |
| Wind direction | 12.1 |
| Temperature | 8.4 |
| Relative humidity | 6.2 |
| Atmospheric pressure | 7.5 |
By using RF, I reduced the model input dimensionality, which accelerates training and enhances generalization.
Deep Learning Prediction Model
LSTM Network
Long Short-Term Memory (LSTM) networks are a special kind of recurrent neural network (RNN) capable of learning long-term dependencies. They overcome the vanishing gradient problem through gate mechanisms. Each LSTM cell has a forget gate, input gate, and output gate. The equations governing the LSTM cell are:
$$f_t = \sigma(W_f \cdot [h_{t-1}, x_t] + b_f) \quad (3-2)$$
$$i_t = \sigma(W_i \cdot [h_{t-1}, x_t] + b_i) \quad (3-3)$$
$$\tilde{C}_t = \tanh(W_C \cdot [h_{t-1}, x_t] + b_C) \quad (3-4)$$
$$C_t = f_t \odot C_{t-1} + i_t \odot \tilde{C}_t \quad (3-5)$$
$$o_t = \sigma(W_o \cdot [h_{t-1}, x_t] + b_o) \quad (3-6)$$
$$h_t = o_t \odot \tanh(C_t) \quad (3-7)$$
where \(x_t\) is the input vector at time step \(t\), \(h_{t-1}\) is the previous hidden state, \(C_t\) is the cell state, \(\sigma\) is the sigmoid function, and \(\odot\) denotes element-wise multiplication.
Attention Mechanism
Although LSTM can capture temporal dependencies, it may forget important information from long sequences. I introduced an attention mechanism to weigh the importance of different time steps. The attention scores are computed as:
$$e_t = u \cdot \tanh(w_1 h_t + b) \quad (3-8)$$
$$\alpha_t = \frac{\exp(e_t)}{\sum_{j=1}^T \exp(e_j)} \quad (3-9)$$
$$\nu_t = \sum_{t=1}^T \alpha_t h_t \quad (3-10)$$
where \(\nu_t\) is the context vector used for final prediction. The output layer is:
$$y_t = \sigma(w_2 \nu_t + b_2) \quad (3-11)$$
The merged architecture, called LSTM-Attention, enhances the model’s ability to focus on the most relevant historical points for wind power prediction.
RF-LSTM Combination
To further improve performance, I combined feature selection with LSTM. The RF algorithm selects the most informative features, which are then fed into the LSTM-Attention model. This reduces overfitting and improves computational efficiency.
SSA Optimization
The sparrow search algorithm (SSA) is a swarm intelligence method inspired by sparrow foraging and anti-predation behavior. I used SSA to optimize the hyperparameters of the LSTM-Attention network, including the number of hidden units in the first and second layers, the learning rate, and the number of training epochs. The SSA updates the positions of sparrows using producer, scrounger, and warning models. The key update equations are:
For producers:
$$x_{i,j}^{t+1} = \begin{cases} x_{i,j}^t \cdot \exp\left(-\frac{i}{\alpha \cdot iter_{max}}\right) & \text{if } R_2 < ST \\ x_{i,j}^t + Q \cdot L & \text{if } R_2 \ge ST \end{cases} \quad (3-12)$$
For scroungers:
$$x_{i,j}^{t+1} = Q \cdot \exp\left(\frac{x_{worst}^t – x_{i,j}^t}{i^2}\right) \quad (3-13)$$
For early-warning sparrows:
$$x_{i,j}^{t+1} = x_{best}^t + \beta \cdot |x_{i,j}^t – x_{best}^t| \quad (3-14)$$
Through iterative optimization, SSA finds the optimal hyperparameter set that minimizes the mean squared error on the validation set.
Complete SSA-RF-LSTM-Attention Model
The overall prediction framework consists of the following steps:
- Data preprocessing: missing value interpolation, anomaly detection, normalization.
- Feature selection using RF to identify the most relevant inputs.
- Parameter optimization using SSA for the LSTM-Attention model.
- Training and testing the final model.
- Performance evaluation using RMSE and R².
The prediction model was implemented in Python 3.12 with the PyTorch deep learning library. I used data from three wind turbines with capacities of 36 MW (No. 2), 66 MW (No. 4), and 200 MW (No. 6). The sampling interval was 15 minutes. Each dataset was split into 80% training and 20% testing. The default learning rate was 0.01, weight decay 0.001, hidden layer size 64, sequence length 12, batch size 512, and 100 training epochs.
I evaluated the model on typical days of all four seasons. Table 2 shows the RMSE values for different models on the three turbines during spring.
| Turbine | FCNetwork | LSTM | ElmanRNN | SSA-RF-LSTM-Attention |
|---|---|---|---|---|
| 2 (36MW) | 3.01877 | 3.16825 | 2.98448 | 2.28398 |
| 4 (66MW) | 2.37575 | 2.85699 | 2.36607 | 2.08605 |
| 6 (200MW) | 20.11494 | 15.08242 | 14.03255 | 12.70116 |
Table 3 presents the R² values for the same spring period.
| Turbine | FCNetwork | LSTM | ElmanRNN | SSA-RF-LSTM-Attention |
|---|---|---|---|---|
| 2 (36MW) | 0.20763 | 0.23641 | -0.39611 | 0.32242 |
| 4 (66MW) | 0.9002 | 0.68004 | 0.88853 | 0.98722 |
| 6 (200MW) | 0.84799 | 0.71454 | 0.82602 | 0.9588 |
The results clearly show that the proposed composite model outperforms all other baseline methods. The RMSE is lower and R² is higher in every case, demonstrating superior prediction accuracy and generalization capability. The attention mechanism contributes to capturing the most influential time steps, while RF feature selection removes irrelevant inputs, and SSA fine-tunes the network hyperparameters.
Hybrid Energy Storage System Capacity Optimization
Reference Power Determination
To smooth wind power fluctuations, I first designed a low-pass filter to derive the grid target power \(P_o(t)\). The filter parameters were chosen such that the output power satisfies the grid code requirements (1-minute fluctuation < 10% of rated capacity, and 10-minute fluctuation < 33%). The energy storage system reference power is then:
$$P_{hess}(t) = P_w(t) – P_o(t) \quad (4-1)$$
I applied this to a 99 MW wind farm with 5-minute sampling intervals. The smoothing effect is illustrated in the following figure, which shows the original wind power and the filtered grid-compliant power.

The figure demonstrates that the energy storage system effectively absorbs the high-frequency fluctuations, leaving a smoother and more stable output that meets grid constraints.
Variational Mode Decomposition
To separate the high-frequency and low-frequency components in the storage reference power, I applied Variational Mode Decomposition (VMD). VMD is an adaptive signal decomposition method that non-recursively decomposes a signal into a set of band-limited intrinsic mode functions (IMFs). The decomposition solves the following constrained variational problem:
$$\min_{\{u_k\},\{w_k\}} \left\{ \sum_{k=1}^K \left\| \partial_t \left[ \left( \delta(t) + \frac{j}{\pi t} \right) u_k(t) \right] e^{-j w_k t} \right\|_2^2 \right\} \quad (4-2)$$
$$\text{s.t.} \quad \sum_{k=1}^K u_k(t) = P_{hess}(t) \quad (4-3)$$
where \(u_k(t)\) is the \(k\)-th IMF and \(w_k\) is its center frequency. The augmented Lagrangian is used to solve this problem iteratively. The number of modes \(K\) is crucial; too small leads to mode mixing, while too large causes over-decomposition. I experimented with different values and selected \(K=9\) for the typical day data.
To compare with EMD, I decomposed the same signal using both methods. The marginal spectra showed that EMD exhibits severe mode aliasing, whereas VMD produces well-separated modes with distinct center frequencies. This validates that VMD is superior for energy storage system power distribution.
Improved Whale Optimization Algorithm
The optimal allocation of the hybrid energy storage system requires solving a nonlinear, multi-constraint optimization problem. I used the Whale Optimization Algorithm (WOA) and proposed improvements to enhance its convergence accuracy and global search capability.
The standard WOA simulates humpback whale bubble-net hunting. The mathematical model includes encircling prey, spiral bubble-net attack, and random search. The position update equations are:
Encircling prey:
$$X(t+1) = X^*(t) – A \cdot D \quad (4-4)$$
$$D = |C X^*(t) – X(t)| \quad (4-5)$$
where \(A = 2a r – a\), \(C = 2r\), and \(a\) decreases linearly from 2 to 0 over iterations.
Bubble-net attack:
$$X(t+1) = D’ e^{bl} \cos(2\pi l) + X^*(t) \quad (4-6)$$
Search for prey:
$$X(t+1) = X_{rand}(t) – A D” \quad (4-7)$$
To improve WOA, I introduced a cosine convergence factor:
$$a(t) = \begin{cases} 1 + \cos\left(\frac{\pi (t-1)}{T-1}\right) & t \le \frac{T}{2} \\ 1 – \cos\left(\frac{\pi (t-1)}{T-1}\right) & t > \frac{T}{2} \end{cases} \quad (4-8)$$
with an adjustment exponent \(n=0.4\). This allows a large \(a\) in the early stages for strong global exploration and a small \(a\) in later stages for fine local exploitation.
I also incorporated an adaptive weight factor:
$$w(t) = \frac{a(t)}{2} \quad (4-9)$$
The position update becomes:
$$X(t+1) = w(t) X^*(t) – A D \quad (4-10)$$
for the encircling case, and similarly for the spiral update.
Furthermore, I applied the Levy flight strategy to prevent premature convergence. Levy flight generates random step sizes with a power-law distribution, allowing occasional long jumps that help escape local optima. The Levy distribution is approximated by:
$$Levy(s) \approx \frac{u}{|v|^{1/\beta}} \quad (4-11)$$
where \(u \sim N(0, \sigma_u^2)\), \(v \sim N(0, \sigma_v^2)\), and \(\beta\) is set to 1.5.
The position after Levy flight is:
$$X(t+1) = X(t) + \alpha \cdot (X^*(t) – X(t)) \cdot Levy(\beta) \cdot randn \quad (4-12)$$
where \(\alpha = 0.01\) determines the step size.
I tested the improved WOA (IWOA) on several benchmark functions and observed faster convergence and higher accuracy compared to standard WOA and PSO. Figure below shows the convergence curves for optimizing VMD parameters.
The IWOA algorithm flow is as follows:
- Initialize whale population size \(N\), maximum iterations \(T\), and positions.
- Evaluate fitness of each whale and identify the best position \(X^*\).
- Update parameters \(a(t)\), \(A\), \(C\), and \(p\).
- If \(p < 0.5\), update position using encircling or random search; otherwise, use spiral update with adaptive weight.
- Apply Levy flight to the best position to refine it.
- Repeat until stopping criterion is met.
Cost Model for Hybrid Energy Storage System
The objective is to minimize the total annual cost of the hybrid energy storage system, including initial investment, operation and maintenance (O&M), and replacement costs. The battery and supercapacitor have independent cost structures.
For the lithium battery:
$$C_B^* = C_{B1} + C_{B2} + C_{B3} \quad (4-13)$$
The initial cost converted to annual basis is:
$$C_{B1} = \frac{r_0(1+r_0)^{T_b}}{(1+r_0)^{T_b}-1} (a P_B + b E_B) \quad (4-14)$$
O&M cost:
$$C_{B2} = m_B P_B + n_B E_B \quad (4-15)$$
Replacement cost:
$$C_{B3} = k_{pg} \frac{r_0}{(1+r_0)^{T_b}-1} P_B E_B \quad (4-16)$$
Similarly, for the supercapacitor:
$$C_{SC}^* = \frac{r_0(1+r_0)^{T_{sc}}}{(1+r_0)^{T_{sc}}-1} (c P_{SC} + x E_{SC}) + d P_{SC} + y E_{SC} \quad (4-17)$$
The total annual cost is:
$$f = C_B^* + C_{SC}^* \quad (4-18)$$
Constraints include SOC limits:
$$SOC_{B,\min} \le SOC_B(t) \le SOC_{B,\max} \quad (4-19)$$
$$SOC_{SC,\min} \le SOC_{SC}(t) \le SOC_{SC,\max} \quad (4-20)$$
Power limits:
$$-P_{B,\max} \le P_B(t) \le P_{B,\max} \quad (4-21)$$
$$-P_{SC,\max} \le P_{SC}(t) \le P_{SC,\max} \quad (4-22)$$
Energy balance:
$$\sum_{t=1}^T P_B(t) + \sum_{t=1}^T P_{SC}(t) = 0 \quad (4-23)$$
The decision variables are the rated powers \(P_B, P_{SC}\) and capacities \(E_B, E_{SC}\), as well as the allocation of IMFs to battery or supercapacitor. Specifically, I define a cutoff index \(j\) such that modes \(u_1, \ldots, u_j\) are assigned to the battery (low-frequency) and modes \(u_{j+1}, \ldots, u_K\) to the supercapacitor (high-frequency). The IWOA algorithm optimizes \(j\) together with the capacities and powers.
Simulation Results
I selected a typical day of wind power data from a 99 MW wind farm. The low-pass filter was applied with a time constant that ensured the grid power complied with the fluctuation limits. The original and smoothed powers are compared in Table 4:
| Parameter | Before smoothing | After smoothing |
|---|---|---|
| Max 1-min fluctuation (MW) | 27.61 | 3.73 |
| Max 10-min fluctuation (MW) | 57.18 | 32.29 |
| Power standard deviation (MW) | 16.77 | 16.15 |
| Smoothness | 35.64 | 8.47 |
The smoothing strategy dramatically reduced the short-term fluctuations, meeting the grid code requirements.
Using VMD with \(K=9\), I obtained nine IMF components. By optimizing the cutoff index \(j\), I determined that \(j=3\) yields the minimum annual cost. Thus, the battery absorbs modes \(u_1\) to \(u_3\), while the supercapacitor handles modes \(u_4\) to \(u_9\). Figure shows the power curves of the battery and supercapacitor after allocation, where the battery responds to low-frequency power and the supercapacitor handles high-frequency transients.
Table 5 lists the optimal configuration results for different schemes.
| Parameter | Battery only | Supercapacitor only | VMD+EMD (hybrid) | VMD+IWOA (proposed) |
|---|---|---|---|---|
| \(P_B^{N}\) (MW) | 30.56 | – | 15.73 | 14.55 |
| \(E_B^{N}\) (MWh) | 11.08 | – | 8.98 | 7.08 |
| \(P_{SC}^{N}\) (MW) | – | 28.66 | 15.88 | 13.67 |
| \(E_{SC}^{N}\) (MWh) | – | 8.98 | 6.95 | 6.22 |
| \(C_{iv}\) (万元) | 370398 | 502567 | 340398 | 326872 |
| \(C_{om}\) (万元) | 1538 | 620 | 1538 | 1401 |
| \(C_{dc}\) (万元) | -96 | -79 | -96 | -90 |
| \(C_t\) (万元) | 371840 | 503107 | 341840 | 328183 |
From the table, the proposed VMD+IWOA hybrid storage system requires significantly lower capacity than single-storage solutions or the EMD-based hybrid. The total annual cost is reduced by 4.01% compared to the EMD-based method, by 11.74% compared to battery-only, and by 34.77% compared to supercapacitor-only. This confirms the economic and technical superiority of the proposed strategy.
I also analyzed the sensitivity of the cutoff index \(j\) on the optimal capacities and total cost. Figure 4-17 showed that the battery capacity decreases while the supercapacitor capacity increases as \(j\) grows. The total cost reaches its minimum at \(j=3\), which balances the high-frequency burden and the battery lifetime. Selecting a smaller \(j\) forces the supercapacitor to handle too many low-frequency components, leading to excessive cost. A larger \(j\) forces the battery to absorb high-frequency components, accelerating its degradation and replacement cost.
Conclusion and Outlook
In this thesis, I have developed a comprehensive framework for wind power prediction and energy storage system optimization. The key contributions are:
- A robust data preprocessing pipeline using quartile-based outlier detection and missing forest interpolation.
- An advanced deep learning model, SSA-RF-LSTM-Attention, that combines feature selection, hyperparameter optimization, and attention mechanisms to achieve superior forecasting accuracy.
- A hybrid energy storage system configuration using VMD for power division and an improved whale optimization algorithm for optimal capacity and cost minimization.
The simulation results demonstrate that my methods effectively mitigate wind power fluctuations and improve the economic viability of the energy storage system. The proposed IWOA algorithm outperforms standard optimizers in convergence speed and final solution quality.
Future work may extend this research to consider multi-objective optimization involving peak shaving, grid frequency regulation, and actual load dynamics. Additionally, adaptive control strategies based on real-time SOC and market prices could further enhance the performance of the energy storage system in practical applications.
