Photovoltaic power prediction based on multi-head attention Bi-LSTM
-
摘要: 针对光伏发电的随机性和不确定性导致其发电功率难以预测的问题,提出一种融合多头注意力机制的双向长短期记忆(bidirectional long short-term memory, Bi-LSTM)的网络模型。通过皮尔逊相关性分析提取与功率预测高度相关的气象和光伏系统运行数据,并结合异常值处理和标准化进行数据预处理。异常值处理可减少极端数据的影响,降低训练中的梯度震荡,标准化则确保特征量纲一致性,避免权重学习不均衡。多头注意力机制为关键时序特征分配不同权重,提升了对光伏功率变化趋势的捕捉能力;Bi-LSTM同时处理时间序列的前后依赖,增强了对复杂时序数据的适应性。实验结果表明,所建立模型在新疆光伏电站应用中预测精度显著高于传统LSTM网络,误差更小,具有很好的应用前景。Abstract: To address the challenge of predicting photovoltaic (PV) power generation caused by its inherent randomness and uncertainty, a multi-head attention-based bidirectional long short-term memory (Bi-LSTM) model was proposed. Meteorological and PV system operation data highly correlated with power generation were extracted through Pearson correlation analysis, and data preprocessing was performed by combining outlier handling with standardization. Outlier handling reduces the impact of extreme data and mitigates gradient oscillation during training, while standardization ensures consistency in feature scales to avoid imbalanced weight learning. Different weights were assigned to critical temporal features by the multi-head attention mechanism to enhance the ability to capture PV power trends. Forward and backward dependencies in the time series were processed by the Bi-LSTM to improve adaptability to complex sequential data. Experimental results show that in the application to a PV plant in Xinjiang, the proposed model achieves significantly higher prediction accuracy than the traditional LSTM network, featuring lower errors and good promising application prospects.
-
表 1 数据集划分
Table 1. Data set partitioning
类型 数据条数 占比/% 训练集 24528 70 验证集 7008 20 测试集 3504 10 总计 35040 100 表 2 模型评价对比
Table 2. Model evaluation and comparison
模型 μMSE μMAE R2 LSTM 0.057 9 0.165 1 0.700 7 Bi-LSTM 0.030 9 0.118 4 0.838 3 MHA-Bi-LSTM 0.020 8 0.082 7 0.940 6 -
[1] 马骏, 江锐, 丁倩, 等. 基于多元宇宙优化支持向量机的短期光伏发电功率预测[J] . 热力发电, 2020, 49(4): 87 − 92. doi: 10.19666/j.rlfd.201911244 [2] LIU F, LI R R, LI Y, et al. Takagi–Sugeno fuzzy model-based approach considering multiple weather factors for the photovoltaic power short-term forecasting[J] . IET Renewable Power Generation, 2017, 11(10): 1281−1287. doi: 10.1049/iet-rpg.2016.1036 [3] 谭海旺, 杨启亮, 邢建春, 等. 基于XGBoost-LSTM组合模型的光伏发电功率预测[J] . 太阳能学报, 2022, 43(8): 75 − 81. doi: 10.19912/j.0254-0096.tynxb.2021-0005 [4] 张雨金, 杨凌帆, 葛双冶, 等. 基于Kmeans-SVM的短期光伏发电功率预测[J] . 电力系统保护与控制, 2018, 46(21): 118 − 124. doi: 10.7667/PSPC171595 [5] 孟巍, 郭腾炫, 刘昳娟, 等. 基于长短记忆神经网络优化的短期光伏发电预测方法[J] . 电网与清洁能源, 2022, 38(5): 129 − 134. doi: 10.3969/j.issn.1674-3814.2022.05.017 [6] ZHANG H Y, JIA R, DU H D, et al. Short-term interval prediction of PV power based on quantile regression-stacking model and Tree-structured Parzen Estimator optimization algorithm[J] . Frontiers in Energy Research, 2023, 11: 1252057. doi: 10.3389/fenrg.2023.1252057 [7] JING Y Z, YANG S Q, ZHANG K G. Ultra-short-term power forecast of photovoltaic power station based on VMD–LSTM model optimised by SSA[J] . Applied Mathematics and Nonlinear Sciences, 2023, 8(2): 823 − 834. doi: 10.2478/amns.2021.2.00246 [8] 李刚, 方鸿, 刘云鹏, 等. 新型电力系统中的大模型驱动技术: 现状、机遇与挑战[J] . 高电压技术, 2024, 50(7): 2864 − 2878. doi: 10.13336/j.1003-6520.hve.20240863 [9] LAI W Z, ZHEN Z, WANG F, et al. Sub-region division based short-term regional distributed PV power forecasting method considering spatio-temporal correlations[J] . Energy, 2024, 288: 129716. [10] 倪超, 王聪, 朱婷婷, 等. 基于CNN-Bi-LSTM的太阳辐照度超短期预测[J] . 太阳能学报, 2022, 43(3): 197−202. doi: 10.19912/j.0254-0096.tynxb.2020-0581 [11] 杨龙, 吴红斌, 丁明, 等. 新能源电网中考虑特征选择的Bi-LSTM网络短期负荷预测[J] . 电力系统自动化, 2021, 45(3): 166 − 173. doi: 10.7500/AEPS20200202002 [12] 徐柔, 章杰, 赖松林, 等. 结合改进的DCGAN和Attention-LSTM的光伏功率预测[J] . 福州大学学报(自然科学版), 2023, 51(4): 498 − 504. doi: 10.7631/issn.1000-2243.22334 [13] 崔京港, 王芳, 叶泽甫, 等. 基于QD和因果注意力TCN的光伏功率区间预测[J] . 太阳能学报, 2024, 45(3): 488 − 495. doi: 10.19912/j.0254-0096.tynxb.2022-1730 [14] 杨淇, 孟羽, 陈思磊, 等. 基于注意力机制的光伏系统故障电弧检测与定位研究[J] . 中国电机工程学报, 2024, 44(19): 7840 − 7851. doi: 10.13334/j.0258-8013.pcsee.231236 [15] 徐孝彬, 张好杰, 白建波, 等. 基于改进Unet的分布式光伏建筑物高精度分割方法[J] . 太阳能学报, 2023, 44(11): 82 − 90. doi: 10.19912/j.0254-0096.tynxb.2022-1155 [16] 赵黎, 王小港, 王宁, 等. 基于皮尔逊相关系数选择的完全广义空间调制可见光通信系统[J] . 光学学报, 2024, 44(4): 0406001. doi: 10.3788/AOS231379 [17] 武宇翔, 韩肖清, 牛哲文, 等. 融合多注意力深度神经网络的可解释光伏功率区间预测[J] . 电网技术, 2024, 48(7): 2928 − 2939. doi: 10.13335/j.1000-3673.pst.2023.0978 [18] 吉兴全, 赵国航, 叶平峰, 等. 基于QMD-HBiGRU的短期光伏功率预测方法[J] . 高电压技术, 2024, 50(9): 3850 − 3859. doi: 10.13336/j.1003-6520.hve.20230333 -
下载: