Abstract:The installation of photovoltaic generation (PVG) systems in existing office buildings (EOB) is one of the environmental green energy measures. However, the fluctuation of PVG negatively impacts the stable electricity use of EOB, making EOB-PVG power prediction crucial. This paper proposes the EOB-PVG power prediction method using sparrow search algorithm-long short-term memory (SSA-LSTM). The method preprocesses the collected environmental and generation data using multiple imputation + principal component analysis (MI+PCA) and splits the dataset. The LSTM neural network prediction model is designed, and SSA is used to automatically optimize the neural network's hyperparameters to achieve accurate prediction. The experiment selects real environmental and generation data from the EOB, and after preprocessing, the cumulative contribution rate of the principal components of the dataset exceeds 95%. Three evaluation metrics are designed to assess prediction performance. Comparison results show that SSALSTM outperforms LSTM and SSA-TCN in prediction accuracy and fitting ability, providing good accuracy in predicting EOB-PVG power and contributing to the subsequent realization of intelligent energy management tasks for EOB.