The state of health (SOH) and remaining useful life (RUL) of lithium-ion batteries reflect the current extent of aging of the battery from different perspectives, and accurate and efficient health assessment is crucial for ensuring their safe use. This study proposes a TCN-GRU-AM model based on health feature parameters for predicting SOH and RUL. This method extracts health features related to battery capacity degradation from raw data and selects key features as model inputs through Spearman correlation analysis. The TCN network uses dilated convolution to capture local temporal features during the charging and discharging processes; the GRU effectively captures the changing trends of short-term dynamics; the multi-head self-attention mechanism enhances the focus on key information. Experimental results show that for the local capacity regeneration phenomenon, this method demonstrates good prediction performance and can more accurately predict the battery capacity decay trend under different cycle starting points; compared to CNN-GRU, LSTM-AM, and GRU-AM models, it has lower RMSE and MAE values and better robustness. Additionally, in RUL prediction, the TCN-GRU-AM model maintains an absolute error of 0 to 2 cycles in all tests, significantly outperforming the comparison models and achieving high prediction accuracy.
With the swift evolution of renewable energy technologies, the design and optimization of microgrids have emerged as vital components for fostering energy transition and promoting sustainable development. This study presents a bi-level capacity optimization model for microgrids, integrating wind–solar generation with hybrid electric–hydrogen energy storage systems to simultaneously enhance economic efficiency and system stability. The outer layer minimizes the annual total cost through the application of an Improved Beluga Whale Optimization (IBWO) algorithm, which is enhanced by strategies including the reverse elitism strategy, horizontal and vertical crossover operations, and a whirlwind scavenging strategy to improve performance. The inner layer builds on the optimized results from the outer layer, employing a Multivariable Variational Mode Decomposition (MVMD) algorithm to regulate the power output of the energy storage system. By integrating electric–hydrogen hybrid storage technology, the inner layer effectively mitigates power fluctuations. Furthermore, this study designs a modal decomposition-based charging and discharging scheduling strategy to ensures the system’s continuous and stable operation. Simulations performed on MATLAB 2018b and CPLEX 12.8 platforms indicate that the proposed dual-layer model decreases annual total expenses by 27.5% compared to a single-layer model while keeping grid-connected power variations within 10% of the installed capacity. This research provides innovative perspectives on microgrid optimization design and offers substantial technical support for ensuring stability and economic efficiency in intricate operational settings.