New energy power prediction method and system based on particle swarm optimization neural network

CN119340979BActive Publication Date: 2026-09-22STATE GRID JIANGSU ELECTRIC POWER CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411431722.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2026-09-22
Estimated Expiration
2044-10-14

AI Technical Summary

Technical Problem

但其也存在收敛速度慢、隐含层神经元交叉重叠、容易陷入局部极小值等缺点

Benefits of technology

[0053]与现有技术相比,本发明的有益效果至少在于:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119340979B_ABST
    Figure CN119340979B_ABST
Patent Text Reader

Abstract

The application discloses a new energy power prediction method and system based on a particle swarm optimization neural network, and the method comprises the following steps: collecting new energy power generation historical power data and corresponding time historical meteorological data; training a wavelet neural network based on a multi-scale Gaussian base function according to the collected data, and adopting a particle swarm algorithm to optimize network parameters to obtain a new energy power prediction model; acquiring real-time meteorological data, inputting the real-time meteorological data into the new energy power prediction model, and obtaining a new energy power prediction value. The application improves the Gaussian wavelet function, enhances the multi-scale analysis capability of the Gaussian wavelet function, organically combines the improved wavelet function with the neural network, and uses the particle swarm algorithm to optimize the wavelet neural network, so that the convergence speed and the power prediction precision can be obviously increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of new energy power generation technology, and relates to a new energy power prediction method and system based on particle swarm optimization neural network. Background Technology

[0002] New energy power generation technologies have received widespread attention due to their cleanliness, efficiency, and safety, leading to the construction of numerous photovoltaic and wind power plants. However, because new energy power generation is significantly affected by environmental factors, its intermittent, unstable, and volatile characteristics have adversely impacted system commissioning and grid planning. Therefore, the establishment and development of models for new energy power prediction systems are of great significance.

[0003] Currently, power prediction methods are divided into two main categories: traditional prediction methods and modern prediction methods. Traditional methods mainly rely on experience and require extensive historical data. They are unsuitable for time series with large load fluctuations and cannot fully consider various factors affecting load. Model initialization is also challenging, requiring rich experience and advanced skills. Modern prediction methods mainly include system dynamics-based prediction, fuzzy prediction, expert system prediction, neural network prediction, and grey prediction. Among these, neural network prediction has seen rapid development in recent years. Its strong adaptability, parallel processing, distributed storage, and fault tolerance make it widely applicable to highly nonlinear and uncertain situations. However, it also has drawbacks such as slow convergence, overlapping of hidden layer neurons, and susceptibility to local minima. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides a new energy power prediction method and system based on particle swarm optimization neural network. By improving the Gaussian wavelet function to enhance its multi-scale analysis capability, the improved wavelet function is organically combined with the neural network, and the wavelet neural network is optimized using the particle swarm algorithm, thereby increasing the convergence speed and power prediction accuracy.

[0005] The present invention adopts the following technical solution.

[0006] The first aspect of this invention provides a new energy power prediction method based on particle swarm optimization neural network, comprising:

[0007] Collect historical power data of new energy power generation and corresponding historical meteorological data for the same period;

[0008] Based on the collected data, a wavelet neural network based on multi-scale Gaussian basis functions was trained, and the network parameters were optimized using the particle swarm optimization algorithm to obtain a new energy power prediction model.

[0009] Real-time meteorological data is acquired and input into the new energy power prediction model to obtain the predicted value of new energy power.

[0010] Preferably, the new energy sources are divided into photovoltaic and wind power;

[0011] The meteorological data corresponding to the historical power data of photovoltaic power generation includes air temperature, humidity, temperature, and solar irradiance.

[0012] The meteorological data corresponding to historical wind power generation power data includes wind speed, wind direction, cloud cover, and precipitation.

[0013] Preferably, the wavelet neural network, for input data x, obtains a multi-scale feature representation by combining it with multi-scale Gaussian basis functions:

[0014] y(x)=[g1(x),g2(x),…,g n (x)]

[0015] Among them, g j (x) is the Gaussian basis function at the j-th scale, where j takes values ​​from 1 to n.

[0016] Preferably, the Gaussian basis function at the j-th scale is:

[0017]

[0018] Where, μ j (x) and σ j (x) are all adaptive parameters that depend on the input data x;

[0019] λ is the regularization strength parameter; ν j is the offset parameter; p is the exponent.

[0020] Preferably, μ j (x) specifically refers to:

[0021] μ j (x)=α j x+β j sin(γ j x)

[0022] Where, α j β j γ j These are learnable parameters.

[0023] Preferably, σ j (x) specifically refers to:

[0024] σ j (x)=δ j +ηj |x-ζ j | p

[0025] Where, δ j η j ζ j These are learnable parameters.

[0026] Preferably, the optimization of network parameters using the particle swarm optimization algorithm is as follows:

[0027] 1) Initialize a group of particles, each representing a possible combination of network parameters, and set the parameters of the particle swarm;

[0028] 2) Calculate the fitness value of the neural network based on the solution for each particle;

[0029] 3) For each particle, update its individual optimal position based on its current fitness value;

[0030] 4) Update the global optimal position of the entire particle swarm based on the individual optimal positions of all particles;

[0031] 5) Update the particle's velocity and position based on its current position, velocity, and the individual best position and global best position;

[0032] 6) Repeat steps 2) to 5) until the stopping condition is met, output the optimal solution and assign it to the wavelet neural network.

[0033] Preferably, the velocity update formula for the particle is:

[0034]

[0035] in, This represents the velocity of the i-th particle in the (t+1)-th iteration;

[0036] This represents the velocity of the i-th particle in the t-th iteration;

[0037] w is the inertia weight;

[0038] c1 and c2 are individual and social learning factors, respectively;

[0039] rand() generates a random number between 0 and 1;

[0040] This represents the optimal position of the i-th particle in the t-th iteration;

[0041] This represents the position of the i-th particle in the t-th iteration;

[0042] gbestt This represents the global optimal position of the entire particle swarm in the t-th iteration.

[0043] Preferably, the position update formula for the particle is:

[0044]

[0045] Where γ is the coefficient that regulates the memory term;

[0046] This represents the position of the i-th particle in the (t+1)-th iteration.

[0047] A second aspect of the present invention provides a new energy power prediction system based on particle swarm optimization neural network, the system comprising:

[0048] The data acquisition module is used to collect historical power data of new energy power generation and historical meteorological data for the corresponding time.

[0049] The model building module is used to train a wavelet neural network based on multi-scale Gaussian basis functions based on the collected data, and to optimize the network parameters using the particle swarm optimization algorithm to obtain a new energy power prediction model.

[0050] The power prediction module is used to acquire real-time meteorological data, input it into the new energy power prediction model, and obtain the predicted value of new energy power.

[0051] A terminal includes a processor and a storage medium; the storage medium is used to store instructions; the processor is used to perform operations according to the instructions to execute the steps of the method.

[0052] A computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the method.

[0053] Compared with the prior art, the beneficial effects of the present invention are at least as follows:

[0054] This invention incorporates various weather-related factors into the influencing factors of new energy power generation forecasting, thereby increasing the forecasting accuracy of new energy power generation.

[0055] This invention improves the wavelet basis function in wavelet neural networks by adopting a wavelet neural network based on multi-scale Gaussian basis functions. It has multi-scale capability, maintains good performance in noisy environments, has stronger robustness, can effectively suppress the influence of noise on prediction results, can quickly learn and adapt to data features, has a faster convergence speed, and performs better when analyzing signals containing multiple frequency components.

[0056] The basis functions used in this invention can better adapt to complex time series and nonlinear data distributions, improve the network model's ability to process complex nonlinear data, and have higher robustness, nonlinear expression ability and prediction accuracy.

[0057] This invention organically combines the particle swarm optimization algorithm with an improved wavelet neural network to optimize network parameters, further accelerating the convergence speed and increasing prediction accuracy. It has broad application prospects in fields such as power systems, wind power generation, and solar power generation.

[0058] The particle swarm optimization algorithm used in this invention can improve its convergence speed and global search capability in complex problems, ensure more efficient updating of network parameters, and ultimately improve the accuracy and generalization ability of the prediction model, exhibiting better adaptability and robustness when solving complex problems. Attached Figure Description

[0059] Figure 1 This is a flowchart of a new energy power prediction method based on particle swarm optimization neural network;

[0060] Figure 2 This is a schematic diagram of a particle swarm optimization neural network.

[0061] Figure 3 This is the output of the wavelet neural network prediction without the improved wavelet function;

[0062] Figure 4 This is the output diagram of the wavelet neural network prediction using an improved wavelet function;

[0063] Figure 5 The graph shows the training results of the improved wavelet function and the unimproved wavelet function.

[0064] Figure 6 This is a graph showing the training results of a wavelet neural network with an improved wavelet function through particle swarm optimization.

[0065] Figure 7 This is the predicted output of a wavelet neural network with particle swarm optimization to improve the wavelet function;

[0066] Figure 8 This is a comparison chart of the predicted outputs with and without particle swarm optimization.

[0067] Figure 9 This is a comparison chart of absolute errors; Detailed Implementation

[0068] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this invention. The embodiments described in this application are merely some embodiments of this invention, and not all embodiments. Based on the spirit of this invention, other embodiments obtained by those skilled in the art without creative effort are all within the protection scope of this invention.

[0069] like Figure 1-2 As shown, Embodiment 1 of the present invention provides a new energy power prediction method based on particle swarm optimization and improved wavelet neural network (WNN), comprising the following steps:

[0070] Step 1: Collect historical power data of new energy power generation and historical meteorological data for the corresponding time period;

[0071] More preferably, meteorological data and new energy power generation data are collected to construct a sample set for the wavelet neural network. The types of new energy are divided into photovoltaic and wind power. It is worth noting that the types and number of parameters, as inputs to the wavelet neural network model, are important factors affecting the model and are the first technical challenges that the neural network model must address in specific application scenarios. As a prominent substantive feature of this invention, it selects high-frequency meteorological factors that mainly affect photovoltaic and wind power generation.

[0072] Specifically, the meteorological data corresponding to historical photovoltaic power generation power data includes air temperature, humidity, temperature, and solar irradiance; the meteorological data corresponding to historical wind power generation power data includes wind speed, wind direction, cloud cover, and precipitation. The data types for the meteorological data corresponding to photovoltaic and wind power generation can also be adjusted as needed.

[0073] Cloud cover refers to the proportion of the sky covered by clouds, expressed as "10-degree cloud cover", with a value range of 0 to 10, where 0 represents clear skies without clouds and 10 represents complete cloud cover.

[0074] When predicting photovoltaic power, the network is trained using historical photovoltaic power data and its corresponding historical measured air temperature, humidity, temperature, and irradiance to obtain a photovoltaic power prediction model. The photovoltaic power prediction can be obtained by inputting the latest predicted air temperature, humidity, temperature, and irradiance.

[0075] When predicting wind power, the network is trained using historical wind power data and its corresponding historical measured wind speed, wind direction, cloud cover, and precipitation to obtain a wind power prediction model. By inputting the latest predicted wind speed, wind direction, cloud cover, and precipitation, the wind power prediction can be obtained.

[0076] Furthermore, meteorological data is classified and processed to improve the prediction accuracy of the constructed model.

[0077] Obtain historical data on new energy power generation and normalize the data.

[0078] Historical power generation data for new energy sources includes: the power generation per unit time of photovoltaic power (i.e., photovoltaic power generation capacity) and the power generation per unit time of wind power (i.e., wind power generation capacity).

[0079] Normalize the data to [0,1]:

[0080]

[0081] Where max(x) and min(x) are the maximum and minimum values ​​of the data, respectively.

[0082] In this embodiment, 420 hours of wind power data are used, of which the first 335 hours are wavelet neural network training data and the 80 hours from 336 hours to 415 hours are test data. Historical measured meteorological data for the corresponding time are also obtained. These data are normalized and normalized to [0,1].

[0083] More preferably, a dynamic weighted average method is used to dynamically adjust the data weights at each time point in order to improve the preprocessing effect of time series data.

[0084] Given a set of time series data Define the dynamic weights at each time point T as follows:

[0085]

[0086] xT The data value for time T; α is the mean of the overall time series; α is a parameter for adjusting the sensitivity of the weights, used to control the degree to which the weights respond to deviations from the mean; M is the length of the time series data.

[0087] Step 2: Train a wavelet neural network based on multi-scale Gaussian basis functions based on the data collected in Step 1, and optimize the network parameters using the particle swarm optimization algorithm to obtain a new energy power prediction model.

[0088] More preferably, a wavelet neural network is constructed, and the number of input nodes, hidden nodes, and output nodes are determined according to the type of input meteorological information. The wavelet basis functions of the wavelet neural network are also improved.

[0089] The wavelet neural network used in this invention has three layers: an input layer, a hidden layer, and an output layer. The number of nodes in the input layer and the output layer are fixed. The number of nodes in the hidden layer is determined based on the number of nodes in the input and output layers. The formula for calculating the number of nodes in the hidden layer is as follows:

[0090]

[0091] Where n is the number of hidden layer nodes in the network, a is the number of input layer nodes in the WNN, b is the number of output layer nodes in the WNN, and m is an integer with a value range of [1, 10].

[0092] In time series forecasting, Gaussian basis functions are commonly used to build models to fit and predict time series data. To improve prediction accuracy, this invention improves the Gaussian basis function by enabling multi-scale analysis. Specifically, the improved Gaussian basis function introduces a scale parameter, allowing the basis function to analyze the signal at different scales. In the multi-scale analysis process, a set of scale values ​​is first generated according to the required number of scales. Then, for each scale, a Gaussian kernel function is constructed and convolved with the signal.

[0093] This allows us to obtain coefficients at different scales, thus capturing the characteristics of the signal at different scales. Finally, by weighted summing of the coefficients at all scales, we can obtain the multi-scale reconstructed signal, which is the result of multi-scale analysis of the original signal.

[0094] Assuming there are multiple Gaussian basis functions at different scales, and introducing a scale parameter, the preliminary improved expression for the Gaussian wavelet function is as follows:

[0095]

[0096] Where, μ j σ j They typically represent the mean parameter and the scale parameter, respectively. j σ represents the center position at the j-th scale. j This represents the scale parameter at the j-th scale.

[0097] μ j It is the mean of the j-th scaling basis function, σ i is the corresponding standard deviation, and x is the input data of the network. The basis functions are typically wavelet basis functions in wavelet neural networks (WNNs), which have localization properties and can be adapted to different components of the signal through translation and scaling. They can be Gaussian wavelet basis functions, but are not limited to them.

[0098] To improve the model's ability to process complex nonlinear data, the wavelet basis function shown in equation (3) is further optimized and improved by adjusting the parameter μ. j σ jThe parameters are replaced with adaptive parameters to better adapt to the changing characteristics of complex data. The following is the optimized design of this invention:

[0099]

[0100] Original μ j It is a constant, representing the mean at the j-th scale. To enhance the adaptability of the wavelet basis function, it is changed to a function μ that depends on the input x. j (x), which can be in the form of:

[0101] μ j (x)=α j x+β j sin(γ j x)

[0102] Where α j β j γ j These are learned parameters used to adaptively adjust the mean, reflecting the non-linear characteristics of the data and allowing for more flexible adaptation to changes in complex data. These parameters are learned through optimization algorithms (such as particle swarm optimization) during the training process and directly affect the mean function.

[0103] μ j (x)=α j x+β j sin(γ j The shape of x) helps the model adapt to the distribution and changes in the data. Furthermore, α j It can be initialized to 1 or a small positive value, such as [0.5, 2], to accommodate linear variations in different data. β j It can be initialized in the range [-1, 1] to capture nonlinear features in the data. γ j Related to periodicity, it can be initialized between [0.1, 10] based on the periodicity of the data. Higher γ... i It is suitable for faster-changing cycles, while the lower value is suitable for slower-changing cycles.

[0104] The original standard deviation σ j Replace with a function σ that depends on x j (x) can be defined as:

[0105] σ j (x)=δ j +η j |x-ζ j | p

[0106] Where δ j and η j It is an adaptive parameter, ζ jThese are adjustable parameters that control their dependence on x, adaptively adjusting the width of the wavelet basis function to suit different data distributions. These parameters are also learned through an optimization algorithm during training, used to dynamically adjust the width of the wavelet function to adapt to different data distributions. Furthermore, δ... j As a base value for the standard deviation, it can be initialized to a small positive value, such as [0.1, 1], to prevent the wavelet basis function from being too broad or too narrow. η j The rate of change used to adjust the wavelet width is typically initialized to [0.1, 1]. This range ensures that the wavelet function responds to local data changes. ζ j The standard deviation function is determined by its offset from the input data and is typically set to a value close to the data mean. For example, if the mean of the input data x is near 0, ζ... j It can be initialized in [-1, 1].

[0107] An additional nonlinear term is introduced into the denominator, where λ is the regularization coefficient and ν is the nonlinear term. j These are learnable parameters, where p is an exponent controlling the power. Introducing this term helps control the sensitivity of the wavelet basis function to outliers and enhances its adaptability to complex data distributions. These parameters can be initialized empirically, but their final values ​​are typically optimized through training to ensure the model's robustness to outliers. Furthermore, λ is typically chosen between [0.01, 0.1], with smaller λ resulting in milder regularization and larger λ increasing the model's penalty for outliers. j ν is an offset parameter used to capture specific locations or variations in the data, and can be set near the mean or median of the input data. For example, if the mean of x is 0, ν j The value can be selected between [-1, 1]. p controls the sensitivity of the regularization term to outliers, and is usually set between [1, 3]. A larger p value will be more sensitive to outliers that are off-center.

[0108] By introducing an adaptive parameter μ that depends on the input data x j (x) and σ j (x), and the regularization control term λ|x-ν j | p The optimized and improved wavelet basis function structure can better adapt to complex time series and nonlinear data distributions, and has higher robustness, nonlinear expressive power and prediction accuracy.

[0109] For the input time-series data x, by combining it with multiple optimized Gaussian basis functions as described above, a multi-scale feature representation can be obtained:

[0110] y(x)=[g1(x),g2(x),…,gn (x)] (4)

[0111] Where y(x) is the feature representation of the input data x under the multi-scale Gaussian basis function.

[0112] like Figure 3 This is the predicted output of the wavelet neural network without the improved wavelet function. Figure 4 The image shows the prediction output of the wavelet neural network with the improved wavelet function. Comparing the two images, it can be seen that the improved wavelet function increases the prediction accuracy. Figure 5 The graph shows a comparison of the iteration errors of the two methods. It can be seen that the convergence speed can be increased after the improvement.

[0113] More preferably, a particle swarm optimization algorithm is introduced to optimize the parameters such as weights and thresholds of the wavelet neural network, overcoming the shortcomings of the traditional wavelet neural network gradient descent method and improving the convergence speed and prediction accuracy.

[0114] The particle swarm optimization algorithm is used to find the optimal weights and thresholds of a wavelet neural network. The basic principle is as follows: Assume there is a swarm of particles, each representing a potential solution in the search space. Each particle continuously adjusts its position and velocity based on its own experience and the experience of the swarm to find the optimal solution.

[0115] The steps of the particle swarm optimization algorithm are as follows:

[0116] 1) Initialize the particle swarm: Initialize a set of particles (generating the position and velocity of the particle swarm), each particle representing a possible solution (i.e., the weights and thresholds, learnable parameters, etc. of the wavelet neural network, which determine the connection strength and activation characteristics of the neural network). Set the particle swarm parameters: maximum velocity (limiting the magnitude of particle position change in each iteration), set to 0.151; minimum error (as one of the algorithm termination conditions), set to 0.001; inertia weight (determining the balance of particles when searching for global and local optima, maximum weight, set to 0.90; minimum weight, set to 0.30); maximum number of iterations, set to 100.

[0117] In each iteration, the particle updates its position based on the difference between its current solution and the global optimum, and optimizes the network's parameter combination by minimizing the error function. This process ensures that wavelet neural networks can more effectively handle complex nonlinear prediction tasks, while improving convergence speed and prediction accuracy.

[0118] 2) Calculate fitness: Calculate the fitness value of the neural network based on the solution (current position) of each particle;

[0119] 3) Update individual best position (pbest): For each particle, update its individual best position based on its current fitness value.

[0120] By introducing a fuzzy logic system to update the optimal position of an individual, the update process takes into account the historical optimal position. and current location Smoothness of change:

[0121]

[0122] By considering the particle position changes over several past iterations, pbest is updated smoothly, avoiding unstable updates to the optimal position of individuals due to drastic fluctuations in a single fitness value. The fuzzy system automatically balances the weight of the current solution with historical solutions based on different fitness value changes (increases or decreases).

[0123] By employing a soft decision-making approach based on fuzzy logic, the instability in updating an individual's optimal position is reduced, enhancing the stability of convergence. Multiple historical positions are considered, rather than updating the individual's optimal position solely based on the current fitness value.

[0124] 4) Update the swarm's best position (gbest): Based on the individual best positions of all particles, update the global best position of the entire particle swarm.

[0125] 5) Update particle position: For each particle, update the particle's position based on its current position, velocity, and the influence of its individual position on the global best position.

[0126] Speed ​​update formula:

[0127]

[0128] Position update formula:

[0129]

[0130] in, This represents the position of the i-th particle in the t-th iteration. This represents the velocity of the i-th particle in the t-th iteration. This represents the optimal individual position of the i-th particle in the t-th iteration; gbest t This represents the global optimal position of the entire particle swarm in the t-th iteration; w is the inertia weight, c1 and c2 are the individual and social learning factors, respectively, and rand() is a random number between 0 and 1.

[0131] The particle position update formula described above has been optimized by introducing additional parameters or nonlinear terms to improve its convergence speed and global search capability in complex problems. It incorporates the particle's historical optimal position and integrates its past trajectory information into the formula. The historical optimal position of particle i in previous iterations can be understood as the particle's center of inertia. Adjusting the coefficient γ of the memory term helps the particle utilize past search experience, accelerating the convergence process. This optimization prevents excessive fluctuations in the particle during the search process, improving convergence stability. For multi-peak optimization problems, it can effectively explore and escape local optima.

[0132] By continuously updating the position and velocity of the particles, the PSO algorithm can effectively find the optimal solution in the search space.

[0133] 6) Repeat steps 2) to 5) until the stopping condition is met (such as reaching the maximum number of iterations, or the particle position change is very small, or the fitness value converges).

[0134] Among these conditions, the particle position change being less than a threshold indicates that the change in the solution space tends to stagnate. This condition means that the position update of the particles in continuous iterations (i.e., the change in parameters) has become very small, implying that the algorithm's search activity in the solution space gradually stops. This indicates that the particle swarm is close to the optimal solution, but it does not guarantee that the global optimum has been reached.

[0135] Fitness convergence: This is mainly reflected in the change of the objective function and is related to the previous condition. The fitness value (or objective function value) is an indicator used to evaluate the quality of the solution for each particle. When the fitness value hardly changes in multiple iterations, or the change is less than a certain set threshold, it means that the found solution has reached a stable optimal state on the objective function, which can be regarded as a sign of convergence.

[0136] In optimizing neural networks using the Particle Swarm Optimization (PSO) algorithm, the goal is to minimize an objective function by adjusting parameters such as the network's weights and thresholds (i.e., biases). This objective function is typically related to the model's prediction error and reflects the neural network's performance on given input data.

[0137] Traditional wavelet neural networks typically employ gradient descent for parameter optimization. While this method is widely used in many scenarios, it also has some significant drawbacks. When the loss function is not convex, gradient descent may cause the parameters to get stuck in local minima, failing to find the global minimum. This is because gradient descent determines the next search direction based on the gradient at the current point. If the current point is near a local minimum, the gradient is close to zero, and the algorithm may mistakenly believe it has found the minimum, thus stopping the search. In contrast, the particle swarm optimization algorithm used in this invention has stronger global search capabilities and can find the global optimum with a higher probability. Since gradient descent requires multiple iterations to gradually approach the minimum, its convergence speed can be very slow, especially when the loss function is relatively flat near the minimum. Particle swarm optimization, through group cooperation and information sharing, can find the global optimum much faster.

[0138] Furthermore, the optimal weights and thresholds found by the particle swarm optimization algorithm are assigned to the wavelet neural network. The updated wavelet neural network is then trained using the processed power generation data and meteorological information training set until the allowable error or number of iterations is reached, at which point training stops. The training iteration error of the wavelet neural network with the improved wavelet function optimized by particle swarm optimization is as follows: Figure 6 As shown, compared with wavelet neural networks without particle swarm optimization, the error is reduced by 7.38% after 500 iterations.

[0139] according to Figure 1 The network training logic of this invention is as follows:

[0140] 1) First, the initial network parameters are trained using the training set;

[0141] 2) Then, based on the initial network parameters, the particle swarm optimization algorithm is used for global optimization to find the optimal solution and assign it to the wavelet neural network to update the network parameters as the optimal initial network parameters;

[0142] Understandably, while the initial network parameters can be determined through the training set, these are only the weights and thresholds obtained from preliminary training. Subsequently, the Particle Swarm Optimization (PSO) algorithm performs global optimization based on these initial parameters to find a better combination of network parameters, resulting in improved model performance. Therefore, randomly initializing network parameters prepares the initial state for subsequent training and optimization, followed by PSO optimization and retraining to obtain a better final model.

[0143] 3) Finally, the network with updated parameters is trained again using the training set (i.e., the network with the optimal initial parameters) for local adjustments and fine-tuning until the maximum number of iterations is reached or the change in the loss function value is less than the set threshold. Then the training ends and the final new energy power prediction model is obtained.

[0144] 2) PSO optimization provides better initial conditions, and 3) retraining allows for further local adjustments and fine-tuning to ensure better final performance of the model based on PSO optimization. These two are complementary: PSO provides global search, while the training set provides local convergence.

[0145] As can be seen from the above, the present invention achieves iterative optimization by training the network with a training set and using particle swarm optimization (PSO).

[0146] Input the test dataset into the trained wavelet neural network prediction model, and output the predicted dataset; evaluate the error, and output the results as follows: Figure 7 As shown, the predicted data closely matches the test data. The particle swarm optimization algorithm improves the wavelet neural network, and the predicted output of the original model is compared with that of the original model. Figure 8 As shown, the prediction accuracy has been significantly improved, as illustrated in the absolute error comparison chart. Figure 9 As shown.

[0147] The formula for the mean absolute percentage error (MAPE) of the model prediction results is as follows:

[0148]

[0149] In the formula, the true value is X. ir The predicted value is X ipre The number of predicted samples is n

[0150] Step 3: Obtain real-time meteorological data and input it into the new energy power prediction model to obtain the predicted value of new energy power.

[0151] Compared with the prior art, the beneficial effects of the present invention are at least as follows:

[0152] This invention incorporates various weather-related factors into the influencing factors of new energy power generation forecasting, thereby increasing the forecasting accuracy of new energy power generation.

[0153] This invention improves the wavelet basis function in wavelet neural networks by adopting a wavelet neural network based on multi-scale Gaussian basis functions. It has multi-scale capability, maintains good performance in noisy environments, has stronger robustness, can effectively suppress the influence of noise on prediction results, can quickly learn and adapt to data features, has a faster convergence speed, and performs better when analyzing signals containing multiple frequency components.

[0154] The basis functions used in this invention can better adapt to complex time series and nonlinear data distributions, improve the network model's ability to process complex nonlinear data, and have higher robustness, nonlinear expression ability and prediction accuracy.

[0155] This invention organically combines the particle swarm optimization algorithm with an improved wavelet neural network to optimize network parameters, further accelerating the convergence speed and increasing prediction accuracy. It has broad application prospects in fields such as power systems, wind power generation, and solar power generation.

[0156] The particle swarm optimization algorithm used in this invention can improve its convergence speed and global search capability in complex problems, ensure more efficient updating of network parameters, and ultimately improve the accuracy and generalization ability of the prediction model, exhibiting better adaptability and robustness when solving complex problems.

[0157] This disclosure can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of this disclosure.

[0158] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0159] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0160] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.

[0161] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the claims of the present invention.

Claims

1. A new energy power prediction method based on particle swarm optimization neural network, characterized in that, include: Collect historical power data of new energy power generation and corresponding historical meteorological data for the same period; Based on the collected data, a wavelet neural network based on multi-scale Gaussian basis functions was trained, and the network parameters were optimized using the particle swarm optimization algorithm to obtain a new energy power prediction model. The Gaussian basis functions at the j-th scale are: in, and All depend on input data x Adaptive parameters; It is the regularization strength parameter; It is the offset parameter; p It is the power exponent; Specifically: in, , , These are learnable parameters; Specifically: in, These are learnable parameters; Real-time meteorological data is acquired and input into the new energy power prediction model to obtain the predicted value of new energy power.

2. The new energy power prediction method based on particle swarm optimization neural network according to claim 1, characterized in that: The types of new energy sources are divided into photovoltaic and wind power; The meteorological data corresponding to the historical power data of photovoltaic power generation includes air temperature, humidity, temperature, and solar irradiance. The meteorological data corresponding to historical wind power generation power data includes wind speed, wind direction, cloud cover, and precipitation.

3. The new energy power prediction method based on particle swarm optimization neural network according to claim 1, characterized in that: The wavelet neural network, for input data x, obtains a multi-scale feature representation by combining it with multi-scale Gaussian basis functions: in, Let be the Gaussian basis function at the j-th scale, where j takes values ​​from 1 to n.

4. The new energy power prediction method based on particle swarm optimization neural network according to claim 1, characterized in that: The particle swarm optimization algorithm is used to optimize the network parameters, as detailed below: 1) Initialize a group of particles, each representing a possible combination of network parameters, and set the parameters of the particle swarm; 2) Calculate the fitness value of the neural network based on the solution for each particle; 3) For each particle, update its individual optimal position based on its current fitness value; 4) Update the global optimal position of the entire particle swarm based on the individual optimal positions of all particles; 5) Update the particle's velocity and position based on its current position, velocity, and the individual best position and global best position; 6) Repeat steps 2) to 5) until the stopping condition is met, output the optimal solution and assign it to the wavelet neural network.

5. The new energy power prediction method based on particle swarm optimization neural network according to claim 4, characterized in that: The velocity update formula for the particle is: in, This represents the velocity of the i-th particle in the (t+1)-th iteration; This represents the velocity of the i-th particle in the t-th iteration; w is the inertia weight; c1 and c2 are individual and social learning factors, respectively; rand() It is a random number between 0 and 1; Indicates the first i The particle in the first t The optimal position of the individual in the next iteration; Indicates the first i The particle in the first t The position of the next iteration; This indicates that the entire particle swarm is at the th... t The global optimal position in the next iteration.

6. The new energy power prediction method based on particle swarm optimization neural network according to claim 5, characterized in that: The particle's position update formula is as follows: in, To adjust the coefficients of the memory terms; Indicates the first i The position of the particle in the (t+1)th iteration.

7. A new energy power prediction system based on particle swarm optimization neural network, comprising the method described in any one of claims 1-6, characterized in that, The system includes: The data acquisition module is used to collect historical power data of new energy power generation and historical meteorological data for the corresponding time. The model building module is used to train a wavelet neural network based on multi-scale Gaussian basis functions based on the collected data, and to optimize the network parameters using the particle swarm optimization algorithm to obtain a new energy power prediction model. The power prediction module is used to acquire real-time meteorological data, input it into the new energy power prediction model, and obtain the predicted value of new energy power.

8. A terminal, comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to perform the steps of the method according to any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Photovoltaic generation capacity prediction method based on particle swarm algorithm wavelet neural network

    CN105139264A

  • Photovoltaic power prediction method based on wavelet transform and radial basis function neural network

    CN117290769A