A Power Load Forecasting Model Based on FA-CSSA-ELM

Accurate and stable power load forecasting methods are essential for the rational allocation of power resources and grid operation. Due to the nonlinear nature of power loads, it is difficult for a single forecasting method to complete the forecasting task accurately and quickly. In this study, a new combinedmodel for power loads forecasting is proposed.*e initial weights and thresholds of the extreme learning machine (ELM) optimized by the chaotic sparrow search algorithm (CSSA) and improved by the firefly algorithm (FA) are used to improve the forecasting performance and achieve accurate forecasting. *e early local optimum that exists in the sparrow algorithm is overcome by Tent chaotic mapping. A firefly perturbation strategy is used to improve the global optimization capability of the model. Real values from a power grid in Shandong are used to validate the prediction performance of the proposed FA-CSSA-ELM model. Experiments show that the proposed model produces more accurate forecasting results than other single forecasting models or combined forecasting models.


Introduction
Nowadays, power loads have reached almost every corner of human society and have brought great convenience to mankind. And reasonable power loads planning will bring great convenience to human society, and wrong power loads planning will bring great loss to human society. Inaccurate power load forecasting will result in incorrect load planning and layout by the authorities. is will cause huge economic losses and wasted energy. erefore, accurate forecasting of power loads has been a hot topic in power system planning. Since power loads cannot be stored on a large scale, this leads to low utilization of electric resources. Accurate power load forecasting results can provide correct feedback and decision-making for the power sector. It can also help achieve a reasonable dynamic balance between electricity production and electricity consumption. [1][2][3][4][5].
Initially, a series of traditional methods of forecasting power loads were proposed by many experts and scholars. Traditional methods include trend extrapolation [6,7], exponential smoothing [8,9], Kalman filtering [10], and ARIMA [11][12][13]. ese traditional methods of forecasting electrical loads have the advantage of being simple to be calculated and easy to be implemented. However, traditional methods have the disadvantage of low prediction accuracy, which will cause management departments to be unable to make reasonable and accurate decisions. It also makes it difficult to play a key role in the planning and rational allocation of electrical loads.
With the continuous development of artificial intelligence, many researchers have realized the application potential of intelligent models in dealing with nonlinear and complicated problems. Elman proposed an intelligent model of the ELMAN [14]. Noble proposed an intelligent model of the support vector machine (SVM) [15]. Huang proposed an intelligent model of the extreme learning machine (ELM) [16]. Suykens and his partners proposed an intelligent model of the least squares support vector machine (LSSVM) [17]. Shi and his partners proposed an intelligent model of the recurrent neural networks (RNNs) [18].
Many experts have successfully applied intelligent models to complicated big data and nonlinear problems in power loads forecasting. A method of predicting short-term power loads using SVM had been proposed by Ye and his partners [19]. Using support vector machines can reflect the characteristics of important characteristics of power load to establish a forecasting model. A new power load forecasting model had been proposed by Wei Li and his partners [20]. e training set was constructed using variational pattern decomposition, and then the decomposed data were fed into the ELM model to construct the prediction model. is forecasting model utilizes an extreme learning machine (ELM) combined with variational mode decomposition (VMD) to forecast power load models. An LSSVM-based model for power loads forecasting had proposed by Xuemei Li and his partners. e model was compared with a back propagation neural network (BPNN) and verified to have better prediction accuracy and generalization ability [21].
Nowadays, the prediction accuracy of a single intelligent forecasting model for power loads is no longer sufficient to meet the normal needs of the power system. So, many scholars have turned their attentions to swarm intelligence optimization algorithms [22]. e research shows that the swarm intelligence optimization algorithm has the characteristics of simple principle, easy realization, strong adaptability, and high efficiency. erefore, swarm intelligence optimization algorithms are often used to optimize the parameters of a single power load forecasting model by scholars. Swarm intelligence optimization algorithms are mainly derived from the habits of organisms in nature. Although the capacity of a single individual is limited, populations can perform well when they work together. Common swarm intelligence optimization algorithms include the ant colony optimization (ACO) [23], the artificial bee colony algorithm (ABC) [24], the firefly algorithm (FA) [25], the bat algorithm (BA) [26], the cuckoo search (CS) [27], the grey wolf optimization (GWO) [28], the dragonfly algorithm (DA) [29], the whale optimization algorithm (WOA) [30], and the sparrow search algorithm (SSA). And SSA was a new swarm intelligence optimization algorithm proposed by Xue in 2020 [31].
As a result, a series of combinatorial models based on population intelligence optimization algorithms have been proposed by scholars to predict power loads. A method of forecasting short-term electricity loads using WOA optimized long-and short-term memory (LSTM) artificial neural networks was proposed by Haiyan [32]. A chaotic artificial bee colony algorithm to optimize the support vector regression (SVR) short-term power prediction model was proposed by Hong [33]. An improved grey wolf algorithm to optimize support vector machines for short-term power loads forecasting models was proposed by Jiang [34]. It can be found from the above research that the combined forecasting model can well meet the requirements of forecast accuracy and provide correct feedback and information for the power sector.
e SSA algorithm is a new swarm intelligence optimization algorithm, which simulates the foraging and antipredation behavior of sparrows, and is superior to particle swarm optimization (PSO) and GWO algorithms in terms of finding the best performance. e SSA algorithm, like other swarm intelligence algorithms, suffers from poor convergence accuracy and tends to fall into local optima. In this paper, Tent chaotic mapping is used to initialize the sparrow population. Chaos theory has been applied in many ways, especially to deal with nonlinear problems [35][36][37][38]. e initial population can be uniformly distributed in the solution space by using chaotic property. is will help the algorithm converge quickly and jump out of local optimality. And the firefly perturbation strategy is used to update the population position. e global optimization ability and convergence speed of the sparrow search algorithm are improved by using the characteristics of the firefly algorithm.
As a single-layer feedforward neural network (SLFN) [39], ELM has more powerful generalization ability than other traditional neural networks. And ELM is also faster than other neural network models while maintaining learning accuracy. is makes ELM ideal for problems with large amounts of data, such as power load forecasting. erefore, the FA-CSSA algorithm is used to optimize the initial weights and thresholds of the ELM model. e powerful global search capability of the FA-CSSA algorithm is used to improve the generalization capability of the model and hence the predictive capability of the overall combined power loads forecasting model. erefore, this paper addresses the SSA algorithm, the ELM neural network model, and the FA-CSSA algorithm. A new FA-CSSA-ELM electric load forecasting model and the corresponding feedback mechanism for power supply are proposed. And the real load history data of a certain power grid in Shandong is used as the simulation data to verify the prediction performance of the model. In order to better illustrate the excellent performance and accuracy of the FA-CSSA-ELM combined power load forecasting model, in this paper, the prediction results are compared and discussed with those of three single prediction models and two combined prediction models, respectively. e results demonstrate that the FA-CSSA-ELM power load model possesses better prediction accuracy than the other five models.

Sparrow Search Algorithm.
e SSA algorithm is made up of three components: a spotter, a tracker, and a vigilante. Suppose there are N sparrows in a D-dimensional space. en, the sparrow flock can be expressed as the following equation: en, the position of the i-th sparrow in the D-dimensional search space can be expressed as the following equation: where x id is the position of the i-th sparrow in dimension d. So, the position update formula can be expressed as the following equation: 2 Mathematical Problems in Engineering where t denotes the current number of iterations, T denotes the maximum number of iterations, z is the random number between [0, 1], Q is a random number subject to a normal distribution, L is a matrix of 1 × d whose elements are all 1, R 2 denotes a guard value, ranging from [0, 1], and ST is a safe value, ranging from [(1/2), 1]. It is generally assumed that discoverers make up about 10-20% of the population, with the rest belonging to trackers. e tracker's position update formula can be expressed as the following equation: where xw t d denotes the worst position in dimension d of the t th iteration and xb t+1 d denotes the best position. When i > (n/2), it means that the population is short of food and needs to go elsewhere to forage. When i ≤ (n/2), it means that the tracker is predating near the optimal position xb. e last guards are used for vigilant reconnaissance of the population and number 10-20% of the total population. Its position update formula can be expressed as the following equation: where β is the step control parameter, a normally distributed random number with a mean of 0 and a variance of 1, K is a random number between [−1, 1], μ is a very small constant that prevents the denominator from going to zero; here, in this paper, we take 10E − 8, and f i is the current fitness, f g is the best fitness, and f w is the worst fitness. e flowchart of sparrow algorithm operation is shown in Figure 1.

Extreme Learning Machine.
e extreme learning machine is an SLFN with faster learning speed and higher generalization capability. Assume that any N different training set (x j , t j ), x j ∈ R d , t j ∈ R m , the mathematical model of SLFN with n hidden nodes can be defined as where a i is the vector of weights connecting the i-th hidden node to the input node, b i is the threshold value of the i-th hidden node, β i is the weight vector connecting the i-th hidden node to the output node, is the output function of the i-th hidden node, and g(•) is the sigmoid activation function.
Since SLFN can approach these N training samples with zero error, equation (6) can be further defined as the following equation: where t j is the output function. In addition, equation (7) can compactly express N equations as equation (8) which is given as follows: where H is the hidden layer output matrix of the network. SLFN has been shown to have universal approximation capability, and ELM network training process can be summarized as a nonlinear optimization problem. Its input weight a i and hidden threshold b i can be assigned randomly.
Training SSFN is equivalent to finding the least squares solution β ⌢ for the linear system Hβ � T. e mathematical model of the least squares solution can be defined as where H + is the Moore-Penrose generalized inverse of the hidden layer output matrix and T is the expected output matrix.

Initial population
Calculate fitness values and sort them Update the finder position according to (3) Update the finder position according to (4) Update the finder position according to (5)

Other Recommendations.
In this paper, the SSA algorithm is optimized by Tent chaotic mapping strategy and firefly perturbation strategy, and an improved firefly chaotic sparrow algorithm is proposed. e FA-CSSA model uses the chaotic properties of the Tent mapping to initialize the population. e chaotic nature of the Tent mapping is used to make the initial population uniformly distributed in the solution space. And the firefly algorithm is used to update the optimal sparrow and sparrow flock position based on the principle that the fireflies with higher brightness in the search space can attract the fireflies with lower brightness to approach. erefore, the chaotic mapping and firefly disturbance strategy can make up for the shortcomings of the SSA algorithm that it is easy to fall into the local optimum and can enhance the algorithm's global optimization ability and robustness.

Tent Chaos Mapping Strategy.
It has been found that the goodness of the initial population profoundly affects the convergence process of the swarm intelligence optimization algorithm [39]. e SSA algorithm is a new swarm intelligence optimization algorithm proposed in 2020. erefore, the SSA algorithm also suffers from the fact that the initial populations cannot be uniformly distributed in the solution space. is can lead to a lack of population diversity in the processing of the algorithm. So, the SSA algorithm has the disadvantage of low solution efficiency and insufficient global optimization capability when solving complex optimization problems. As chaos is nonlinear, random, and ergodic [40], it can well allow the initial population to be traversed within the entire space. erefore, this paper uses the strategy of chaotic mapping to initially optimize the SSA algorithm. In contrast to other types of chaotic mappings, the Tent chaotic mapping has a simple structure and the mapping presents a more uniform density. Tent chaos mapping distribution is shown in Figure 2, and Tent chaos mapping bifurcation diagram is shown in Figure 3. is indicates that Tent chaotic mappings have strong chaotic properties, ergodicity, and iteration speed. erefore, this paper chooses the Tent chaotic map to avoid the SSA algorithm from falling into the local optimum in the iterative process.
Let the chaotic time series in the space of D dimensions be x � x n , n � 1, 2, . . . , D , and the Tent chaos mapping can be expressed as the following equation:

Firefly Disturbance Strategy.
In the firefly disturbance strategy [25], the main purpose of the light emitted by fireflies is to act as a light-signal system to attract other individual fireflies. And all fireflies follow the following three points: (1) All fireflies are attracted to fireflies that are brighter than them.
(2) e attractiveness of fireflies is directly proportional to their brightness. When a firefly approaches a firefly that is brighter than itself, the firefly's brightness decreases with distance. (3) If no brighter firefly is found than the given one, then it will move randomly.
So, the formula for the relative luminosity of fireflies can be expressed as follows: e formula for the attractiveness of fireflies can be expressed as follows: e formula for updating the position of a firefly can be expressed as follows: where I 0 is the maximum brightness of the firefly and proportional to the objective function value, c is the light intensity absorption parameter, r i,j is the distance between fireflies i and j and is the maximum attraction, x i and x j are the spatial locations where fireflies i and j are located, respectively, α is a step factor in the range [0, 1], and rand is a random number between [0, 1]. e firefly perturbation strategy is used to update the positions of the optimal sparrows and sparrow flocks to improve the search capability of the algorithm. Finally, the (1) Divide the validation data into datasets and test sets.
(2) Construct the FA-CSSA-ELM prediction model. e SSA algorithm optimized by chaos mapping strategy and firefly disturbance strategy is used to find the optimal initial weight and threshold of the ELM model. proposed is applied to the real power load transmission process. e accurate forecasting capability of the FA-CSSA-ELM load forecasting model is used to forecast real power load data. e forecast trends and results are used to provide feedback on the electricity consumption of each region to ensure maximum utilization of the electricity load. is can better achieve the purpose of saving energy and reducing consumption and reducing economic losses.

e Evaluation Functions.
In order to judge the prediction effect of different competitive models more accurately and comprehensively, in this paper, the root mean square error (RMSE), mean absolute percentage error (MAPE), mean square error (MSE), and mean absolute error (MAE) are used to verify the results. Moreover, RMSE is highly sensitive to the accuracy of the prediction. MAPE is highly expressive of the prediction. e four evaluation functions are shown in Table 1.

Power Load Feedback System for Forecasting Models.
Typically, the power load transmission process in this paper is shown in Figure 5. Firstly, the power plant transmits the power load through the 220 kV high-voltage transmission line to the first-stage substation for the first power load conversion. en, the converted power load is transmitted through the 110 kV high-voltage transmission line to the secondary substation for the second power conversion. Finally, the power load of the second conversion will be transmitted to each electricity place. e proposed FA-CSSA-ELM power load prediction model is applied to the power load conversion process of the first-stage substation. rough real-time data update and accumulation in various places, the model can be continuously learned and updated, and the prediction accuracy of the model can be continuously improved, and the dynamic balance of power generation and power supply can be achieved. In this way, relevant departments can accurately predict the changing trend of power load and accurate power load value according to the history of power load. rough accurate prediction, we can not only give reasonable suggestions and guidance to relevant departments but also make the power load distribution more reasonable and maximize the use of power resources.

Simulation Experiments
In order to better verify the predictive performance of the FA-CSSA-ELM model proposed in this paper, the combined forecasting model FA-CSSA-ELM is compared with single competing models such as ELMAN, ELM, and SVM. In order to give a more comprehensive picture of the forecasting performance of the proposed FA-CSSA-ELM model, this paper also compares it with the two combined competing models WOA-ELM and PSO-ELMAN. e simulation experimental part consists of two parts: the data description section and the simulation experimental section. e data description section introduces the data used in the simulation experiments, as well as the specific way of dividing the training set and the test set. e experimental part consists of two parts, Experiment I and Experiment II, describing the specific steps of the predicted performance tests and analyzing the results of the simulated experiments.

Presentation of Simulation Data.
is paper uses real electrical load history data of four weeks from a power grid in Shandong in 2020 as simulation data. In order to predict the electrical load data more accurately, the frequency interval for collection in this paper is 5 minutes. A total of 8064 electrical load history data were measured for 288 electrical load history data per day. e power load time series is shown in Figure 6.
From Figure 6, this paper shows that the power load data are highly nonlinear and regular.

Division of the Dataset.
e dataset is divided into two sections: the training set and the test set. e training set is used to learn and train the model, and the test set is used to verify the training effect of the model. In order to make the distribution of power loads more rational and the forecasts more accurate, in this paper, the measured 8064 real power load history data of a power grid in Shandong Province were divided into 7 time series of data subsets. e 7 data subsets are created in the chronological order from Monday to Sunday. Each time series was recorded every 5 minutes for a total of 4 days. Each day has 288 data, and each set has 1152 data. By dividing the data in this way, the prediction units in this paper have been refined from months or weeks to a specific day.
is not only improves the accuracy and relevance of the model predictions but also provides more reasonable suggestions for the allocation of power loads. is paper divides the 8064 historical power load data into 7 subsets from Monday to Sunday. So, each subset has 1152 power load history data. In this paper, the data from the first three weeks are used as the test set data and the data from the last week are used as the validator data. For example, the test set for the first subset is the data for each Monday of the first three weeks, and the validator data are the data for Monday of the fourth week. e test set for the second subset is the data from Tuesday of the previous three weeks, and the validator data are the data from Tuesday of the fourth week. e remaining subsets of test and validation sets are divided according to this pattern.
e square root of the mean of the sum of squares of the errors e average value of the absolute error between the observed value and the true value

Simulation Experiments Section.
e experimental simulation part introduces the prediction effect comparison between the FA-CSSA-ELM prediction model proposed in this paper and other competitive models.

Experiment I.
e purpose of Experiment I is to compare the performance of the FA-CSS-ELM model with that of the single prediction model. And the single prediction models include ELMAN, ELM, and SVM. In order to make the data more accurate and representative, the data in the tables of this paper are calculated by averaging 20 operations. e metrics of the four evaluation functions compared with the single competing model are shown in Table 2 (the best data are highlighted in this paper). A comparison of the data for the four indicators from the FA-CSSA-ELM model proposed in this paper with the single-competition model is shown in Table 2.
e FA-CSSA-ELM model is the most effective, followed by the ELM single-competition model. And the SVM single prediction model is the least effective. rough data comparison, we can find that the FA-CSA-ELM model is superior to the single prediction model in all indicators. For a more visual observation, a histogram of the mean of the evaluation functions for these seven datasets is also plotted in this paper to represent it. And the histogram is shown in Figure 7.

Mathematical Problems in Engineering
A comparison of the different competition model performance metric functions in Figure 7 shows that the FA-CSSA-ELM improved 72.29%, 99.8%, and 478.2% in MSE metrics compared with the other three single prediction models ELMAN, ELM, and SVM, respectively. e FA-CSSA-ELM improved by 80.3%, 18%, and 540% in the MAPE metric compared with the remaining three single prediction models ELMAN, ELM, and SVM, respectively. In the RMSE metric, the improvement is 77.8%, 14%, and 488% compared with the other three single forecasting models ELMAN, ELM, and SVM, respectively. In terms of MAE metric, the improvement is 77.2%, 15.6%, and 517% for ELMAN, ELM, and SVM, respectively. From the comparison data, the FA-CSSA-ELM model proposed in this paper is much more effective than the three representative single forecasting models compared.

Experiment II.
e purpose of Experiment II is to compare the FA-CSSA-ELM model with other representative combinatorial competition models. e combined prediction models include WOA-ELM and PSO-ELMAN. In this paper, four performance indicators are used to verify the superiority of the model. And the evaluation function pairs of the three competitive models are shown in Table 3 (the best data are marked in bold in this paper). For a more intuitive view, a histogram of the mean values of the four evaluation functions for these seven datasets is also plotted in this paper. e histogram is shown in Figure 8. It is shown in Figure 8 and Table 3 that the FA-CSSA-ELM prediction model proposed has superiority in all evaluation indicators, and it is more stable and has accurate prediction results in this paper. e PSO-ELMAN combined model, on the other hand, has the least satisfactory evaluation indexes and the lowest prediction accuracy. Although the WOA-ELM competition model also has excellent prediction results, it still does not surpass the FA-CSSA-ELM prediction model in the comparison of various evaluation indicators. Compared with the WOA-ELM model and PSO-ELMAN model, the MSE index of the FA-CSSA-ELM model increased by   And this paper can also be more intuitively analyzed from the comparison graphs of the prediction effects of the six different competing models shown in Figure 9. e combined power load forecasting model is better than the single power load forecasting model in both accuracy and stability. Among the combined models, the FA-CSSA-ELM model proposed in this paper is the most superior. e FA-CSSA-ELM forecasting model outperforms the rest of the competing models in all evaluation metrics and has strong forecasting accuracy and stability. erefore, the FA-CSSA-ELM power load forecasting model proposed in this paper can give accurate power forecasts and correct feedback to the authorities concerned.

Conclusion
In this study, we propose an FA-CSSA-ELM power load forecasting model to predict power loads accurately. First, this paper optimizes the SSA algorithm using the Tent chaos mapping strategy and the firefly perturbation strategy. en, the constructed FA-CSSA algorithm is used to optimize the initial thresholds and weights of the ELM model. Finally, the FA-CSSA-ELM power load forecasting model is compared with three single forecasting models and two combined forecasting models. e forecasting effect is visualized through the 4 evaluation functions and the corresponding histograms.
e following conclusions can be obtained through the simulation experimental validation of real power load data from a power grid in Shandong.
By comparing the FA-CSSA-ELM power load forecasting model with three typical single power load forecasting models, this paper finds that the FA-CSSA-ELM improved 72.29%, 99.8%, and 478.2% in MSE metrics compared with the other three single prediction models ELMAN, ELM, and SVM, respectively. e FA-CSSA-ELM improved by 80.3%, 18%, and 540% in the MAPE metric compared with the remaining three single prediction models ELMAN, ELM, and SVM, respectively. In the RMSE metric, the improvement is 77.8%, 14%, and 488% compared with the other three single forecasting models ELMAN, ELM, and SVM, respectively. In terms of MAE metric, the improvement is 77.2%, 15.6%, and 517% for ELMAN, ELM, and SVM, respectively. From the comparison data, the FA-CSSA-ELM model proposed in this paper has a much better prediction effect than the three representative single prediction models.
It can be found from Experiment I that the performance of the FA-CSSA-ELM prediction model is far superior to that of the three single prediction models. en, WOA-ELM and PSO-ELMAN combination models are compared through Experiment II. Compared with the WOA-ELM is further indicates that the FA-CSSA-ELM power load forecasting model has higher forecasting accuracy and performance.
e FA-CSSA-ELM prediction model can provide more accurate feedback to relevant departments. Relevant departments can guide the rational layout of the power system through accurate feedback so as to reduce the waste of power load and the economic loss of the industry.

Data Availability
No data were used to support this study.