An improved long-nosed raccoon algorithm-based power load optimal value prediction method
By improving the Long-nosed Raccoon algorithm and combining Gaussian perturbation and Levy flight strategy to optimize the power load prediction model, the problems of population convergence degradation and local optima in the existing technology are solved, and high-precision power load prediction is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NORTHEAST FORESTRY UNIV
- Filing Date
- 2025-07-21
- Publication Date
- 2026-04-28
AI Technical Summary
Existing technologies for power load forecasting suffer from problems such as population convergence degradation, susceptibility to local optima, and insufficient global search performance, resulting in low prediction accuracy and poor generalization ability.
An improved Long-Nosed Raccoon algorithm is adopted. By constructing an electricity load prediction model and optimizing the objective function of electricity load prediction error based on fitness, combined with Gaussian perturbation and Levy flight strategy, individual position updates and iterative optimization are performed, and finally the optimal load prediction value is output.
It improves the accuracy and global search performance of power load forecasting, and can accurately determine local optima in high-dimensional load forecasting, thereby enhancing the stability and generalization ability of the forecasting model.
Smart Images

Figure CN120879547B_ABST
Abstract
Description
Technical Field
[0001] This invention specifically relates to a method for predicting the optimal value of power load based on an improved long-nosed raccoon algorithm. Background Technology
[0002] Accurate load forecasting plays a crucial role in the planning and economic operation of smart power systems. Load forecasting involves using known electricity demand conditions, along with system operating characteristics, capacity expansion decisions, and relevant economic, political, and climate factors, to predict load data for a specific future time, while meeting accuracy requirements. Load refers to the demand for electricity. The purpose of load forecasting is to understand the annual electricity usage plans and load development levels of each power supply area. Load forecasting is an important criterion for the medium- and long-term development planning of the power grid. Load forecasting remains a very complex task. Given the current state of power development, one important criterion for judging whether a power company has achieved modernization is its load forecasting capabilities. The specific role of power system load forecasting can be determined by the length of the forecast period. Generally, it can be divided into four types: ultra-short-term, short-term, medium-term, and long-term. Medium- and long-term load forecasting typically refers to load forecasts for the next 5-10 years. Medium- and long-term load forecasting helps in formulating power source construction plans, power grid expansion and renovation plans, and is of great significance for the installation of new generating units.
[0003] Traditional methods such as time series analysis and artificial neural networks have achieved certain results in some application scenarios, but they still face problems such as low prediction accuracy and poor generalization ability when dealing with load data with strong nonlinearity, time-varying and uncertainty characteristics.
[0004] For a long time, the core issue of focus and research in the field of load forecasting has been the technical methods of forecasting, or rather, the mathematical models of forecasting. Although these models and methods are advanced, even the most complex mathematical models cannot accurately describe load changes. Load forecasters commonly encounter the following problems in their practical work:
[0005] 1) Differences in understanding complex mathematical models and formulas, and the ability to translate theory into practice, lead to confusion and inability to operate prediction models and algorithms. In practice, they still rely on the total regional load as a basis, using personal feelings and experience to predict the next day's load curve.
[0006] 2) The classification of regional loads is still limited to industry classification. When the shape of the load curve changes, it is not possible to classify it as being caused by any type of load change, nor is there a specific quantitative value for the impact on the load.
[0007] In recent years, with the continuous development of swarm intelligence optimization algorithms, researchers have gradually introduced biological behavioral mechanisms with high cooperative efficiency into optimization models to improve the parameter optimization effect and structural adaptability of prediction models. These algorithms have been widely used in the model optimization process of power load forecasting. However, existing swarm intelligence optimization algorithms generally suffer from the following deep-seated problems:
[0008] 1) Population diversity deteriorates. During the iteration process, individuals tend to cluster around the current optimal solution, which reduces the overall search range of the population and thus loses the ability to effectively explore other regions of the solution space.
[0009] 2) Lack of a mechanism to escape local optima. Most algorithms adopt a greedy strategy in updating rules, only retaining individuals with better fitness and ignoring the role of inferior solutions in building search diversity. As a result, the algorithm lacks effective perturbation methods in the later stages of convergence, making it difficult to escape from the current convergence region and search for new global optimal paths.
[0010] 3) Insufficient global search performance and poor dynamic adaptability: Most current algorithms use static parameters to control the search range, lacking an adaptive adjustment mechanism for the population state. This makes it difficult for the algorithm to dynamically balance global search and local development according to the needs of the search stage, especially in the mid-to-late stages where it is prone to search fatigue and cannot continue to improve the quality of the solution.
[0011] In summary, existing technologies are insufficient to address the problems of population convergence degradation, susceptibility to local optima, and inadequate global search performance in high-dimensional load prediction modeling. Summary of the Invention
[0012] To overcome the shortcomings of existing technologies, a method for predicting optimal power load based on an improved Long-Nosed Raccoon algorithm is proposed to solve the above problems.
[0013] An optimal load prediction method based on the improved Long-Nosed Raccoon algorithm is proposed. The optimal load prediction method involves constructing an optimal load prediction model and its corresponding optimization fitness objective function, and then using the Long-Nosed Raccoon algorithm to process the optimal load prediction model and the objective function to obtain the optimal load prediction value under the maximum number of iterations.
[0014] As a preferred option, the optimal power load prediction method includes the following steps:
[0015] S1: Constructing and forming a power load forecasting model;
[0016] S2: Construct the objective function for the power load forecasting error corresponding to the optimized fitness of the power load forecasting model;
[0017] S3: The objective function for power load prediction error is initialized based on the improved Long-Nosed Raccoon algorithm. The fitness values of all individuals in the objective function are calculated. The current optimal individual parameter is determined and retained from the fitness values of all individuals. The optimal individual parameter is then updated using the improved Long-Nosed Raccoon algorithm. After determining the position of the optimal individual, the number of iterations of the optimal individual parameter is determined. When the position of the optimal individual parameter reaches the maximum number of iterations, the optimal individual parameter during the iteration process is output. When the position of the optimal individual parameter does not reach the maximum number of iterations, the iteration continues until the maximum number of iterations is reached, and then the optimal individual parameter during the iteration process is output.
[0018] S4: Input the optimal individual parameters into the optimal individual to construct the power load prediction model, and then output the prediction result as the optimal load prediction value.
[0019] As a preferred option, the construction process of the power load forecasting model involves preprocessing the raw power load data and then constructing an extreme learning machine structure through feature selection and input. Specifically:
[0020] S11: Data Preprocessing: Data preprocessing includes sequentially handling missing values, removing outliers, and normalizing the raw power load data.
[0021] S12: Feature selection and input construction: The feature selection and input construction process adopts a sliding window strategy to construct input and output samples, taking the load values of the past n time points as input data and the load value corresponding to each of the n time points as output data;
[0022] S13: The process of establishing the Extreme Learning Machine (ELM) structure. The ELM structure has L hidden layer nodes. The input layer weights and biases are randomly initialized, and the output weights are used as the optimization object to construct a complete input matrix and output vector.
[0023] As a preferred approach, the specific steps for constructing the objective function for power load forecasting error are as follows:
[0024] S21: The mean absolute percentage error is used as the fitness correspondence function of the power load forecasting model, which is the objective function of the power load forecasting error. The objective function of the power load forecasting error is used to measure the relative error between the forecast value and the actual load. The calculation formula is as follows:
[0025]
[0026] In the above formula, y i For the actual load, The predicted value is N, where N is the sample size.
[0027] S22: Complete the calculation process for various auxiliary error indices used for result analysis and visualization output, excluding Formula 1, specifically as follows:
[0028] The formula for calculating the Mean Absolute Error (MAE) is Formula 2, which is:
[0029]
[0030] The formula for calculating the mean squared error (MSE) is Formula 3, which is:
[0031]
[0032] The formula for calculating the root mean square error (RMSE) is Formula 4, which is:
[0033]
[0034] Coefficient of determination R 2 The calculation formula is Formula 5, which is:
[0035]
[0036] S23: Visualize and output the evaluation data results;
[0037] The evaluation data results are comprehensively optimized and then compared and analyzed. This comprehensive optimization and comparison analysis involves comparing and analyzing the evaluation data results to form an optimization process convergence curve, a comparison chart of model prediction results and actual load curves, a magnified chart of local load intervals, a bar chart of errors for each indicator, and a chart of relative errors between predicted load and actual load.
[0038] As a preferred approach: The process of obtaining the optimal load prediction value at the maximum iteration count by processing the power load prediction model and the power load prediction error objective function using the Long-Nosed Raccoon algorithm involves initializing the improved Long-Nosed Raccoon algorithm, calculating the fitness values of all individuals according to the objective function in step S2, retaining the parameters of the current optimal individual, updating the individual position using the improved Long-Nosed Raccoon algorithm, determining whether the maximum iteration count has been reached, and if not, continuing iteratively until the maximum iteration count is reached, and outputting the optimal individual during the iteration process. The specific process is as follows:
[0039] S31: Initialization of optimization algorithm parameters: Set parameter dimension, population size and maximum number of iterations. The dimension is equal to the total number of weights from the input layer to the hidden layer and from the hidden layer to the output layer of the extreme learning machine. Define the upper and lower bounds of the value range of each parameter to form the search space boundary.
[0040] S32: First, a stochastic oppositional cooperative initialization mechanism is adopted. Specifically, a behavior-driven stochastic oppositional cooperative initialization mechanism is introduced during the initialization stage of the original population. This mechanism originates from the observation and abstraction process of the foraging and risk avoidance behavior of raccoons in complex environments. A weighted fusion update strategy combining the original position and its opposing position in the search space is constructed. The specific update formula is as follows:
[0041]
[0042] In the above formula, The fused opposing and cooperative entities; lb is the lower bound of the solution space; ub is the upper bound of the solution space; X i θ represents the original position of the i-th individual in the population. i ∈(0,1) is a behavioral bias factor used to dynamically regulate the degree of oppositional updates; to enhance inter-individual differences, the bias factor is defined as follows, with the specific formula as follows:
[0043] θ i =rand γ (7)
[0044] In the above formula, rand is a random number uniformly distributed in the interval [0,1]; γ is a weight control parameter that adjusts the degree of opposition bias, and γ=1 maintains the original uniform distribution;
[0045] Then, the fitness of the original individuals and the independent cooperating individuals is calculated and evaluated, and the individuals with better fitness are selected as the initial population individuals. The specific formula is as follows:
[0046]
[0047] S33: Exploration Phase: Update operation via Gaussian perturbation search, specific formula:
[0048]
[0049] In the above formula, X represents the position of the i-th individual after the perturbation is applied; i Z1, Z2, Z3 ~ N(0,1), where N(0,1) is a standard normal distribution with a mean of 0 and a standard deviation of 1; σ is the disturbance intensity, and the adaptive control strategy is calculated using the following formula:
[0050]
[0051] In the above formula, t is the current iteration number; MaxIt is the maximum iteration number;
[0052] S34: First, in the development stage, the Levy flight strategy is adopted to perform a global perturbation update operation on individuals. For each population individual, a Levy distribution step size s based on the Mantegna algorithm is constructed, and the calculation method is as follows:
[0053]
[0054] In the above formula, u ~ N(0, σ 2 ), v ~ N(0,1) follows a normal distribution, and σ 2 is calculated from the Levy exponent γ:
[0055]
[0056] In the above formula, Γ is the Gamma distribution function, 0 < γ < 2, and the value of γ is 1.5;
[0057] Then, all population individuals perform a large-scale search with the jump step size generated by the Levy distribution to enhance the ability to jump out of the local optimum. The specific calculation formula is:
[0058] X new = X + s * (LO + β * (HI - LO)) (13)
[0059] In the above formula, X is the current individual position; LO and HI are the local range control boundaries under the current iteration; β ~ Beta(1,1) is the perturbation ratio factor, which follows a Beta distribution. The ratio factor β ~ Beta(a,b) is generated in the form of a Beta distribution. By adjusting the values of the parameters (a,b), the distribution pattern of the perturbation in the [0,1] interval is controlled. When a > b, the individual jump behavior is closer to the upper boundary, which can enhance the global search performance; when a < b, the perturbation is more concentrated at the current position, improving the local development ability and adaptive ability, indicating good generalization;
[0060] S35: Fitness evaluation and elite retention mechanism. All updated population individuals are evaluated for fitness, and the greedy selection mechanism is used to retain the individual with the optimal fitness for guiding the next generation of the population; the value and parameters of the current optimal individual are recorded for each iteration;
[0061] S36: Iteration termination determination and optimal individual output process. If the current iteration number is less than the maximum iteration number, then continue to execute S33 and S34; otherwise, output the final optimal individual.
[0062] As a preferred solution: In step S4, the process of inputting the optimal individual parameters into the optimal individual to construct a power load forecasting model and then outputting the forecasting result as the optimal load forecasting value is:
[0063] S41: Apply the parameters corresponding to the optimal individuals in the population to the prediction model structure. That is, regard the optimal individuals obtained by the long-nosed raccoon optimization algorithm as model parameters and load them into the power load prediction model to complete the model instantiation.
[0064] S42: Input the test set data into the model, generate prediction results, and compare them with the actual load values. Calculate the error indices and simultaneously plot a curve comparing the predicted and actual values. When the mean absolute error (MAE), root mean square error (RMSE), and mean square error (MSE) are less than 100, and the coefficient of determination (R²) is less than 1000, the prediction error is considered valid. 2 When the value is between 0.90 and 1, it indicates that the model can accurately capture the trend of load changes, has good prediction performance, and is in a stable state of high accuracy on the test set; when the value of the mean absolute error (MAE), root mean square error (RMSE), and mean square error (MSE) exceeds 500, and the R-squared value exceeds 10000, the prediction error is considered stable. 2 A value below 0.90 indicates that the model has prediction biases for some sample points, and the model is in a state of underprediction for some sample points, which needs to be improved in subsequent processing.
[0065] The beneficial effects of this invention are as follows:
[0066] The working principle of this invention is as follows: after constructing a power load prediction model and its corresponding power load prediction error objective function with optimized fitness, the power load prediction model and power load prediction error objective function are processed by the Long-Nosed Raccoon Algorithm to obtain the optimal load prediction value under the maximum number of iterations. The entire method involves comprehensive data points. With the cooperation of the improved Long-Nosed Raccoon Algorithm, it can calculate the fitness function value, sort and select the initial optimal individual until the optimal load prediction value under the maximum number of iterations is accurately predicted. This forms a process for accurately estimating the optimal load prediction value. It has the ability to accurately determine the local optimum value in the case of population convergence and degradation in high-dimensional load prediction modeling, which is conducive to improving global search performance and promoting its use. It provides a favorable and standardized guidance for the prediction of the optimal value of actual power load. Attached Figure Description
[0067] Figure 1 This is a schematic diagram of the workflow of the present invention;
[0068] Figure 2 A schematic diagram comparing the convergence process of the improved Long-nosed Raccoon Optimization Algorithm (AICOA) and the standard Raccoon Optimization Algorithm (COA) in the power load forecasting task;
[0069] Figure 3 A diagram showing the comparison between predicted and actual power load values;
[0070] Figure 4 A bar chart comparing the mean absolute error index and root mean square error index obtained by each model in power load forecasting.
[0071] Figure 5 A bar chart comparing the average absolute percentage error index obtained by each model in power load forecasting;
[0072] Figure 6 This is a point-by-point comparison diagram of the relative errors of predictions for each model. Detailed Implementation
[0073] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention.
[0074] Specific implementation method one: Combining Figure 1 , Figure 2 , Figure 3 , Figure 4 , Figure 5 and Figure 6 This embodiment describes the method for predicting the optimal power load value. It involves constructing a power load prediction model and its corresponding power load prediction error objective function with optimal fitness, and then using the Long-Nosed Raccoon Algorithm to process the power load prediction model and the power load prediction error objective function to obtain the optimal load prediction value at the maximum number of iterations.
[0075] Combination Figure 1 As shown, the working principle of the power load optimal value prediction method in this embodiment is as follows: First, power load data is introduced as preparatory data, which comes from actual power load data. Then, the power load data is used as the initialization parameters in the extreme learning machine structure to form a power load prediction model. The improved long-nosed raccoon optimization algorithm is initialized, and after the power load prediction model is processed by the opposition learning initialization population, the fitness value in the power load prediction model is calculated and the optimal individual is selected. Furthermore, the population is updated by combining Gaussian perturbation and Levy flight strategy, thereby evaluating fitness and performing greedy selection, i.e., the process of determining the maximum number of iterations. When the position of the optimal individual parameters is determined to have reached the maximum number of iterations, the optimal parameter combination is output to construct the model, and then load prediction is performed and the error index is calculated. When the position of the optimal individual parameters is determined not to have reached the maximum number of iterations, the fitness value is recalculated and the optimal individual is selected until the optimal parameter combination is output to construct the model, and then load prediction is performed again and the error index is calculated.
[0076] Specific Implementation Method Two: This implementation method is a further limitation of Specific Implementation Method One. The method for predicting the optimal value of power load in this implementation method includes the following steps:
[0077] S1: Constructing and forming a power load forecasting model;
[0078] S2: Construct the objective function for the power load forecasting error corresponding to the optimized fitness of the power load forecasting model;
[0079] S3: The objective function for power load prediction error is initialized based on the improved Long-Nosed Raccoon algorithm. The fitness values of all individuals in the objective function are calculated. The current optimal individual parameter is determined and retained from the fitness values of all individuals. The optimal individual parameter is then updated using the improved Long-Nosed Raccoon algorithm. After determining the position of the optimal individual, the number of iterations of the optimal individual parameter is determined. When the position of the optimal individual parameter reaches the maximum number of iterations, the optimal individual parameter during the iteration process is output. When the position of the optimal individual parameter does not reach the maximum number of iterations, the iteration continues until the maximum number of iterations is reached, and then the optimal individual parameter during the iteration process is output.
[0080] S4: Input the optimal individual parameters into the optimal individual to construct the power load prediction model, and then output the prediction result as the optimal load prediction value.
[0081] Specific Implementation Method Three: This implementation method is a further limitation of Specific Implementation Method One or Two. In this implementation method, the construction process of the power load prediction model is a process of preprocessing the raw power load data and then constructing an extreme learning machine structure through feature selection and input. Specifically:
[0082] S11: Data Preprocessing: Data preprocessing includes sequentially handling missing values, removing outliers, and normalizing the raw power load data.
[0083] S12: Feature selection and input construction: The feature selection and input construction process adopts a sliding window strategy to construct input and output samples, taking the load values of the past n time points as input data and the load value corresponding to each of the n time points as output data;
[0084] S13: The process of establishing the Extreme Learning Machine (ELM) structure. The ELM structure has L hidden layer nodes. The input layer weights and biases are randomly initialized, and the output weights are used as the optimization object to construct a complete input matrix and output vector.
[0085] Specific Implementation Method Four: This implementation method is a further limitation of Specific Implementation Methods One, Two, or Three. The specific steps for constructing the objective function for power load forecasting error are as follows:
[0086] S21: The mean absolute percentage error is used as the fitness correspondence function of the power load forecasting model, which is the objective function of the power load forecasting error. The objective function of the power load forecasting error is used to measure the relative error between the forecast value and the actual load. The calculation formula is as follows:
[0087]
[0088] In the above formula, y i For the actual load, The predicted value is N, where N is the sample size.
[0089] S22: Complete the calculation process for various auxiliary error indices used for result analysis and visualization output, excluding Formula 1, specifically as follows:
[0090] The formula for calculating the Mean Absolute Error (MAE) is Formula 2, which is:
[0091]
[0092] The formula for calculating the mean squared error (MSE) is Formula 3, which is:
[0093]
[0094] The formula for calculating the root mean square error (RMSE) is Formula 4, which is:
[0095]
[0096] Coefficient of determination R 2 The calculation formula is Formula 5, which is:
[0097]
[0098] S23: Visualize and output the evaluation data results;
[0099] The evaluation data results are comprehensively optimized and then compared and analyzed. This comprehensive optimization and comparison analysis involves comparing and analyzing the evaluation data results to form an optimization process convergence curve, a comparison chart of model prediction results and actual load curves, a magnified chart of local load intervals, a bar chart of errors for each indicator, and a chart of relative errors between predicted load and actual load.
[0100] Specific Implementation Method Five: This implementation method is a further limitation of Specific Implementation Methods One, Two, Three, or Four. In this implementation method, the process of obtaining the optimal load prediction value at the maximum iteration count by processing the power load prediction model and the power load prediction error objective function using the Long-Nosed Raccoon Algorithm involves initializing the improved Long-Nosed Raccoon Algorithm, calculating the fitness values of all individuals according to the objective function in step S2, retaining the parameters of the current optimal individual, updating the individual position using the improved Long-Nosed Raccoon Algorithm, determining whether the maximum iteration count has been reached, and if not, continuing to iterate until the maximum iteration count is reached, and outputting the optimal individual during the iteration process. The specific process is as follows:
[0101] S31: Initialization of optimization algorithm parameters: Set parameter dimension, population size and maximum number of iterations. The dimension is equal to the total number of weights from the input layer to the hidden layer and from the hidden layer to the output layer of the extreme learning machine. Define the upper and lower bounds of the value range of each parameter to form the search space boundary.
[0102] S32: First, a stochastic oppositional cooperative initialization mechanism is adopted. Specifically, a behavior-driven stochastic oppositional cooperative initialization mechanism is introduced during the initialization stage of the original population. This mechanism originates from the observation and abstraction process of the foraging and risk avoidance behavior of raccoons in complex environments. A weighted fusion update strategy combining the original position and its opposing position in the search space is constructed. The specific update formula is as follows:
[0103]
[0104] In the above formula, The fused opposing and cooperative entities; lb is the lower bound of the solution space; ub is the upper bound of the solution space; X i θ represents the original position of the i-th individual in the population. i ∈(0,1) is a behavioral bias factor used to dynamically regulate the degree of oppositional updates; to enhance inter-individual differences, the bias factor is defined as follows, with the specific formula as follows:
[0105] θ i =rand γ (7)
[0106] In the above formula, rand is a random number uniformly distributed in the interval [0,1]; γ is a weight control parameter that adjusts the degree of opposition bias, and γ=1 maintains the original uniform distribution;
[0107] Then, the fitness of the original individuals and the independent cooperating individuals is calculated and evaluated, and the individuals with better fitness are selected as the initial population individuals. The specific formula is as follows:
[0108]
[0109] S33: Exploration Phase: Update operation via Gaussian perturbation search, specific formula:
[0110]
[0111] In the above formula, X represents the position of the i-th individual after the perturbation is applied; i It is the current position of the i-th individual;
[0112] Z1, Z2, Z3 ~ N(0,1), where N(0,1) is a standard normal distribution with a mean of 0 and a standard deviation of 1; σ is the disturbance strength.
[0113] The degree is calculated using the following formula for the adaptive control strategy:
[0114]
[0115] In the above formula, t is the current iteration number; MaxIt is the maximum iteration number;
[0116] S34: Firstly, during the development phase, the Levy flight strategy is used to perform global perturbation updates on individuals. For each individual in the population, a Levy distribution step size s based on the Mantegna algorithm is constructed, calculated as follows:
[0117]
[0118] In the above formula, u~N(0,σ) 2 ), v ~ N(0,1) follows a normal distribution, σ 2 Calculated using the Levy exponent γ:
[0119]
[0120] In the above formula, Γ is the Gamma distribution function, 0 < γ < 2, and γ takes the value of 1.5;
[0121] Then, all individuals in the population perform a large-scale search using the jump step size generated by the Levy distribution, enhancing their ability to escape local optima. The specific calculation formula is as follows:
[0122] X new =X+s*(LO+β*(HI-LO)) (13)
[0123] In the above formula, X is the current individual position; LO and HI are the local range control boundaries under the current iteration; β ∼ Beta(1,1) is the perturbation scale factor, which follows the Beta distribution. The scale factor β ∼ Beta(a,b) is generated in the form of the Beta distribution. By adjusting the values of the parameters (a,b), the distribution form of the perturbation within the interval [0,1] is controlled. When a > b, the individual jumping behavior is closer to the upper boundary, which can enhance the global search performance; when a < b, the perturbation is more concentrated at the current position, improving the local development performance and the adaptive performance, indicating good generalization performance.
[0124] S35: Fitness evaluation and elite retention mechanism. Evaluate the fitness of all updated population individuals, and use the greedy selection mechanism to retain the individual with the optimal fitness for guiding the next generation of the population; record the value and parameters of the current optimal individual in each iteration.
[0125] S36: Iteration termination determination and optimal individual output process. If the current iteration number is less than the maximum iteration number, continue to execute S33 and S34; otherwise, output the final optimal individual.
[0126] Specific Embodiment Six: This embodiment is a further limitation of Specific Embodiments One, Two, Three, Four, or Five. In this embodiment, the process of inputting the optimal individual parameters into the optimal individual to construct a power load prediction model and then outputting the prediction result as the optimal load prediction value in Step S4 is as follows:
[0127] S41: Apply the corresponding parameters in the optimal population individual to the prediction model structure, that is, regard the optimal individual optimized by the kinkajou optimization algorithm as the model parameters and load them into the power load prediction model to complete the model instantiation.
[0128] S42: Input the test set input data into the model to generate a prediction result, compare it with the true load value, calculate the error index, and at the same time draw a comparison curve of the predicted value and the true value for comparison. When the value of the mean absolute error MAE in the prediction error index is less than 100, the value of the root mean square error RMSE is less than 100, the mean square error MSE is less than 1000, and the coefficient of determination R 2 is between 0.90 and 1, it indicates that the model can accurately capture the trend of load changes, the prediction effect is good, and the model is in a stable state of high-precision use on the test set, that is, it verifies Conclusion One: "The model performs stably and has high precision on the test set." On the contrary, if the error index exceeds the reasonable range, and R 2The results are significantly lower than ideal, indicating that the model has a large prediction bias at some sample points. This may be affected by factors such as training data quality, feature selection, or model structural complexity. Conclusion 2: "The model has insufficient prediction at some sample points and needs further optimization or the introduction of richer feature information." Specifically, this corresponds to situations where the mean absolute error (MAE) exceeds 500, the root mean square error (RMSE) exceeds 500, the mean square error (MSE) exceeds 10000, and R... 2 A value below 0.90 indicates that the model has prediction biases for some sample points, and the model is in a state of underprediction for some sample points, which needs to be improved in subsequent processing.
[0129] Specific Implementation Method Seven: This implementation method is a further limitation of Specific Implementation Methods One, Two, Three, Four, Five, or Six. In this implementation method, when this method is used in the actual power load forecasting process, the specific process is as follows:
[0130] Step 1: Import the electricity load dataset, using the electricity load data of a province in China for the entire year of 2024, sampled every 15 minutes, totaling 35,040 data points. A sliding window is used to construct samples, with the input set to the first 7 days (672 points) and the output to the 8th day (96 points), generating a total of 100 sets of samples, of which 99 sets are used for training and 1 set for testing. All data are normalized.
[0131] Step 2: Initialize the Extreme Learning Machine (ELM) model structure and optimize the search space. The prediction model is ELM, with 672 input nodes, 96 output nodes, and a uniform 85 hidden layer neurons. The activation function is Sigmoid. The parameters to be optimized include input weights and hidden layer biases, totaling 672 × 85 + 85 = 57205 variables. The optimization search space is set to [-2, 2].
[0132] Step 3: Run the improved long-nosed raccoon optimization algorithm. The population size of the optimization algorithm is set to 50, the maximum number of iterations is 500, the population is initialized using randomized adversarial learning, and the fitness function value is calculated to sort and select the best individual in the first generation.
[0133] Step 4: Based on the current individual position, perform search updates using Gaussian perturbation and the Levy flight strategy, and introduce a perturbation factor controlled by Beta distribution to improve the jump direction adjustment capability. Evaluate fitness and update the current optimal solution in each round.
[0134] Step 5: Determine if the maximum number of iterations has been reached. If not, continue iterating and update the optimal individual. If the maximum number of generations has been reached, output the parameter combination corresponding to the globally optimal individual at this point as the final model solution, and calculate its prediction error index on the test set. The experimental results are shown in Table 1 below:
[0135] Table 1 Statistical Table of Evaluation Indicators
[0136]
[0137] As shown in the table, AICOA-ELM outperforms ELM and COA-ELM in all five metrics. Compared to the original ELM, AICOA-ELM reduces MAE by 93.98%, MAPE by 94.16%, and RMSE by 92.61%, indicating better accuracy and stability. Its prediction accuracy reaches 99.848%, a 30.65% improvement over the original ELM, and it also performs better in controlling error fluctuations and avoiding overfitting.
[0138] Step Six: Apply the optimal parameters output from Step Five to the ELM model, perform power load prediction on the last set of test data, compare the prediction results with the actual load values, and plot the prediction curve and error curve. The results show that the predicted values of the AICOA-ELM model at the test points are highly consistent with the actual load trend, and the error curve is stable without drastic fluctuations, thus demonstrating its stronger global parameter optimization performance.
Claims
1. A method for predicting optimal power load based on an improved long-nosed raccoon algorithm, characterized in that: The optimal power load prediction method involves constructing a power load prediction model and its corresponding optimization fitness objective function, and then using the Long-Nosed Raccoon algorithm to process the power load prediction model and the power load prediction error objective function to obtain the optimal load prediction value under the maximum number of iterations. The method for predicting the optimal value of power load includes the following steps: S1: Constructing and forming a power load forecasting model; S2: Construct the objective function for the power load forecasting error corresponding to the optimized fitness of the power load forecasting model; S3: The objective function for power load prediction error is initialized based on the improved Long-Nosed Raccoon algorithm. The fitness values of all individuals in the objective function are calculated. The current optimal individual parameter is determined and retained from the fitness values of all individuals. The optimal individual parameter is then updated using the improved Long-Nosed Raccoon algorithm. After determining the position of the optimal individual, the number of iterations of the optimal individual parameter is determined. When the position of the optimal individual parameter reaches the maximum number of iterations, the optimal individual parameter during the iteration process is output. When the position of the optimal individual parameter does not reach the maximum number of iterations, the iteration continues until the maximum number of iterations is reached, and then the optimal individual parameter during the iteration process is output. S4: Input the optimal individual parameters into the optimal individual to construct the power load prediction model, and then output the prediction result as the optimal load prediction value. The process of constructing a power load forecasting model involves preprocessing the raw power load data and then using feature selection and input to build an extreme learning machine structure. Specifically: S11: Data Preprocessing: Data preprocessing includes sequentially handling missing values, removing outliers, and normalizing the raw power load data. S12: Feature selection and input construction: The feature selection and input construction process adopts a sliding window strategy to construct input and output samples, taking the load values of the past n time points as input data and the load value corresponding to each of the n time points as output data; S13: The process of establishing the Extreme Learning Machine structure, which is an ELM model structure. The number of hidden layer nodes in the ELM model structure is L. The input layer weights and biases are randomly initialized, and the output weights are used as the optimization object to construct a complete input matrix and output vector. The specific steps for constructing the objective function for power load forecasting error are as follows: S21: The mean absolute percentage error is used as the fitness correspondence function of the power load forecasting model, which is the objective function of the power load forecasting error. The objective function of the power load forecasting error is used to measure the relative error between the forecast value and the actual load. The calculation formula is as follows: (1) In the above formula, For the actual load, For predicted values, The number of samples; S22: Complete the calculation process for various auxiliary error indices used for result analysis and visualization output, excluding Formula 1, specifically as follows: The formula for calculating the Mean Absolute Error (MAE) is Formula 2, which is: (2) The formula for calculating the mean squared error (MSE) is Formula 3, which is: (3) The formula for calculating the root mean square error (RMSE) is Formula 4, which is: (4) Coefficient of determination R 2 The calculation formula is Formula 5, which is: (5) S23: Visualize and output the evaluation data results; The evaluation data results are comprehensively optimized and then compared and analyzed. This comprehensive optimization and comparison analysis involves comparing and analyzing the evaluation data results to form an optimization process convergence curve, a comparison chart of model prediction results and actual load curves, a magnified chart of local load intervals, a bar chart of errors for each indicator, and a chart of relative errors between predicted load and actual load.
2. The method for predicting optimal power load based on the improved long-nosed raccoon algorithm according to claim 1, characterized in that: The process of obtaining the optimal load forecast value at the maximum iteration count by processing the power load forecast model and the power load forecast error objective function using the Long-Nosed Raccoon Algorithm involves initializing the improved Long-Nosed Raccoon Algorithm, calculating the fitness values of all individuals according to the objective function in step S2, retaining the parameters of the current optimal individual, updating the individual position using the improved Long-Nosed Raccoon Algorithm, and determining whether the maximum iteration count has been reached. If not, the iteration continues until the maximum iteration count is reached, and the optimal individual during the iteration process is output. The specific process is as follows: S31: The process of initializing the optimization algorithm parameters: setting the parameter dimension, population size and maximum number of iterations, where the dimension is equal to the total number of weights from the input layer to the hidden layer and from the hidden layer to the output layer of the extreme learning machine, and defining the upper and lower bounds of the value range of each parameter to form the search space boundary; S32: First, a stochastic oppositional cooperative initialization mechanism is adopted. Specifically, a behavior-driven stochastic oppositional cooperative initialization mechanism is introduced during the initialization stage of the original population. This mechanism originates from the observation and abstraction process of the foraging and risk avoidance behavior of raccoons in complex environments. A weighted fusion update strategy combining the original position and its opposing position in the search space is constructed. The specific update formula is as follows: (6) In the above formula, As a result of integration, they are opposing yet collaborative entities; To solve for the lower bound of the space; To solve for the upper limit of the space; This represents the original position of the i-th individual in the population. This is a behavioral bias factor used to dynamically regulate the degree of oppositional updates. To enhance inter-individual differences, the bias factor is defined as follows, with the specific formula: (7) In the above formula, Random numbers that are uniformly distributed in the interval [0,1]. The weighting control parameter adjusts the degree of oppositional bias. Maintain the original uniform distribution; Then, the fitness of the original individuals and the independent cooperating individuals is calculated and evaluated, and the individuals with better fitness are selected as the initial population individuals. The specific formula is as follows: (8) S33: Exploration Phase: Update operation via Gaussian perturbation search, specific formula: (9) In the above formula, The position of the i-th individual after the perturbation is applied; It is the current position of the i-th individual; , It follows a standard normal distribution with a mean of 0 and a standard deviation of 1. To determine the disturbance intensity, the adaptive control strategy is calculated using the following formula: (10) In the above formula, This represents the current iteration number; This represents the maximum number of iterations. S34: First, during the development phase, the Levy flight strategy is used to perform global perturbation update operations on individuals. For each individual in the population, a Levy distribution step size based on the Mantegna algorithm is constructed. The calculation method is as follows: (11) In the above formula, , Follows a normal distribution. Levy Index calculate: (12) In the above formula, Let Gamma be the distribution function. , ; Then, all individuals in the population perform a large-scale search using the jump step size generated by the Levy distribution, enhancing their ability to escape local optima. The specific calculation formula is as follows: (13) In the above formula, This represents the current individual's location. and This serves as the local control boundary for the current iteration. The perturbation scaling factor follows the rules. Distribution, using Distribution form generates scaling factor By adjusting parameters The value forms a response to the disturbance in The process of controlling the distribution pattern within the interval, when When individual jump behavior is closer to the upper boundary, it can enhance global search performance; when When the disturbance is more concentrated at the current position, it enhances local exploitation and adaptive capabilities, indicating good generalization ability; S35: Fitness assessment and elite retention mechanism. All updated individuals in the population are assessed for fitness, and a greedy selection mechanism is used to retain the individual with the best fitness for guiding the next generation of the population. The value and parameters of the current best individual are recorded in each iteration. S36: Iteration termination determination and optimal individual output process. If the current iteration number is less than the maximum iteration number, then continue to execute S33 and S34; otherwise, output the final optimal individual.
3. The method for predicting optimal power load based on the improved long-nosed raccoon algorithm according to claim 1 or 2, characterized in that: The process in step S4, where the optimal individual parameters are input into the optimal individual to construct the power load forecasting model, and the output forecast result is the optimal load forecast value, is as follows: S41: Apply the parameters corresponding to the optimal individuals in the population to the prediction model structure. That is, regard the optimal individuals obtained by the long-nosed raccoon optimization algorithm as model parameters and load them into the power load prediction model to complete the model instantiation. S42: Input the test set data into the model, generate prediction results, and compare them with the actual load values. Calculate the error indices and simultaneously plot the comparison curves between the predicted and actual values. When the mean absolute error (MAE), root mean square error (RMSE), and mean square error (MSE) in the prediction error indices are less than 100, less than 100, less than 1000, and the coefficient of determination (R²) is between 0.90 and 1, it indicates that the model can accurately capture the trend of load changes, has good prediction performance, and is in a stable state of high accuracy on the test set. When the mean absolute error (MAE), root mean square error (RMSE), and mean square error (MSE) in the prediction error indices exceed 500, more than 500, more than 10000, and R² is less than 0.90, it indicates that the model has prediction bias at some sample points, and the model is in a state of underprediction at some sample points, requiring further improvement.
Citation Information
Patent Citations
Federal learning-based power load prediction method and system
CN116845884A
Intelligent industrial park power load prediction method
CN118627541A