A neural network model-based approach for power data collection and load forecasting accuracy improvement
Publié en ligne: 23 sept. 2025
Reçu: 17 janv. 2025
Accepté: 28 avr. 2025
DOI: https://doi.org/10.2478/amns-2025-1107
Mots clés
© 2025 Yiran Li, published by Sciendo
This work is licensed under the Creative Commons Attribution 4.0 International License.
Processes and problems of traditional power collection operation and maintenance. The traditional power collection operation and maintenance process mainly relies on manual periodic inspection, onsite meter reading and fault troubleshooting, and this model has obvious problems and limitations [1–2]. Data collection relies on manual meter reading, which is inefficient and error-prone, and fails to realize real-time data updating [3]. Fault detection is usually lagging behind, relying on occasional encounters with users’ reports or regular inspections, and lacks proactive early warning mechanisms [4]. Furthermore, O&M decisions are based on empirical judgment more than data analysis, with slow response time and inflexible resource deployment [5–6]. Paper records and manual data entry methods are not only time-consuming and laborious, but also affect the accuracy and traceability of data [7]. Efficiency bottlenecks in power collection operation and maintenance. The efficiency bottleneck in power collection operation and maintenance is mainly reflected in several core aspects, low efficiency of data collection and transmission, due to the reliance on manual operation and wired communication, data acquisition is not timely and susceptible to geographical constraints, followed by analysis and decision-making hysteresis, the lack of intelligent tools to support a large amount of data is not integrated and analyzed efficiently, it is difficult to quickly identify the potential faults and optimization strategies [8–10]. Furthermore, the response time of operation and maintenance is long, and the fault handling relies on manual scheduling and dispatching, which is not rapid enough, affecting the continuity of power supply and customer satisfaction, as well as irrational resource allocation. Due to the lack of resource optimization model from a global perspective, the operation and maintenance resources are often over-allocated or idle, resulting in a waste of resources [11–13].
The introduction of digital technology has led to a radical change in power collection operation and maintenance work, which has fundamentally cracked the problem of the efficiency of the traditional operation and maintenance model, which is specifically manifested in the automatic collection and remote transmission of data based on intelligent sensors and Internet of Things (IoT) technology, so that the real-time and accuracy of data acquisition have been greatly improved [14–15]. The application of big data analysis and machine learning algorithms to massive data enables predictive maintenance of faults before they occur, rather than just reactive response, thus reducing outage time and operation and maintenance costs [16–18]. At the same time, the integration of cloud computing platforms brings powerful capabilities for data processing and storage, as well as facilitates flexible scheduling and optimal allocation of resources, so that the level of intelligence in O&M decisionmaking has been greatly improved. The establishment of mobile applications and digital workflow has greatly simplified the process of assigning and tracking O&M tasks, which has greatly improved the efficiency of team collaboration [19–21]. On the other hand, power load forecasting is an important part of power system planning and operation, which is of great significance for ensuring the safe and stable operation of the power system. Traditional power load forecasting methods mainly include regression analysis, time series analysis, etc., but these methods are difficult to effectively capture the nonlinear and time-varying characteristics of power load [22–23]. In recent years, artificial neural networks have been widely used in the field of power load forecasting with their powerful nonlinear mapping ability and self-learning ability [24].
The stable and normal operation of power grid is important for social and economic development and life, and the research on normal operation of power grid mainly involves, data collection and analysis of power grid operation, fault location and analysis, power load prediction, and operational stability assessment. Literature [25] designed a unified data collection and prediction model with deep neural network as the infrastructure, which has higher accuracy and efficiency compared with other data collection and prediction models. Literature [26] designed a fault intelligent analysis system for electric energy data collection network based on cloud computing technology model, which has good fault analysis and localization functions and reduces the supervision cost of electric power operation. Literature [27] proposed an electric load planning and demand response program with reference to the theory of convolutional neural network, which can efficiently and accurately forecast electric loads based on current parameters. Literature [28] conceptualized a data-driven strategy for wind power forecasting with a gated recursive deep learning framework and found in simulation experiments that the strategy can achieve forecasting of wind power operations at minimal cost. Literature [29] envisioned a transient stability assessment framework incorporating convolutional neural network theory trained with power system data, which performed well in simulated numerical tests. Literature [30] aims to realize the recognition and classification of power grid attacks, and builds a deep neural network model using machine learning algorithms, and it has been highly evaluated in evaluation tests with excellent network attack recognition accuracy.
And in the direction of power load forecasting research, scholars have actively carried out thinking and research, and have gained greater progress, and the core theoretical ideas mainly used include artificial neural networks, interpretable causal neural networks, machine learning algorithms, etc. Literature [31] conceptualized a hybrid artificial neural network-based residential electricity consumption prediction strategy and tested it in conjunction with a large database to confirm the effectiveness of the proposed strategy. Literature [32] introduced an interpretable causal graph neural network in an electricity demand forecasting model and extensively validated it on a collection of household and distribution level electricity demand data to corroborate the sophistication of the proposed approach. Literature [33] combines a hybrid power load forecasting system optimized with improved empirical modal decomposition, autoregressive integral moving average and fruit fly optimization algorithms and conducts simulation experiments, revealing that the model has better forecasting accuracy compared to the traditional power load forecasting model. Literature [34] describes the importance of short-term power load forecasting and designs a short-term power load forecasting system based on machine learning algorithms as the underlying logic, which has a more favorable forecasting performance compared to the traditional neural network forecasting model. Literature [35] designed a model adapted for small building site power load forecasting with the innovation of introducing a new feature selection algorithm and a hybrid engine, and confirmed the effectiveness of the proposed model in practical tests. Literature [36] used machine learning strategies such as Artificial Neural Networks, Multiple Linear Regression, Adaptive Neuro-Fuzzy Inference Systems and Support Vector Machines to simulate and forecast the demand for electricity in Cyprus, and found that the Support Vector Machines and Artificial Neural Networks have a better and more reliable forecasting accuracy compared to other methods.
This paper firstly discusses the classification of power load forecasting in order to determine the categories of power load forecasting cycles and summarizes the characteristics of load sequences. Examples of power loads are analyzed mainly in terms of time factors and meteorological factors, so as to form a preliminary judgment on different types of factors affecting power loads. Then the data are preprocessed by outlier correction, missing value filling, normalization and other preprocessing, and the nearest-neighbor mean-averaging method is proposed to fill in the missing data. Three error evaluation indexes are selected to analyze the advantages and disadvantages of the model. On this basis, the article uses the Long Short-Term Memory (LSTM) neural network to model the load data for prediction and introduces the Particle Swarm Algorithm (PSO) to optimize the parameters in the model. Finally, the optimized PSO-LSTM model is used to predict the electric load and compare the prediction results of recurrent neural network and long short-term memory neural network models.
Power load characteristic refers to a characteristic presented through the intrinsic change characteristics of power load data. Power load sequence is a series of real-time changes in the data, time is the cycle of replacement, even if the interference of a variety of external factors, the power load will always be within a certain time frame, such as days, weeks, months and years as a unit to show a certain cycle regularity, power load sequence characteristics can be summarized as follows:
Periodicity Power load according to the day, week, month and year and other different time scales for the collection of data, and thus the sample data has a chronological nature. Take the daily periodicity and weekly periodicity of the load sequence as an example for analysis, in which the daily periodicity is based on a sampling period of 1 day, and the daily load trend adjacent to each other has similarity. The experimental analysis is carried out with the electric power load from March 3 to March 5, 2023 in City A, Province A. The daily periodicity curve of electric power load is shown in Fig. 1 (Fig. a is the load curve on April 3, 2023, and Fig. b is the load curve from April 3 to 5). Subfigure (a) daily load curve presents “three peaks and three valleys” in line with people’s normal work-life rhythm of electricity demand. From sub-figure (b), it can be seen that the load curves of neighboring days are similar on the same time axis, and the load size may be different every day, but the load value at the same time of each day is closer, which proves the daily periodicity of the load. The weekly periodicity of the load can be inferred from the daily periodicity, which is a sequence of loads in terms of a seven-day week. The power load of four consecutive weeks from March 3 to March 30, 2023 in City A, Province A is analyzed experimentally to verify that there is a similarity characteristic between adjacent weeks. Sampling every 15 minutes, a total of 672 data per week, the load curve of four consecutive weeks in March 2023 is shown in Fig. 2 (Figs. a~d represent the first to fourth weeks, respectively), the overall trend of change between weeks and weeks during March has similarity, compared with the rest day, the electrical energy consumption on weekdays is higher than that of the rest day in the four different weeks, and the same type of power consumption has similarity in the different weeks The same type of power consumption has similarity in different weeks, and the load values at the same moments are slightly different from each other, with little difference overall. By analogy, the load sample data with monthly and yearly sampling periods are also periodic.

The daily periodic curve of the power load

Continuous peripheral load curve
Electricity load series are no longer data representations in the traditional sense, but are composite results mapped under the interference of multiple extrinsic factors. If the influence of these external factors on the load series is ignored, it is impossible to determine whether the role of the influencing factors contributes to the improvement of forecasting accuracy. Therefore, there is a need to explore the degree of positive effect of various types of influencing factors on the load series presentation and to filter out the best influencing factors. This section focuses on the experimental analysis of the load series with the time factor and meteorological factor as the main factors.
The time factor is selected according to the different time nodes of the power load, and the impact of holidays, working days, rest days and seasonal factors on the load sequence is specifically analyzed. Analysis of the impact of holidays on the load Taking May Day labor as an example, the load before and after the holiday is selected for comparison in order to analyze the impact of holidays on load changes, the daily electricity load of April 28 (working day), May 1 (holiday) and May 4 (rest day) in City A in 2023 is selected for comparative analysis, and the load curve of May Day holiday is shown in Figure 3. Intuitively seen from the figure, the overall trend of electricity consumption on holidays is obviously similar to that of non-holidays, but compared with the electricity consumed by people before and after the adjacent holiday, the overall trend of electricity consumption during the holiday period is decreasing, on the one hand, depending on the length of the holiday holiday, and on the other hand, there is a holiday effect, which leads to the rise of the tourism boom, resulting in a substantial reduction in industrial electricity consumption. Compared to the pre-holiday working days, the holiday electricity consumption is closer to the post-holiday rest days. Analysis of the impact of weekdays and days off on loads The load data from March 3 to March 9, 2023 in City A is selected for analysis, with 15-minute sampling interval, and a total of 96 points of load values are sampled every day, and the load curves from April 3 to April 9, 2023 are shown in Fig. 4. March 3 to March 7 are from Monday to Friday, which is set as a working day, and are in a working state, and the overall demand for electricity increases, and the overall power consumption shows an upward trend. Setting 8 to 9 as a rest day, in the rest state, electricity demand overall decreases, the overall rest day power consumption is generally lower than the working day. Analysis of the impact of seasons on load The load trend of a weekday with the largest average daily load on a certain day in January, April, July, and December 2023 in City A is analyzed, which are the representative months of winter, spring, summer, and fall, respectively, with a sampling unit of 15 min and 96 sampling values per day. The load curve of a weekday in four seasons is shown in Figure 5. It can be seen that the overall trend of the power load in spring, summer, fall and winter is the same, and the daily load characteristics have the same “three peaks and three valleys” characteristics. The power consumption of power load in four seasons shows obvious different values, the key depends on the influence of the temperature of the four seasons, spring and fall climate is pleasant, the temperature is suitable, the fall is in the middle of summer and winter, the temperature is greater than the spring changes, its power consumption is slightly higher than the spring, but spring and fall seasons on the overall trend of the change of the power load has a smaller impact. The summer and winter seasons are affected by the temperature is greater, a hot and cold, are beyond the human body surface can accept the temperature range, the need to set up additional temperature control power consumption equipment, increasing the amount of electricity consumption. Seasonal power consumption in descending order: summer is greater than winter is greater than fall is greater than spring, the power load will be subject to seasonal influences for a long time.

The load curve of the five holidays

Load curve

Four seasons of a working day load curve
Meteorological factors mainly reflect the existence of various weather factors within a certain time frame, such as temperature, wind speed sunshine, rain and snow and other meteorological states. Compared to other meteorological factors, temperature has the most influence on power loads. When the temperature exceeds the threshold range acceptable to the human body, it directly affects the frequency of use of temperature-regulating power-consuming equipment, which in turn affects the demand for power load. The change of average daily load versus temperature in summer (June 1, 2023 to August 31, 2023) in City A is taken as an example for experimental analysis, and the curve of the change of average daily load versus temperature in summer is shown in Figure 6. As visualized from the graph, the overall trend of temperature has similarity with electrical load. Summer temperature and power load are positively correlated, in the summer the higher the temperature, the greater the consumption of electricity, the use of temperature control power-consuming equipment frequency increases. Conversely, the lower the temperature, the lower the electrical energy consumption. Temperatures were generally higher in July and August relative to June, with the highest temperatures and highest electrical energy consumption in late July and early August.

Summer daily load and temperature change curve
An indispensable part of the power load forecasting research process is the preprocessing of raw data. The load data preprocessing process is shown in Figure 7.

Preprocessing flowchart
In the process of data acquisition or due to mechanical failure of the acquisition equipment, or due to human error, the raw data contains a lot of noise, which can also greatly affect the quality of load data. Noise in load data mainly includes missing data and data abnormality. Missing data processing For missing values, three ways are usually used: deletion, no processing or technical filling. The first two ways can increase the accuracy to some extent when the load data volume is large and the missing values are small. However, for a small amount of data, or in the case of a short forecast period and a large number of missing data, the use of these two ways will seriously affect the objectivity of the forecast results. According to the power load data sample exists a certain periodicality, in the face of missing data in the case of the nearest neighbor mean average method for technical filling, as shown below. Where, Abnormal data processing Level correction method Load data is generally a continuous smooth sequence curve. When a moment and the adjacent moments before and after a large difference in the data beyond the normal threshold, the level of processing can be corrected, as shown below:
Then:
Where, Vertical processing method Due to the characteristics of the load data, the two corresponding data are closer in the vertical scale. In the data of this paper, the difference of the load at the same moment in the same day type is very small, such as the difference is too large is judged to be bad data, can be corrected by vertical processing method, as shown below:
Then:
where
After the anomalous data has been corrected, the data should then be standardized by unifying the magnitude in some form, and this form of operation is called data normalization. Data normalization can reduce the model gradient explosion, so that the operation is faster. Commonly used min-max for normalization, as shown below:
Where:
In order to make the subsequent results more stable, the inverse normalization is also performed after the training is completed, as shown below:
Raw data quality
Because power load data has randomness, volatility and diversity. If some special circumstances occur in the process of data collection leading to poor data quality, it will certainly affect the model training effect.
Data analysis
Because the power load is affected by too many factors, some factors are regular and can be identified and analyzed, but there are also some influencing factors are very random. So it is very important to find out the main relevant influencing factors and analyze them to determine the input variables of the model, which can strengthen the generalization ability of the model.
Model Design
The field of machine learning involves a wide range, each model has its advantages and disadvantages, and in the process of adjusting the parameters of the specific model will inevitably produce some problems, which will also lead to the accuracy of the prediction model.
For the field of short-term electricity load forecasting, the following three error evaluation metrics are commonly used for comparison, namely, Mean Absolute Percentage Error (MAPE), Mean Absolute Error (MAE), and Root Mean Square Error (RMSE), and the error evaluation metrics are as follows:
The RMSE root mean square error is kept in the same order of magnitude as the true value, and the larger the value of RMSE, the larger the error. It is a more intuitive measure of the deviation between the predicted and true values.
MAPE mean absolute percentage error is normalized for each point, in the form of a percentage of the performance and the true value of the gap, and MAPE can effectively reduce the impact of outliers, the value range is [0,+∞), the smaller the value of the MAPE error, indicating that the model prediction accuracy is higher.
MAE average absolute error counts the deviation between the observed value and the average value, mainly observes the degree of dispersion, the larger the value, the larger the error.
LSTM as a variant of RNN possesses the same underlying structure as RNN. In the internal composition, to address the pain point that it is difficult to predict the information of longer historical data, the method of adding the preservation of long-term useful cell states in the hidden layer c is adopted to optimize the performance of the model under long time sequences [37]. The network topology of the RNN and the network topology of the LSTM are shown in Fig. 8.

Topology comparison of RNN and LSTM
Where
The neurons in the hidden layer of RNN are replaced by memory cells and three gates in LSTM: “input gate”, “output gate” and “forget gate”. The “gate” is similar to a valve that controls the inflow and outflow of information, which is mainly an activation function composed of the tanh function and sigmoid function, which maps the retention level of the input data to the range of 0~1. When the retention level is zero, all the current information is forgotten. When it is zero, all current information is discarded, and when it is one, it means that all current information is retained if it is more important.
The specific structure of the input gate LSTM is shown in Fig. 9:
Forgetting gate The main task of the forgetting gate is to remove redundant data, and the degree of forgetting in LSTM is Where: Input Gate The main function of the input gate is to selectively retain the information of the current input, and the information that can be left by the input gate consists of two parts: the input Input gate Where: Output gate The output gate is responsible for controlling the output of the current moment to flow into the state of the neuron in the next moment. When the value is closer to 1, the current moment’s state has more weight in the output result. The formula for output gating:
Where: The internal memory unit will update the previous moment’s state to The updated cell state From the derivation of the formula, the output of the LSTM depends on (1) the input of the current moment (2) the memory cell unit [38]. By controlling the input information through the gating mechanism, it can remove the redundant information so that the important information in the history can be preserved, and also avoid the occurrence of gradient vanishing and explosion class problems in RNN, which can better meet the practical production requirements.

LSTM neural network structure
By disassembling the structure of LSTM above, we can see that the advantages of LSTM are mainly manifested in:
Through the “gate” control structure, it has a good “memory” for important information, which can effectively prevent the gradient disappearance phenomenon of RNN over time, and can deal with long time sequence data. Better learn the effective information in the time series, and can build a model with better fitting effect. Better generalization ability. Besides, LSTM has some defects of its own: There is no scientific method to determine the model parameters, and the selection of key parameters has a great impact on the effect of LSTM prediction, the current several important parameters mainly rely on empirical methods or multiple attempts to determine. Due to more parameters, it will bring the problem of rising training difficulty to the model, and increase the possibility of adding overfitting.
Particle Swarm Algorithm (PSO) benchmarks the behavior of searching for optimal solutions in the solution space with that of birds searching for food in the foraging space and finds a common ground. The particles can mimic the birds foraging in the space, foraging for physical objects by changing the position and direction, and matching the corresponding concepts, the correspondence between the particle swarm algorithm and the bird foraging concepts is shown in Figure 10.

Correspondence diagram
When using the PSO algorithm to find an optimal solution, the algorithm treats the optimal solution as the location of an ideal point. When the point moves at a certain speed in the domain, its speed of movement can be changed at any time based on the experience of moving a single point or multiple points. Two parameters are adjusted each time the ideal point is optimized: the individual optimal solution
The velocity and position update equations for the
In Eqs.
Establishing an optimal set of parameters: the number of neurons in the hidden layer, the learning rate, the step size and the number of training iterations are more central issues in the prediction of heat load data using long and short-term memory neural networks. However, uncertainty enlarges the complexity of the solution process due to the diversity of model parameter selection [39]. At this point, the problem can be viewed as an optimization problem - finding the solution to the four parameters that makes the model optimal.
Optimization of some of the network parameters of the LSTM model by the PSO algorithm can both improve the efficiency of the current manual parameter optimization as well as obtain better optimization results. Finally, based on these key parameters, the LSTM model is adjusted and optimized using PSO.
The initial weights of the LSTM model are optimized in short-term heat load forecasting to enhance its promotional performance. The process of PSO to optimize the initial weights of the LSTM model is shown below:
Particle swarm parameter initialization. Determine the optimization search parameters and range. Select particle evaluation coefficients, and in this paper, the root mean square error is selected. Where Calculated, evaluated fitness values. Update Determine whether the stopping condition is satisfied, or continue to repeat 2~5 Assign the optimal solution to the short-term heat load prediction model of the heat exchange station [40].
The final output parameters are 128 number of hidden layer neurons, 400 time steps, 0.0001 learning rate, and 3000 iterations. The trained PSO-LSTM model was used to generate the prediction data for one day and one week in the future, and the number of predicted data (predict_steps) was 24 (24*1) and 168 (24*7), respectively. The final experimental results obtained, PSO-LSTM prediction results are shown in Table 1. And the prediction results are plotted according to the experimental data results.The results of PSO-LSTM model predicting one day and one week in the future are shown in Figure 11 and Figure 12.

The PSO-LSTM model predicts the future of the day

The PSO-LSTM model predicts the outcome of the next week
PSO-LSTM prediction results
Time | Primordial | PSO-LSTM | Time | Primordial | PSO-LSTM |
---|---|---|---|---|---|
1 | 0.18651 | 0.16131 | 51 | 0.18943 | 0.21547 |
2 | 0.11709 | 0.14586 | 52 | 0.14074 | 0.196 |
3 | 0.10167 | 0.11327 | 53 | 0.23454 | 0.21433 |
4 | 0.09451 | 0.12609 | 54 | 0.31057 | 0.26182 |
5 | 0.1735 | 0.16595 | 55 | 0.39798 | 0.34969 |
6 | 0.22614 | 0.23707 | 56 | 0.51756 | 0.50476 |
7 | 0.35984 | 0.37544 | 57 | 0.58365 | 0.56266 |
8 | 0.49163 | 0.51331 | 58 | 0.60224 | 0.59941 |
9 | 0.55507 | 0.55107 | 59 | 0.59857 | 0.61586 |
10 | 0.62829 | 0.60283 | 60 | 0.66402 | 0.61923 |
11 | 0.62359 | 0.59385 | 61 | 0.63963 | 0.66314 |
12 | 0.62275 | 0.61131 | 62 | 0.55739 | 0.57906 |
13 | 0.62297 | 0.58104 | 63 | 0.55153 | 0.59745 |
14 | 0.527 | 0.57762 | 64 | 0.54297 | 0.56606 |
15 | 0.5259 | 0.54649 | 65 | 0.53748 | 0.53421 |
16 | 0.51742 | 0.52817 | 66 | 0.49346 | 0.51853 |
17 | 0.50561 | 0.52548 | 67 | 0.51989 | 0.50143 |
18 | 0.51751 | 0.49089 | 68 | 0.50286 | 0.54285 |
19 | 0.49181 | 0.49821 | 69 | 0.57935 | 0.54408 |
20 | 0.49949 | 0.53154 | 70 | 0.51685 | 0.466 |
21 | 0.5618 | 0.53768 | 71 | 0.37535 | 0.38682 |
22 | 0.50039 | 0.52424 | 72 | 0.3052 | 0.31489 |
23 | 0.42115 | 0.36236 | 73 | 0.2485 | 0.22702 |
24 | 0.31385 | 0.26561 | 74 | 0.18677 | 0.17983 |
25 | 0.25403 | 0.24648 | 75 | 0.23376 | 0.17302 |
26 | 0.20954 | 0.17983 | 76 | 0.19633 | 0.16765 |
27 | 0.23536 | 0.17068 | 77 | 0.22679 | 0.20861 |
28 | 0.19264 | 0.20642 | 78 | 0.27111 | 0.27921 |
29 | 0.19882 | 0.20313 | 79 | 0.38858 | 0.35508 |
30 | 0.25472 | 0.25769 | 80 | 0.50631 | 0.47088 |
31 | 0.40847 | 0.422 | 81 | 0.50173 | 0.53097 |
32 | 0.48926 | 0.52585 | 82 | 0.57101 | 0.5497 |
33 | 0.58065 | 0.57998 | 83 | 0.59557 | 0.61762 |
34 | 0.63006 | 0.59915 | 84 | 0.64797 | 0.60274 |
35 | 0.58676 | 0.63386 | 85 | 0.62968 | 0.59875 |
36 | 0.64643 | 0.62202 | 86 | 0.58396 | 0.54544 |
37 | 0.64889 | 0.63288 | 87 | 0.59741 | 0.57299 |
38 | 0.56723 | 0.57818 | 88 | 0.53433 | 0.53273 |
39 | 0.55761 | 0.53378 | 89 | 0.56715 | 0.5431 |
40 | 0.51464 | 0.52248 | 90 | 0.50474 | 0.45821 |
41 | 0.52481 | 0.54811 | 91 | 0.49323 | 0.5101 |
42 | 0.48168 | 0.52841 | 92 | 0.51915 | 0.49832 |
43 | 0.51129 | 0.46284 | 93 | 0.57921 | 0.51791 |
44 | 0.50028 | 0.53289 | 94 | 0.4694 | 0.47481 |
45 | 0.59222 | 0.56132 | 95 | 0.41921 | 0.41015 |
46 | 0.52914 | 0.48675 | 96 | 0.32486 | 0.29833 |
47 | 0.38721 | 0.37325 | 97 | 0.28281 | 0.25465 |
48 | 0.32958 | 0.32154 | 98 | 0.1786 | 0.19928 |
49 | 0.25524 | 0.24201 | …… | …… | …… |
50 | 0.2046 | 0.19786 | 168 | 0.2169 | 0.21781 |
A comparison of the PSO-LSTM model prediction results for one day is shown in Figure 13. The comparison shows that RNN model, LSTM model, PSO-LSTM model can predict the trend of one day (24h) power load data, although the three models are more accurate in predicting the results, but the comparison shows that the PSO-LSTM model is the most accurate in predicting the results.

The PSO-LSTM model predicts a day of comparison
Comparison of one-day results of PSO-LSTM model prediction is shown in Fig. 14. The comparison shows that RNN, LSTM and PSO-LSTM models can predict the trend of power load changes in the next five days (weekdays) and the prediction results are more accurate. However, the gradient vanishing disadvantage of the recurrent neural network model is obvious in the prediction of Saturday and Sunday (rest day), and it still predicts the data of two days of Saturday and Sunday according to the trend of power load change on weekdays, and there is a large error compared with the real results. Compared with the RNN model LSTM, PSO-LSTM model does not have the phenomenon of gradient disappearance, the advantage of the memory ability of the long period data is reflected, and it can accurately predict the change trend change of the power load data on Saturday, Sunday and normal weekdays, and at the same time the comparison results can be seen that the prediction results of the PSO-LSTM model are closer to the real data and the prediction results are more accurate.

The PSO-LSTM model predicts a day of comparison
The prediction error is represented by the model loss value (the mean square deviation of the error between the true value and the predicted value), in the experiment the training data is fed into the network for 3000 iterations, and with the increase in the number of iterations the loss values of different models can be obtained. The loss values of different models are shown in Table 2. From the table, the loss value of the final recurrent neural network model is 0.34905, which is larger than the loss value of the long short-term memory neural network model of 0.20404, while the final loss value of the PSO-LSTM model is 0.1962, which is the smallest, i.e., the prediction result of the PSO-LSTM model is the most accurate.
Different model loss values
Iteration number | RNN | LSTM | PSO-LSTM | Iteration number | RNN | LSTM | PSO-LSTM |
---|---|---|---|---|---|---|---|
1 | 78.67527 | 43.2962 | 42.36194 | 1601 | 0.89698 | 0.47853 | 0.41502 |
101 | 42.44801 | 10.79734 | 7.30219 | 1701 | 0.89135 | 0.82218 | 0.54316 |
201 | 15.22501 | 5.05437 | 2.3731 | 1801 | 0.60634 | 0.57307 | 0.43421 |
301 | 6.24314 | 2.21514 | 1.60676 | 1901 | 0.74373 | 0.66735 | 0.52725 |
401 | 8.16502 | 1.19442 | 1.21793 | 2001 | 0.96443 | 0.77352 | 0.58641 |
501 | 4.87227 | 1.59874 | 1.02371 | 2101 | 0.526 | 0.50255 | 0.38669 |
601 | 1.63241 | 0.862 | 0.58116 | 2201 | 0.71479 | 0.67203 | 0.43595 |
701 | 1.27819 | 0.7606 | 0.69419 | 2301 | 0.5096 | 0.43901 | 0.39459 |
801 | 1.30943 | 0.50601 | 0.42087 | 2401 | 0.6232 | 0.46931 | 0.23918 |
901 | 0.8181 | 1.01908 | 0.59515 | 2501 | 0.62649 | 0.58077 | 0.41896 |
1001 | 0.73823 | 0.60342 | 0.33513 | 2601 | 0.73184 | 0.66491 | 0.33267 |
1101 | 0.65579 | 0.57555 | 0.46369 | 2701 | 0.49047 | 0.20363 | 0.22886 |
1201 | 0.72981 | 0.58097 | 0.55145 | 2801 | 0.40685 | 0.34304 | 0.26968 |
1301 | 0.90479 | 0.5165 | 0.35502 | 2901 | 0.4446 | 0.27034 | 0.23535 |
1401 | 0.63814 | 0.29595 | 0.35681 | 3000 | 0.41062 | 0.23253 | 0.24206 |
1501 | 0.71033 | 0.68427 | 0.50759 | 3100 | 0.34905 | 0.20404 | 0.1962 |
This paper implements a power data collection and load forecasting accuracy improvement method from algorithm optimization. The research results have higher prediction accuracy, which is of strong practical value for the power management department in carrying out local or large-scale short-term power load forecasting, power dispatching and other work. By using the optimized parameters of the particle swarm algorithm to predict the power load data, the final loss value of the model is 0.1962, which compares with the final loss value of 0.20404 of the long and short-term memory neural network model, proving that the optimized model has a higher prediction accuracy.