Shore Power System Load Forecasting Model based on IDBO algorithm and PCA-BiLSTM Network

Shore power offers convenient and sustainable power services to ships docking in ports, playing a pivotal role in advancing environmental preservation and the effective utilization of resources. Shore power system loads are susceptible to numerous influencing factors. Therefore, it is crucial to identify a highly accurate load forecasting model to facilitate the judicious allocation of power resources. A short-term shore power system load forecasting model based on the improved dung beetle optimization algorithm (IDBO) and principal component analysis (PCA) in conjunction with the enhanced bidirectional long and short-term memory (BiLSTM) network is proposed in this paper. The IDBO algorithm improves the problem of low convergence accuracy and vulnerability to local optima in DBO. This is achieved by population initialization based on cubic chaotic mapping, amalgamating walrus optimization algorithm, and adaptive t-distribution perturbation strategy. The performance of the BiLSTM, IDBO-BiLSTM, and PCA-IDBO-BiLSTM shore power system load forecasting models are compared through case studies, revealing that the proposed PCA-IDBO-BiLSTM model demonstrates superior predictive capabilities.


Introduction
Shore power system load forecasting predicts power demand for a future period by analyzing historical data on power consumption during ship calls and relevant environmental factors.However, the prediction of shore power system load in ports presents a challenge due to the existence of shock load, characterized by its substantial magnitude, brief change time, and irregular nature.Moreover, the historical data about shore power system load is a time-dependent dataset, subject to the influence of time, weather, ship type, port calls, and other variables, thereby amplifying the challenges associated with accurate load prediction [1] [2] .
Presently, the techniques employed for short-term electricity load forecasting encompass time series analysis methods and machine learning methods.The former relies on identifying trends and cyclical fluctuations in historical load data and excels in managing data with seamless series and linear attributes.The latter captures the non-linear attributes and stochastic nature of load data through model training and is well-suited for load data exhibiting high nonlinearity and stochasticity [3][4] .This paper employs the PCA algorithm to handle the high-dimensional and non-linearly traceable data and utilizes the IDBO algorithm to optimize the parameters of the BiLSTM network.Based on that, a PCA-IDBO-BiLSTM model is proposed in this paper.The proposed model is confirmed to exhibit superior performance in terms of predictive capability, robustness, and effectiveness.

Principal Component Analysis
In load forecasting, a multitude of uncertainties influence the forecast results from identifying the principal components for dimensionality dimensions.PCA accomplishes dimensionality reduction, streamlines the structure, and enhances network performance [5] .The steps of the algorithm are as follows: 1) For initial data standardization, each feature underwent normalization to attain a mean of 0 and a variance of 1.The initial data dimension is np ≥ , noting that the data matrix is A .
2) To find the covariance matrix R : According to Equation (1), the covariance matrix R is obtained.
3) To determine the eigenvalues of the covariance matrix R along with their associated eigenvectors, we employ the eigenvalue solution method; 4) To ascertain the number of principal components, we compute the cumulative contribution rate as per Equation (2).In this study, features with a cumulative contribution exceeding 80% are chosen, and these selected principal components are utilized as input variables for the new system.

Improved Dung Beetle Optimization Algorithm
The DBO algorithm is a novel heuristic approach introduced by Jianka Xue and Bo Shen in the year 2022 [6] .This method can establish a population comprising representatives, with each representative corresponding to a distinct candidate solution.The distribution ratio of these representatives may be configured based on the particular application problem.The position vector of the j th representative at the t th iteration is given by Equation ( 3), and M is the dimension of the search space [7] .
The original DBO algorithm is afflicted with uneven population distribution, a propensity to overconverge, a tendency to succumb to local optimization, and an imbalance between global exploration and local exploitation capabilities [8] .Consequently, the subsequent strategy is introduced to enhance the efficacy of the DBO.

Population initialization based on Cubic chaotic mapping.
Currently, a variety of chaotic mappings are extensively utilized in the initial optimization of populations to enhance the diversity of the initial populations.The search capability of various chaotic mappings differs in terms of convergence speed and precision.In this paper, we choose to employ Cubic chaotic mapping to tackle the uneven distribution issue in population initialization [9][10] .The iterative formula for the Cubic chaos mapping is as follows: where ∋ ( 01 i x ⊆ ， , and λ is the control parameter.The chaotic nature of Cubic chaotic mapping is associated with the value of the control parameter λ .When 0 0.3 2.595 x λ << ， , Cubic mappings have better chaotic traversal.

Walrus Optimization Algorithm (WaOA).
WaOA is presented by Pavel Trojovsk, and Mohammad Dehghani in 2023, and the algorithm demonstrates a remarkable equilibrium between exploration and exploitation [11] .The exceptional effectiveness of the migration strategy in the WaOA algorithm, concerning global search and discovery capabilities, is leveraged to address the imbalance between the dung beetle's global exploration and local exploitation capabilities.This enables dung beetles to concentrate on preserving population diversity during the search process, thereby averting premature convergence during the updating process and preventing the algorithm from succumbing to local optima.
The perturbation of the t-distribution parameter concerning the iteration number is formulated as a variant of the t-distribution.This perturbation is employed to influence the foraging behavior of the small dung beetle, thereby enhancing the algorithm's overall capacity for global exploitation during the early iterations, as well as its proficiency in local exploration during the later iterations.As a result, the algorithm's convergence speed is improved.The specific positional update is outlined in Equation (8): where ∋ ( _ t C iter undergoes a variant.

Bidirectional Long and Short-Term Memory Network
BiLSTM network integrates both forward and reverse LSTM architectures.By simultaneously considering information from both preceding and subsequent points in time, the BiLSTM network enhances prediction accuracy by capturing historical and future data to forecast the current moment [12] .This approach compensates for the data information deficiency in LSTM networks.

IDBO Optimised Prediction Model for PCA-BiLSTM
IDBO can explore superior PCA-BiLSTM hyperparameter configurations to elevate the model's predictive efficacy.As depicted in Figure 1, IDBO demonstrates the fewest iterations and the swiftest convergence when compared to the seven optimization algorithms, namely IDBO, DBO, SABO, WOA, GWO, NGO, and HHO, operating under identical benchmark function tests.

Introduction to the dataset
This paper delves into the characteristics of shore power system load.Firstly, it explores the presence of shock load, which is typified by substantial fluctuations, brief variation periods, and limited regularity.Secondly, the shore power system load is influenced by factors including time, weather, ship type, and ship port call.The paper utilizes a data set comprising shore power system load data from 258 ships in a Chinese port, with a sampling interval of thirty minutes.

Assessment of indicators
In this paper, the mean absolute error (MAE) and root mean square error (RMSE) are employed as metrics for prediction assessment (Equation 9).A lower value of the error indicator signifies greater accuracy in prediction and higher model performance.Additionally, the coefficient of determination (R2) (Equation 10) elucidates the degree of alignment of the regression line with the observed data.Proximity to 1 within the range [0, 1] denotes superior alignment, while divergence signifies inferior fit.
,, 1 where , ˆtesti y , , t e s ti y , and , t e s ti y are the true load value, predicted load value, and average load value at moment , respectively, and is the total number of test samples.

Experimental analyses
In this paper, BiLSTM, DBO-BiLSTM, and PCA-IDBO-BiLSTM models are applied to examine the same dataset separately.The test outcomes demonstrate that the PCA-IDBO-BiLSTM predictive model exhibits commendable accuracy, as delineated in Figure 3.As delineated in Table I, the MAE and RMSE of the PCA-IDBO-BiLSTM model presented in this study are inferior to those of other models, and the R 2 approaching 1 indicates optimal fitting.Consequently, the PCA-IDBO-BiLSTM model adeptly captures the patterns of historical load transformation and evinces superior predictive efficacy in shore power system load forecasting.

Figure1.Figure 2 .
Figure1.Benchmark function test results.The proposed shore power system load prediction model, based on the IDBO algorithm and PCA-BiLSTM network, initially employs PCA for dimensionality reduction of the original data.Subsequently, BiLSTM models the reduced-dimension data, and then the IDBO algorithm is utilized to optimize PCA-BiLSTM to enhance the model's predictive accuracy and expedite the process of model training and parameter adjustment.The model flow is shown in Figure 2.Start

Figure 3 .
Figure 3. Forecasted results of the proposed model. , k X kY ⊆ Κ , km ÷is the position of the mth dung beetle towards which the dung beetle is moved to the chosen dung beetle, , knx is its n th dimension, and k F is its objective function value.2.2.3.Adaptive t-distribution perturbation strategy.Perturbations in the foraging behavior of the beetles during the foraging stage are modeled by a t-distribution.The primitive small dung beetle foraging behavior is shown in Equation (7).

Table 1 .
Comparison of different models.system load forecasting model based on the IDBO algorithm and PCA-BiLSTM network is proposed in this paper.The IDBO algorithm can improve the PCA-BiLSTM hyperparameter combinations.In the case study section, the prediction results of the BiLSTM model, IDBO-BiLSTM model, and PCA-IDBO-BiLSTM model are compared in detail.It can be concluded that applied to the shore power system, which is a scenario with large random fluctuations, the proposed PCA-IDBO-BiLSTM model has improved the short-term prediction accuracy of the shore power with good predictability.