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

By adopting the small wave neural network of multi -scale Gaussian base function in the new energy power forecast, and using the particle group algorithm to optimize network parameters, the problem of slow convergence and low accuracy of the existing technology have been solved, and more efficient and accurate accuracy have been achieved. New energy power forecast.

CN119340979AActive Publication Date: 2025-01-21STATE GRID JIANGSU ELECTRIC POWER CO LTD +2

Patent Information

Application Number
CN202411431722.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2025-01-21
Estimated Expiration
2044-10-14

AI Technical Summary

Technical Problem

The existing new energy power prediction methods have the disadvantages of slow convergence speed, overlapping hidden layer neurons, and easy to fall into local minimum values, making it difficult to effectively predict the intermittent, instability and volatility of new energy power generation.

Method used

A wavelet neural network based on multi-scale Gaussian basis functions is used, and the network parameters are optimized in combination with the particle swarm algorithm to improve the convergence speed and prediction accuracy.

Benefits of technology

Through the combination of improved small waves neural networks and particle group algorithms, the accuracy and speed of new energy power prediction can be significantly improved, and it can better adapt to complex time series and non -linear data distribution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119340979A_ABST
    Figure CN119340979A_ABST
Patent Text Reader

Abstract

The invention discloses a new energy power prediction method and system based on a particle swarm optimization neural network. The method comprises the steps of collecting new energy power generation historical power data and historical meteorological data of corresponding time; training a wavelet neural network based on a multi-scale Gaussian basis function according to the collected data, and optimizing network parameters by adopting a particle swarm algorithm to obtain a new energy power prediction model; and acquiring real-time meteorological data, and inputting the real-time meteorological data into the new energy power prediction model to obtain a new energy power prediction value. According to the method, the Gaussian wavelet function is improved, the multi-scale analysis capability of the Gaussian wavelet function is enhanced, the improved wavelet function is organically combined with the neural network, and the wavelet neural network is optimized by using the particle swarm optimization, so that the convergence speed and the power prediction precision can be remarkably increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of renewable energy power generation, and relates to a renewable energy power prediction method and system based on a particle swarm optimization neural network. Background Art

[0002] Renewable energy power generation technology has attracted widespread attention due to its clean, efficient and safe characteristics, and photovoltaic power stations and wind power stations have been built in large numbers. However, since renewable energy power generation is greatly affected by environmental factors, its intermittent, unstable and volatile performance has brought adverse effects on system debugging and power grid planning. Therefore, the establishment and development of the model of renewable energy power prediction system is of great significance.

[0003] At present, there are two major methods for power prediction: one is the traditional prediction method, which mainly includes: time series method, regression analysis method, trend extrapolation method: the traditional prediction method is mainly based on experience and has high requirements for historical data: it is not suitable for time series with large load sequence fluctuations; it is impossible to fully consider various factors affecting the load: the model initialization is difficult and requires rich experience and high skills. The other is the modern prediction method, which mainly includes system dynamics concept prediction method, fuzzy prediction method, expert system prediction method, neural network prediction method, and gray prediction method. Among them, the neural network prediction method is a prediction method that has developed rapidly in recent years. It is widely used in situations with high nonlinearity and various uncertainties due to its strong adaptability, parallel processing, distributed storage, and strong fault tolerance. However, it also has disadvantages such as slow convergence speed, overlapping of hidden layer neurons, and easy to fall into local minima. Summary of the invention

[0004] In order to solve the deficiencies in the prior art, the present invention provides a new energy power prediction method and system based on particle swarm optimization neural network, which improves the Gaussian wavelet function to enhance its multi-scale analysis capability, organically combines the improved wavelet function with the neural network, and uses the particle swarm algorithm to optimize the wavelet neural network, thereby increasing the convergence speed and power prediction accuracy.

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

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

[0007] Collect historical power data of renewable energy power generation and historical meteorological data of the corresponding time;

[0008] A wavelet neural network based on multi-scale Gaussian basis functions is trained based on the collected data, and a particle swarm algorithm is used to optimize the network parameters to obtain a new energy power prediction model;

[0009] Obtain real-time meteorological data, input it into the new energy power prediction model, and obtain the new energy power prediction value.

[0010] Preferably, the types of the new energy are photovoltaic and wind power;

[0011] The meteorological data corresponding to the historical power data of photovoltaic power generation include air temperature, humidity, temperature, and light irradiance;

[0012] The meteorological data corresponding to the historical wind power data include 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 a multi-scale Gaussian basis function:

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

[0015] Among them, g j (x) is the Gaussian basis function of the jth scale, and j is 1-n.

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

[0017]

[0018] Among them, μ 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 power exponent.

[0020] Preferably, μ j (x) Specifically:

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

[0022] Among them, α j , β j , γ j are learnable parameters.

[0023] Preferably, σ j (x) Specifically:

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

[0025] Among them, δ j , η j , j are learnable parameters.

[0026] Preferably, the particle swarm algorithm is used to optimize the network parameters, specifically as follows:

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

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

[0029] 3) For each particle, update its individual best position according to 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 speed and position based on the particle's current position, speed, individual best position, and global best position;

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

[0033] Preferably, the particle speed update formula is:

[0034]

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

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

[0037] w is the inertia weight;

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

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

[0040] represents the individual best position of the i-th particle at the t-th iteration;

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

[0042] gbestt Represents the global optimal position of the entire particle swarm at the tth iteration.

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

[0044]

[0045] Among them, γ is the coefficient of the adjustment memory term;

[0046] represents the position of the i-th particle at the t+1th iteration.

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

[0048] Data collection module, used to collect historical power data of renewable energy generation and historical meteorological data of corresponding time;

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

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

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

[0052] A computer-readable storage medium stores a computer program, which implements the steps of the method when executed by a processor.

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

[0054] The present invention adds various weather influencing factors into the influencing factors of renewable energy power generation prediction, thereby increasing the prediction accuracy of renewable energy power generation.

[0055] The present invention improves the wavelet basis function in the wavelet neural network, adopts a wavelet neural network based on a multi-scale Gaussian basis function, has multi-scale capability, can maintain good performance in a noisy environment, has stronger robustness, can effectively suppress the influence of noise on the prediction results, can quickly learn and adapt to data characteristics, has a faster convergence speed, and performs superiorly when analyzing signals containing multiple frequency components.

[0056] The basis function adopted in the present invention can better adapt to complex time series and nonlinear data distribution, improve the processing ability of the network model for complex nonlinear data, and has higher robustness, nonlinear expression ability and prediction accuracy.

[0057] The present invention organically combines the particle swarm algorithm with the improved wavelet neural network to optimize network parameters, further accelerates the convergence speed, increases the prediction accuracy, and has broad application prospects in the fields of power systems, wind power generation, solar power generation, etc.

[0058] The particle swarm algorithm adopted in the present invention can improve its convergence speed and global search ability in complex problems, ensure that the updating of network parameters is more efficient, and ultimately improve the accuracy and generalization ability of the prediction model, showing better adaptability and robustness in solving complex problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 It is a flow chart of the new energy power prediction method based on particle swarm optimization neural network;

[0060] Figure 2 It is the schematic diagram of the particle swarm optimization neural network;

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

[0062] Figure 4 It is the wavelet neural network prediction output graph of the improved wavelet function;

[0063] Figure 5 It is the training result diagram of improved wavelet function and unimproved wavelet function;

[0064] Figure 6 This is the training result diagram of the wavelet neural network using particle swarm optimization to improve the wavelet function;

[0065] Figure 7 It is the output graph of the prediction of the wavelet neural network with improved wavelet function by adding particle swarm optimization;

[0066] Figure 8 This is a comparison chart of the prediction output with and without particle swarm optimization;

[0067] Fig. 9 It is the absolute error comparison chart; DETAILED DESCRIPTION

[0068] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The embodiments described in this application are only part of the embodiments of the present invention, not all of them. Based on the spirit of the present invention, other embodiments obtained by ordinary technicians in this field without creative work are all within the scope of protection of the present invention.

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

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

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

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

[0073] Cloud cover refers to the proportion of the sky covered by clouds, expressed in "ten degrees of cloud cover" with a value range of 0 to 10, where 0 represents a clear sky with no clouds and 10 represents complete cloud cover.

[0074] When predicting photovoltaic power, the photovoltaic historical power data and its corresponding historical measured air temperature, humidity, temperature, and light irradiance are used to train the network to obtain the photovoltaic power prediction model. The photovoltaic power prediction can be obtained by inputting the latest predicted air temperature, humidity, temperature, and light irradiance;

[0075] When predicting wind power, the historical wind power data and its corresponding historical measured wind speed, wind direction, cloud cover, and precipitation are used to train the network to obtain a wind power prediction model. The latest predicted wind speed, wind direction, cloud cover, and precipitation are input to obtain the wind power prediction.

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

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

[0078] The historical power generation data of new energy include: the power generation of photovoltaic power per unit time in the past (i.e. photovoltaic power generation) and the power generation of wind power per unit time in the past (i.e. wind power generation).

[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, 80 hours from 336h to 415h are test data, and historical measured meteorological data of the corresponding time are obtained, these data are normalized to [0,1].

[0083] Further preferably, a dynamic weighted average method is used to dynamically adjust the data weight of each time point to improve the preprocessing effect on the time series data.

[0084] Suppose there is a set of time series data The dynamic weight at each moment T is defined as:

[0085]

[0086] xT is the data value at time T; is the mean of the overall time series; α is a parameter for adjusting the sensitivity of the weight, which is used to control the degree of response of the weight to the deviation of the data from the mean; M is the length of the time series of the data.

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

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

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

[0090]

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

[0092] In time series prediction, Gaussian basis functions are usually used to build models to fit and predict time series data. In order to improve the accuracy of prediction, the present invention improves the Gaussian basis function so that it has the ability of multi-scale analysis. Specifically, the improved Gaussian basis function introduces a scale parameter so that the basis function can 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, and then for each scale, a Gaussian kernel function is constructed and convolved with the signal.

[0093] In this way, coefficients at different scales can be obtained, thereby capturing the characteristics of the signal at different scales. Finally, by weighted summing the coefficients at all scales, a multi-scale reconstructed signal can be obtained, which is the result of a multi-scale analysis of the original signal.

[0094] Assuming that there are multiple Gaussian basis functions of different scales, the scale parameter is introduced, and the expression of the Gaussian wavelet function is initially improved:

[0095]

[0096] Among them, μ j , σ j Usually represent the mean parameter and scale parameter respectively. j represents the center position at the jth scale, σ j represents the scale parameter at the jth scale.

[0097] μ j is the mean of the jth scale basis function, σ i is the corresponding standard deviation, and x is the input data of the network. The basis function is usually a wavelet basis function in a wavelet neural network (WNN), which has a localized characteristic and can adapt to different components of the signal by translation and scaling. It can be a Gaussian wavelet basis function, but is not limited to a Gaussian basis function.

[0098] In order to improve the model's ability to process complex nonlinear data, the wavelet basis function shown in formula (3) is further optimized and improved by changing the parameter μ j , σ jReplaced with adaptive parameters, so that it can better adapt to the changing characteristics of complex data. The following is the optimized design of the present invention:

[0099]

[0100] Original μ j is a constant, representing the mean of the jth scale. In order to enhance the adaptability of the wavelet basis function, it is changed to a function μ that depends on the input x. j (x) may be in the form of:

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

[0102] where α j , β j , γ j are learned parameters used to adaptively adjust the mean, reflecting the nonlinear characteristics of the data and more flexibly adapting to changes in complex data. These parameters are learned through optimization algorithms (such as particle swarm optimization) during training and directly affect the mean function.

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

[0104] The original standard deviation σ j Replaced by 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 is the adaptive parameter, ζ jare adjustable parameters that control their dependence on x to adaptively adjust the width of the wavelet basis function to adapt to different data distributions. These parameters are also learned through the optimization algorithm during the training process and are used to dynamically adjust the width of the wavelet function to adapt to different data distributions. Furthermore, δ j As the base value of 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 Used to adjust the rate of change of the wavelet width, which can usually be initialized to [0.1, 1]. This range ensures that the wavelet function can respond when local data changes. j Determines the offset of the standard deviation function to the input data and is usually set to a value close to the mean of the data. For example, if the mean of the input data x is around 0, ζ j Can be initialized in [-1,1].

[0107] An additional nonlinear term is introduced in the denominator, λ is the regularization coefficient, ν j is a learnable parameter, and p is an exponent that controls the power. The introduction of this term can help control the sensitivity of the wavelet basis function to outliers and enhance its ability to adapt to the distribution of complex data. These parameters can be set to initial values ​​empirically, but the final values ​​are usually optimized through training to ensure the robustness of the model to abnormal data. Furthermore, λ can usually be selected between [0.01, 0.1]. A smaller λ makes the regularization effect mild, while a larger λ increases the model's penalty for outliers. ν j is an offset parameter used to capture a specific location or variation in the data and can be set around the mean or median of the input data. For example, if the mean of x is 0, ν j It can be selected between [-1,1]. p controls the sensitivity of the regularization term to outliers and is usually set between [1,3]. Larger p values ​​are 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 distribution, and has higher robustness, nonlinear expression ability and prediction accuracy.

[0109] For the input time series data x, by combining it with multiple optimized and improved Gaussian basis functions, 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 is the output graph of the wavelet neural network prediction without the improved wavelet function. Figure 4 This is the wavelet neural network prediction output diagram of the improved wavelet function. By comparing the two diagrams, it can be seen that the improved wavelet function increases the prediction accuracy. Figure 5 This is a comparison chart of the iterative errors of the two. It can be seen that after the improvement, the convergence speed can also be increased.

[0113] Further preferably, a particle swarm algorithm is introduced to optimize the parameters such as the weight and threshold of the wavelet neural network, so as to overcome the shortcomings of the traditional wavelet neural network gradient descent method and improve the convergence speed and prediction accuracy;

[0114] The particle swarm algorithm is used to find the optimal weight parameters and threshold parameters of the wavelet neural network. The basic principle is as follows: suppose there is a group of particles, each particle represents a potential solution in the search space. Each particle continuously adjusts its position and speed based on its own experience and the experience of the group to find the optimal solution.

[0115] The steps of particle swarm algorithm are:

[0116] 1) Initialize the particle swarm: Initialize a group of particles (generate the position and speed of the particle swarm), each particle represents a possible solution (i.e., the weights and thresholds of the wavelet neural network, learnable parameters, etc., which determine the connection strength and activation characteristics of the neural network), set the particle swarm parameters: maximum speed (limits the amplitude of particle position change in each iteration), set to 0.151; minimum error (as one of the termination conditions of the algorithm), set to 0.001; inertia weight (determines the balance between particles when searching for global and local optimal solutions, the maximum weight is set to 0.90; the minimum weight is set to 0.30); the maximum number of iterations is set to 100;

[0117] In each iteration, the particle updates its position according to the difference between its current solution and the global optimal solution, and optimizes the network parameter combination by minimizing the error function. This process ensures that the wavelet neural network can more effectively cope with 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 the individual best position (pbest): For each particle, update its individual best position according to its current fitness value.

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

[0121]

[0122] By considering the particle position changes of several past iterations, pbest is updated smoothly to avoid unstable individual best position updates caused by drastic fluctuations in a single fitness value. The fuzzy system automatically balances the proportion of the current solution and the historical solution based on different fitness value changes (increase or decrease).

[0123] The soft decision-making method of fuzzy logic is used to reduce the instability in the update of the individual best position and enhance the smoothness of convergence. Multiple historical positions are considered instead of just updating the individual best position based on the current fitness value.

[0124] 4) Update the group best position (gbest): Update the global best position of the entire particle swarm based on the individual best positions of all particles.

[0125] 5) Update particle position: For each particle, update the particle position according to the particle's current position, velocity, and the influence of the individual and global optimal positions.

[0126] Speed ​​update formula:

[0127]

[0128] Position update formula:

[0129]

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

[0131] The above particle position update formula is optimized by introducing additional parameters or nonlinear terms to improve its convergence speed and global search ability in complex problems. It introduces the historical optimal position of the particle and integrates its past trajectory information. The historical optimal position of particle i in the previous iteration can be understood as the inertia center of the particle. Adjusting the coefficient γ of the memory term can help the particle use past search experience to speed up the convergence process. The above optimization can prevent excessive fluctuations of particles during the search process and improve convergence stability. For multi-peak optimization problems, it can effectively explore and jump out of the local optimum.

[0132] By continuously updating the position and velocity of 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 position of the particle changes very little and the fitness value converges).

[0134] Among them, the change of particle position is less than the threshold: it means that the change of solution in space tends to stagnate. This condition means that the particle position update (i.e. parameter change) in continuous iterations has been very small, which means that the algorithm's search activity in the solution space gradually stops. This shows that the particle swarm is close to the optimal solution, but it does not guarantee that it has reached the global optimum.

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

[0136] In the process of optimizing neural networks using the particle swarm optimization algorithm (PSO), the optimization goal is to minimize an objective function by adjusting the network's weights and thresholds (i.e., bias). This objective function is usually related to the model's prediction error and reflects the performance of the neural network on given input data.

[0137] Traditional wavelet neural networks usually use the gradient descent method for parameter optimization. Although this method is widely used in many scenarios, it also has some shortcomings that cannot be ignored. When the loss function is not a convex function, the gradient descent method may cause the parameters to fall into the local minimum point and fail to find the global minimum. This is because the gradient descent method determines the next search direction based on the gradient of the current point. If the current point is near the local minimum and the gradient is close to zero, the algorithm will mistakenly think that the minimum point has been found, thereby stopping further search. In contrast, the particle swarm algorithm used in the present invention has a stronger global search capability and can find the global optimal solution with a higher probability. Since the gradient descent method requires multiple iterations to gradually approach the minimum, especially when the loss function is relatively flat near the minimum, the convergence speed may be very slow. The particle swarm algorithm can find the global optimal solution faster through group collaboration and information sharing.

[0138] Furthermore, the optimal weights and thresholds found by the particle swarm algorithm are assigned to the wavelet neural network, and the updated wavelet neural network is trained using the processed power generation data and meteorological information training set until the allowable error or number of iterations is reached, and the training stops. Figure 6 As shown, compared with the wavelet neural network without adding particle swarm optimization, the error is reduced by 7.38% in 500 iterations.

[0139] according to Figure 1 , the network training logic of the present invention is:

[0140] 1), first, use the training set to train the initial network parameters;

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

[0142] It is understandable that although the initial network parameters can be determined through the training set, these are only the weights and thresholds obtained through preliminary training. After that, the particle swarm optimization (PSO) algorithm will perform global optimization based on these initial parameters to find a better combination of network parameters to make the model perform better. Therefore, randomly initializing the network parameters is to prepare the initial state for subsequent training and optimization, and then PSO optimization and retraining are used to obtain a better final model.

[0143] 3), finally, the network with updated training parameters (i.e., the network with the optimal initial network parameters) is trained again to perform 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. The training is terminated to obtain the final new energy power prediction model.

[0144] 2) PSO optimization provides better initial conditions, and 3) retraining can further adjust and fine-tune the local conditions to ensure that the final performance of the model based on PSO optimization is better. The two complement each other, PSO provides global search, and the training set provides local convergence.

[0145] As can be seen from the above, the present invention realizes mutual iterative optimization through training network with training set and particle swarm optimization (PSO).

[0146] Input the test data set into the trained wavelet neural network prediction model and output the predicted data set; evaluate the error and output the result as follows Figure 7 As shown in Figure 2, the predicted data is very consistent with the test data. The prediction output of the improved wavelet neural network optimized by the particle swarm algorithm is compared with the original model. Figure 8 As shown in Figure 2, the prediction accuracy has been greatly improved, and the absolute error comparison chart is as follows: Fig. 9 shown.

[0147] The mean absolute percentage error (MAPE) formula 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 prediction samples is n

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

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

[0152] The present invention adds various weather influencing factors into the influencing factors of renewable energy power generation prediction, thereby increasing the prediction accuracy of renewable energy power generation.

[0153] The present invention improves the wavelet basis function in the wavelet neural network, adopts a wavelet neural network based on a multi-scale Gaussian basis function, has multi-scale capability, can maintain good performance in a noisy environment, has stronger robustness, can effectively suppress the influence of noise on the prediction results, can quickly learn and adapt to data characteristics, has a faster convergence speed, and performs superiorly when analyzing signals containing multiple frequency components.

[0154] The basis function adopted in the present invention can better adapt to complex time series and nonlinear data distribution, improve the processing ability of the network model for complex nonlinear data, and has higher robustness, nonlinear expression ability and prediction accuracy.

[0155] The present invention organically combines the particle swarm algorithm with the improved wavelet neural network to optimize network parameters, further accelerates the convergence speed, increases the prediction accuracy, and has broad application prospects in the fields of power systems, wind power generation, solar power generation, etc.

[0156] The particle swarm algorithm adopted in the present invention can improve its convergence speed and global search ability in complex problems, ensure that the updating of network parameters is more efficient, and ultimately improve the accuracy and generalization ability of the prediction model, showing better adaptability and robustness in solving complex problems.

[0157] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

[0158] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

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

[0160] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state 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 "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of 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., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0161] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection 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 renewable energy power generation and historical meteorological data of the corresponding time; A wavelet neural network based on multi-scale Gaussian basis functions is trained based on the collected data, and a particle swarm algorithm is used to optimize the network parameters to obtain a new energy power prediction model; Obtain real-time meteorological data, input it into the new energy power prediction model, and obtain the new energy power prediction value.

2. The new energy power prediction method based on particle swarm optimization neural network according to claim 1 is characterized in that: The types of renewable energy are photovoltaic and wind power; The meteorological data corresponding to the historical power data of photovoltaic power generation include air temperature, humidity, temperature, and light irradiance; The meteorological data corresponding to the historical wind power data include 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 is characterized in that: The wavelet neural network, for input data x, obtains a multi-scale feature representation by combining it with a multi-scale Gaussian basis function: y(x)=[g1(x),g2(x),…,g n (x)] Among them, g j (x) is the Gaussian basis function of the jth scale, and j is 1-n.

4. The new energy power prediction method based on particle swarm optimization neural network according to claim 1 is characterized in that: The Gaussian basis function of the j-th scale is: Among them, μ j (x) and σ j (x) are all adaptive parameters that depend on the input data x; λ is the regularization strength parameter; ν j is the offset parameter; p is the power exponent.

5. The new energy power prediction method based on particle swarm optimization neural network according to claim 4 is characterized in that: μ j (x) Specifically: m j (x)=a j x+b j sin(γ j x) Among them, α j , β j , γ j are learnable parameters.

6. The new energy power prediction method based on particle swarm optimization neural network according to claim 4 is characterized in that: σ j (x) Specifically: s j (x)=δ j +n j |x-z j | p Among them, δ j , η j , j are learnable parameters.

7. The new energy power prediction method based on particle swarm optimization neural network according to claim 1 is characterized in that: The particle swarm algorithm is used to optimize the network parameters, as follows: 1) Initialize a group of particles, each particle represents a possible combination of network parameters, and set the parameters of the particle group; 2) Calculate the fitness value of the neural network based on the solution of each particle; 3) For each particle, update its individual best position according to 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 speed and position based on the particle's current position, speed, individual best position, and global best position; 6) Repeat steps 2) to 5) until the stopping condition is reached, output the optimal solution and assign it to the wavelet neural network.

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

9. The new energy power prediction method based on particle swarm optimization neural network according to claim 8 is characterized in that: The particle position update formula: Among them, γ is the coefficient of the adjustment memory term; represents the position of the i-th particle at the t+1th iteration.

10. A new energy power prediction system based on particle swarm optimization neural network, using the method described in any one of claims 1 to 9, characterized in that: The system comprises: Data collection module, used to collect historical power data of renewable energy generation and historical meteorological data of corresponding time; The model building module is used to train the wavelet neural network based on the multi-scale Gaussian basis function according to the collected data, and use the particle swarm algorithm to optimize the network parameters to obtain the new energy power prediction model; The power prediction module is used to obtain real-time meteorological data, input it into the new energy power prediction model, and obtain the new energy power prediction value.

11. 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 execute the steps of the method according to any one of claims 1-9.

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

Citation Information

Patent Citations

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

    CN105139264A

  • Particle swarm optimization-based multi-resolution wavelet neural network power consumption prediction method

    CN106779177A

  • The invention discloses a wWind power plant wind speed combined prediction method based on wavelet analysis

    CN109615142A

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

    CN117290769A

  • Numerical weather forecast correction method and device fusing multi-source data and self-organizing neural network

    CN117574226A

Cited By

  • Electric energy meter capable of enhancing communication efficiency and concentrator

    CN120151690A

  • An electric energy meter and concentrator with enhanced communication efficiency

    CN120151690B