Abstract
Operating wind power plants with constant output is essential for grid integration and liberalised energy market participation. This study presents an integrated framework for predictive control and optimisation of Battery Energy Storage Systems (BESS) to stabilise wind power output. A triad machine learning model, combining Long Short-Term Memory (LSTM), Artificial Neural Networks (ANN), and Linear Regression (LR), achieves highly accurate wind forecasts (RMSE = 0.000,027 MW), outperforming existing benchmarks. These forecasts coupled with Sequential Least-Squares Quadratic Programming (SLSQP) algorithm to optimise BESS operation while satisfying constraints on state-of-charge, inverter capacity, and battery life, with maximum deviation limited to 0.07%. A mean-based neural network model reduces required BESS capacity to 11.5% of wind farm capacity, compared to 15%–30% in prior studies. Validated using operational data from the Thambapavani wind farm, the framework ensures constraint compliance, extends battery lifespan, reduces variability, and offers a scalable solution for reliable wind energy integration.
Keywords
Introduction
Wind power, a cornerstone of renewable energy, is critical for addressing climate change and achieving sustainable energy systems (Kazari et al., 2018). However, its inherent variability, driven by fluctuating weather conditions, poses significant challenges for grid stability, efficient dispatching, and participation in liberalised energy markets (Li et al., 2010; Voller et al., 2008; De Carne et al., 2024). These fluctuations cause power imbalances, frequency deviations, and underutilization of grid infrastructure, increasing operational costs and stress on transmission systems (Loza et al., 2024). Battery Energy Storage Systems (BESS) mitigate these issues by storing excess power during high wind periods and releasing it during low wind periods, ensuring stable output (Spiller et al., 2023). Bi-directional inverters facilitate seamless energy exchange between wind turbines, BESS, and the grid. However, optimal sizing and management remain complex due to constraints like depth of discharge (DOD) limits, inverter capacity, and battery lifespan (Dakai et al., 2005; Abhinav and Pindoriya, 2016; Saber et al., 2019).
Existing BESS control strategies, such as low-pass filtering (Kim et al., 2011), dynamic programming (Liu et al., 2020a), and fuzzy control (Tabosa da Silva et al., 2023), focus on short-term power smoothing but struggle to maintain constant output over extended periods while optimising battery health. Studies, like (Yao et al., 2009), use dual-BESS configurations but incur higher costs and efficiency losses. Others, such as (Liu et al., 2020a; Sakipour and Abdi, 2020), require oversized BESS (15%–30% of wind farm capacity), limiting cost-effectiveness. Accurate wind power forecasting, essential for BESS optimisation, has improved with hybrid models (Wang et al., 2025; Malakouti et al., 2024), yet integrating these with constrained optimisation for real-time control remains underexplored.
This study proposes a novel framework integrating a triad machine learning model—combining Long Short-Term Memory (LSTM), Artificial Neural Networks (ANN), and Linear Regression (LR)—with a Mean-based Neural Network (NN) for BESS and inverter sizing, and Sequential Least-Squares Quadratic Programming (SLSQP) for optimisation.
Validated with 8.64 million data points from Sri Lanka’s 103.5 MW Thambapavani wind farm, this model demonstrates that the optimally weighted LSTM-LR-ANN triad reduces RMSE by 55.7% versus best dual hybrids and 98.7% versus standalone deep learning models. This triad performs better than the best-published dual hybrids (Xiao et al., 2023; Liu et al., 2024). The framework’s computational efficiency (<120 seconds per 6-h forecast on consumer hardware) further addresses industry deployment barriers neglected in contemporary literature (Hanifi et al., 2020).
This study reduces BESS capacity to under 11.5% of wind farm capacity, outperforming the published models (Liu et al., 2020a; Sakipour and Abdi 2020; Bourbon et al., 2019) and ensuring SOC and lifespan compliance. Bridging forecasting and optimisation offers a scalable, cost-effective solution for smoothing wind power, enhancing grid reliability, and integrating renewable energy.
This paper is structured as follows: Method section outlines the proposed prediction, optimisation, and control framework, detailing the SLSQP algorithm and its objectives, constraints, and penalty functions. Results section covers the implementation of this approach for predictive control and optimisation of BESS in wind turbine systems. Discussion section discusses the detailed analysis of the results. Finally, the conclusion section summarises the key conclusions of this study.
Method
Data collection
The study utilises operational data from the “Thambapavani” onshore wind farm (103.5 MW nameplate capacity) on Mannar Island, Sri Lanka (8.98°N, 79.92°E). The facility comprises 30 Vestas V126-3.45 MW turbines with 60% monsoonal and 40% inter-monsoonal seasonal wind characteristics (Kalpage et al., 2015). These turbines are interconnected with the Nadukudah 220 kV/33 kV Grid Substation at the 33 kV voltage level via six feeder lines, each containing five wind turbines. Wind feeder-based power data is considered in this study. The data has been sampled at 1-s intervals and spans from January 2021 to December 2021. To ensure computational tractability while capturing seasonal variability, a representative subset for 100 days (8,640,000 seconds) is uniformly sampled across southwest monsoon (May–Sep, 40 days), northeast monsoon (Dec–Feb, 35 days) and inter-monsoon periods (25 days).
The wind power prediction datasets are segmented into training, validation, and testing data. The training and validation data encompass the initial 80% of data points (70% Training, 10% Validation) within each dataset, while the remaining 20% is allocated for testing the efficacy of the predictive models. Initially, training and validation data are fed into the machine learning model to train and validate the model. Once the model is trained for prediction, the hidden test data is used to test the prediction accuracy. The prediction algorithms are implemented in Python version 3.10 and conducted on a personal computer with an Intel(R) Core i7-1255U processor, Deca-core 1.70 GHz, and 16.00 GB of RAM.
System description
The proposed framework integrates a wind farm with a BESS to deliver stable power output to the grid, as illustrated in Figure 1. A bi-directional inverter manages energy flow between the wind turbines, BESS, and grid, enabling efficient charging during high wind periods and discharging during low wind periods to maintain constant output. The BESS, optimised to minimise capacity requirements, mitigates wind power variability while adhering to DOD and inverter capacity constraints. BESS integrated wind farm.
Figure 2 outlines the study’s methodology. Historical wind power data trains a triad machine learning model (Long Short-Term Memory, Artificial Neural Networks, Linear Regression) for accurate forecasting. A Mean-based Neural Network (NN) estimates optimal BESS and inverter capacities, refined by Sequential Least-Squares Quadratic Programming. SLSQP optimises the combined wind-BESS output, minimising power deviations and constraint violations (e.g., DOD limits, battery lifespan) while reducing BESS capacity to under 11.5% of wind farm capacity. This integrated approach ensures grid reliability and cost-effectiveness, advancing wind power smoothing. Simplified Flowchart of this Study.
Standalone wind power prediction model
Machine learning models and implementation specifications.
Hybrid and triad machine learning model formation
Hybrid models integrate complementary machine learning algorithms to mitigate individual limitations and enhance forecasting robustness. Building on hybrid foundations, triad ensembles strategically combine three base models selected through error diversity analysis. As commonly acknowledged in the literature, the most widely accepted procedure for hybrid model stacking involves assigning weighting coefficients to each method based on its historical forecasting performance (Tascikaraoglu and Uzunoglu, 2014). Unlike conventional static weighting approaches, we implement a novel dynamic weighting scheme that adjusts component contributions using real-time error minimisation, ensures adaptability across varying wind regimes, and assigns higher influence to the model performing best. The workflow comprises three stages:
1. Base Model Forecasting:
Each constituent model
2. Weight Calculation:
• Assign weights
Formula
• Convert the inverse errors into a probability distribution so that the sum of weights equals 1
3. Prediction Aggregation:
The final hybrid forecast is computed as
The weighted predictions are confidently combined, as demonstrated in Figure 3. Flow chart of the triad model.
The performance of these machine learning models was evaluated using Root Mean Squared Error (RMSE), Mean Squared Error (MSE), and Mean Absolute Error (MAE) (Hou et al., 2001; Lange, 2005; Zhao et al., 2011). However, only RMSE values are presented in this manuscript for brevity and ease of interpretability. The Diebold-Mariano (DM) Test (Diebold and Mariano, 1995) was also implemented to establish the superiority of the models.
Determination of BESS and inverter capacity
Optimising the capacity of Battery Energy Storage Systems (BESS) and bi-directional inverters is critical for balancing cost-effectiveness and operational efficiency in wind farms (Miao et al., 2020; Spiller et al., 2023). An undersized BESS may fail to stabilise power output, while an oversized system increases capital costs unnecessarily.
This study aims to determine the optimal method for estimating BESS and Inverter Capacity using machine learning and deep learning techniques. The goal is to minimise energy usage from the BESS while ensuring constant output from the wind farm and BESS. A state-of-charge-based calculation was used to determine BESS capacity.
Power Flow In/Out of the Battery (PFlow) was calculated by
The capacity of the BESS (PBESS) is calculated by considering the Round-trip efficiency (η) of the entire system and depth-of-discharge limits (SOCLimit)
SOCLimit is introduced to ensure the BESS’s Depth of Discharge (DOD) remains within the limits, extending the battery’s lifespan. Finally, the bi-directional inverter capacity (PInverter) was determined by
Constrained optimisation
This study employs Sequential Least-Squares Quadratic Programming (SLSQP) to optimise the combined power output of the wind farm and Battery Energy Storage System (BESS), minimising variability while adhering to operational constraints. SLSQP, a robust algorithm for nonlinear optimisation, balances power stability with battery health and system efficiency, outperforming traditional methods like linear programming that struggle with complex system rules that ensure safe battery operation (Bourbon et al., 2019).
The objective function minimises the deviation between the wind power (
SLSQP constraint functions.
This approach reduces BESS capacity to under 11.5%, as shown in results section, enhancing cost-effectiveness and grid reliability.
Results
Wind power prediction
Standalone and hybrid machine learning model performance
RMSE value of Individual machine learning models.
RMSE value of the Hybrid machine learning models.
Among the hybrids, the
While hybrid models offered substantial improvements over individual models, their performance plateaued for longer horizons (>3 hours), indicating diminishing returns from dual-model stacking. This motivated the development of a triad framework, which seeks further to improve performance through multi-model integration with dynamic error-based weighting.
Triad machine learning model evaluation
RMSE value of the Triad machine learning models.
Among all triad configurations tested, the LSTM + LR + ANN model achieved the lowest error values across all timeframes. RMSE values were as low as 2.7 × 10−5 MW at the 3-h horizon. These values represent a substantial performance improvement of 90%–98% compared to the best-performing individual and 50%–55% compared to hybrid models.
Diebold–Mariano (DM) test results.
Figure 4 shows the actual versus predicted wind power curve of the LSTM + ANN + LR model falls on top of each other, indicating negligible prediction error. Figure 5 shows the Histogram and kernel density estimate (KDE) plot of residuals for the LSTM + LR + ANN triad model. Mean residual is approximately −0.00,004, with a standard deviation of 0.00,009. The near-zero skewness indicates symmetrical forecast error distribution, confirming model reliability and absence of systematic bias. LSTM + ANN + LR Forecast versus Actual Wind Power, Showing Accurate Predictions Over Time. Histogram and KDE plot of residuals for the LSTM + LR + ANN triad model.

BESS and inverter capacity determination
Optimising BESS and bi-directional inverter capacities ensures cost-effective wind power smoothing while maintaining grid stability. This study evaluates six machine learning and deep learning models—Mean-based NN, Median-based NN, Mode-based NN, LSTM, RNN, and XGBoost—to determine the minimum BESS and inverter capacities for a constant combined wind-BESS output. The 100-day data used in this study were divided into eight distinct wind power datasets for computational purposes. Each dataset was segmented into hourly intervals to facilitate model testing, enabling a thorough examination of power generation trends. The consistent power output for each one-hour segment was calculated, yielding valuable insights into the dynamics of wind energy production.
The Mean-based NN, with three layers (100 neurons each, ReLU activation), outperforms other models by predicting an optimal combined output that minimises BESS usage, as shown in Figures 6(a) and (b). Figure 7 illustrates capacity requirements across 30-min to 5-h durations calculated by Mean-based NN, achieving a BESS capacity of under 11.5% of wind farm capacity, significantly lower than 15%–30% in prior studies (Liu et al., 2020a; Sakipour and Abdi, 2020). (a) Comparison of model predictions for BESS capacity (MWh). (b) Comparison of model predictions for inverter capacity (MW). Mean-based neural network results, showing minimal battery size needed for stable power.

Figure 8 shows the model maintaining a 50% state-of-charge (SOC) after each 1-h interval, ensuring zero net energy demand from the BESS. The DM test confirms the Mean-based NN’s superior forecast accuracy for time-series predictions (p < 0.05) compared to LSTM, RNN and XGBoost, accounting for temporal correlations in wind data. Unlike traditional sizing methods (Liu et al., 2020a), this approach enhances cost-effectiveness and scalability, validated across diverse wind conditions, supporting efficient grid integration. Mean-based neural network optimisation, maintaining safe battery levels at 50% charge.
Sequential Least-Squares Quadratic Programming (SLSQP) optimisation
The SLSQP algorithm drives this study’s innovation, optimising the combined power output of the wind farm and BESS to deliver stable, cost-effective grid integration. Unlike heuristic methods like genetic algorithms (Sakipour and Abdi, 2020), which often lack convergence guarantees, SLSQP robustly handles nonlinear constraints, such as SOC limits and inverter capacity, ensuring reliable real-time scheduling. This makes it exceptionally well-suited for real-time scheduling in wind-BESS systems, where constraint violations can compromise performance and asset longevity. Using 1-s wind data (January–December 2021), SLSQP minimises deviations between wind power (
SLSQP robustly optimised four BESS and inverter capacity scenarios: 100%, 90%, 80%, and 75% of the optimal values previously determined by the mean-based NN model. In each case, the algorithm optimised the combined output of the wind farm and BESS over one-hour intervals while enforcing constraints related to battery capacity, SOC limits, inverter capacity, and system efficiency.
Figure 9 summarises the constraint compliance results. Notably, all four scenarios demonstrated full compliance with the BESS capacity constraint. The inverter capacity constraint was well-managed, with a maximum observed deviation of just 0.07% in the most constrained (75%) scenario. This indicates high precision in power scheduling even under undersized configurations. SLSQP constraint compliance.
SLSQP maintained SOC within 80% DOD limits for over 92% of the time, minimising degradation to evaluate the enforcement of battery life constraints. The SOC remained within allowable bounds in all simulations, with no overcharging or deep discharge observed.
The robustness of the algorithm was further validated by simulating two initial SOC conditions: 20% and 50%. Figures 10(a) and (b) show that the SLSQP algorithm consistently regulated battery usage in constrained and typical starting conditions. The 20% SOC scenario, representative of low-energy start-up conditions, posed a greater challenge; yet, the SOC was maintained safely throughout, proving the algorithm’s reliability under stress. The 50% SOC scenario suggests that the SLSQP algorithm effectively maintains stable SOC levels under constrained conditions and maximises power output while ensuring optimal battery usage. Table 7 shows the Performance comparison of SLSQP with linear programming, deep-learning-based adaptive-dynamic programming Algorithm (DL-ADP), dynamic programming, and genetic algorithms, highlighting SLSQP’s lower deviation and reduced BESS capacity. (a) SLSQP optimisation at 20% initial battery charge. (b) SLSQP optimisation at 50% initial battery charge. Comparison of optimisation methods.
A Diebold–Mariano test (p < 0.01) confirms SLSQP’s superior accuracy over dynamic programming. Grid search over [0.1, 1, 10] identified k3 = 2 as optimal for SOC stability, minimising deviations by 15% compared to k3 = 1, ensuring robust battery lifespan protection. Sensitivity analysis confirmed that ±10% variations in k1, k2, and k3 (e.g., k2 = 4.5–5.5) maintained deviation below 0.08%, ensuring adaptability to wind variability. Requiring only 11.5% BESS capacity versus 15%–30% in prior work (Liu et al., 2020a; Sakipour and Abdi, 2020; Bourbon et al., 2019; Chen et al., 2020), SLSQP superiority was validated across diverse wind conditions.
Discussion
This study’s framework integrates a triad machine learning model (LSTM, ANN, and LR), a mean-based NN, and a constrained optimisation method (SLSQP) to stabilise wind power output while optimising BESS performance. Using real-world data from the Thambapavani wind farm, the triad model achieves a three-hour-ahead forecasting RMSE of 0.000,027 MW (Table 5), representing a 98% improvement over standalone models and a 55.7% gain compared to the best-performing hybrid combinations. These improvements are statistically validated by the Diebold-Mariano test (DM >120, p < 0.0001; Table 6), confirming the triad model’s superiority in short-term forecasting. This predictive accuracy enables precise BESS scheduling and reduces dependence on oversized storage systems, addressing limitations in previous works (Liu et al., 2020; Sakipour and Abdi, 2020; Bourbon et al., 2019; Chen et al., 2020).
The mean-based neural network further reduces the estimated BESS capacity to 11.5% of wind farm output (Figure 7), significantly lower than the 15%–30% required in dual-BESS configurations (Yao et al., 2009) or statistical sizing approaches (Liu et al., 2020a). These values are refined using the SLSQP algorithm, which ensures high operational accuracy, with a maximum deviation of just 0.07% in inverter capacity compliance (Figure 8) and 92% SOC compliance even when using only 75% of optimally sized storage (Figure 9). Figures 10(a) and (b) demonstrate the algorithm’s robustness under constrained energy availability, maintaining SOC stability at 20% and 50% initial conditions.
Table 7 benchmarks the SLSQP approach against Linear Programming (Bourbon et al., 2019), Dynamic Programming (Liu et al., 2020a), DL-ADP (Miao et al., 2020), and Genetic Algorithms (Sakipour and Abdi, 2020). SLSQP achieves superior performance, with lower constraint deviations (0.07% vs 0.11%–2.4%) and smaller BESS requirements (11.5% vs 15%–30%). A second Diebold-Mariano test (p < 0.01) confirms the optimisation model’s statistical significance, and a 15% reduction in error variance further validates its accuracy. Sensitivity analysis of penalty weights (k1 = 5, k2 = 5, k3 = 2) reveals that ±10% variation has minimal impact on performance, demonstrating resilience to wind power fluctuations.
In contrast to earlier dual-BESS approaches (Yao et al., 2009) that incur efficiency losses through separate charge/discharge operations, the integrated SLSQP strategy minimises degradation by optimising energy flow within a single unit, thus extending battery lifespan. However, one limitation of this study is its dependence on data from a single wind farm in a monsoon-influenced wind regime. Future work should explore multi-site validation and recalibration for broader applicability to accommodate seasonal or regionally diverse wind profiles.
Conclusion
This study presents an integrated framework that combines high-accuracy wind power forecasting with constrained optimisation to enable stable and dispatchable output from wind farms equipped with Battery Energy Storage Systems (BESS). A novel triad machine learning model—comprising LSTM, ANN, and Linear Regression—achieved superior three-hour-ahead forecasting accuracy, with RMSE reduced by 98% compared to standalone models. These forecasts guided a Sequential Least-Squares Quadratic Programming (SLSQP) algorithm that optimised BESS operation while strictly enforcing constraints on state-of-charge, inverter capacity, and battery degradation.
The proposed system was validated using real-world data from the Thambapavani wind farm. Results demonstrate that the framework reduced required BESS capacity to 11.5% of wind farm output—significantly lower than the 15%–30% typically reported in prior studies—while maintaining output stability and minimising operational constraint violations to less than 0.1%. The approach also proved robust under varying initial SOC levels and penalty weight configurations.
By unifying predictive control and optimisation within a single framework, this research provides a scalable and cost-effective solution for wind power smoothing. It enhances grid reliability, reduces infrastructure stress, and supports the economic deployment of BESS in renewable-rich power systems. Future work will focus on extending the framework to diverse geographic regions and wind regimes, as well as evaluating its performance under multi-site, real-time operational settings.
Footnotes
Acknowledgement
The authors thank the Ceylon Electricity Board, Sri Lanka, for supplying the wind power data used in this research.
Author Contributions
Subankan Balasubramaniam: Conceptualisation, Methodology, Software, Formal Analysis, Investigation, Data Curation, Writing – Original Draft, Visualisation. Ahilan Kanagasundaram: Supervision, Conceptualisation, Validation, Writing – Review & Editing, Project Administration. Arulampalam Atputharajah: Supervision, Methodology, Validation, Writing – Review & Editing. Kapila Bandara: Resources, Validation, Writing – Review & Editing, Project Administration.
Funding
The authors received no financial support for the research, authorship, and/or publication of this article.
Declaration of conflicting interests
The authors declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Data Availability Statement
The dataset used in this study was provided by the Ceylon Electricity Board (CEB) and contains operational wind power measurements from the Thambapavani wind farm. Due to institutional confidentiality agreements, the data cannot be made publicly available. Interested researchers may request access from the corresponding author, subject to approval from CEB.
