Generated power prediction method for optimizing GRNN model based on CPO algorithm
By introducing CPO algorithm to optimize the smoothing factor in GRNN model, the problems of low parameter optimization efficiency and insufficient adaptability in wind power power prediction are solved, and wind power power prediction with higher accuracy and stronger generalization capabilities are achieved.
Patent Information
- Application Number
- CN202510095243.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-05-27
AI Technical Summary
Existing wind power power prediction methods are difficult to effectively capture the complex nonlinear dynamic characteristics of wind power power sequences, and the parameter optimization efficiency is low, which makes it easy to fall into local optimization and lack of adaptability.
The power generation power prediction method based on the CPO algorithm is adopted to optimize the GRNN model, and the smoothing factor of the GRNN model is globally optimized through the CPO algorithm, and the optimal value of the smoothing factor is iteratively updated with multiple strategies (visual, auditory, olfactory, and physical attack strategies).
It significantly improves the accuracy of power generation power timing prediction, improves the nonlinear fitting ability and generalization ability of the model, can better adapt to the complex dynamic characteristics of wind power data, and provides more efficient and reliable prediction results.
Smart Images

Figure CN120045897A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of wind farm power prediction, and particularly relates to a power prediction method for optimizing a GRNN model based on a CPO algorithm. Background Technique
[0002] As a clean and renewable energy source, wind power has developed rapidly in recent years under the dual pressures of energy shortage and environmental protection, effectively alleviating the problem of energy shortage. However, the intermittency and randomness of wind power have significantly increased the uncertainty of power system operation, posing challenges to the safety, stability and real-time scheduling of the system. Especially when the proportion of wind power gradually increases, its volatility has a more prominent impact on the large power grid. For example, the random fluctuations of wind power may lead to unstable voltage and frequency; the high proportion of wind power access may cause system power imbalance; real-time scheduling and control need to handle more uncertainties, further increasing the complexity of power system operation. To address these issues, high-precision prediction of wind power has gradually become an important research direction for ensuring the stable operation of the power grid.
[0003] Existing wind power prediction methods mainly rely on statistical analysis and machine learning models, but there are still obvious deficiencies. Traditional statistical models (such as time series models) are difficult to effectively model the nonlinear dynamic characteristics of wind power sequences, resulting in limited prediction accuracy; while machine learning models (such as generalized regression neural networks) although have certain nonlinear fitting capabilities, their performance depends on the reasonable setting of hyperparameters (such as smoothing factors), usually relying on manual experience adjustment, which is inefficient and difficult to achieve global optimality. Although some intelligent optimization algorithms (such as particle swarm optimization and genetic algorithms) have been introduced in recent years to assist in model parameter optimization, these algorithms are prone to falling into local optima and are insufficient in adaptability in dynamic environments, resulting in limited generalization ability of the prediction model.
[0004] Therefore, how to design a prediction method that can accurately capture the complex characteristics of wind power sequences, while having efficient parameter optimization capabilities and strong adaptability to dynamic data distributions, is a key problem that urgently needs to be solved in the current technical field. Summary of the Invention
[0005] The present invention proposes a method for predicting power generation based on optimizing the GRNN model with the CPO algorithm. By optimizing the smoothing factor of the GRNN model with the CPO algorithm, the problem of being easily trapped in local optimal solutions in traditional methods is effectively avoided, thus significantly improving the accuracy of time-series prediction of power generation. Through an optimization strategy that combines global search and local development, the optimized GRNN model not only has higher prediction accuracy, but also exhibits a faster convergence speed and stronger generalization ability, and can better adapt to the complex dynamic characteristics of wind power data, providing a more efficient and reliable technical solution for the operation and scheduling of wind farms.
[0006] To achieve the above object, the present invention is implemented through the following technical solutions:
[0007] A method for predicting power generation based on optimizing the GRNN model with the CPO algorithm, characterized by including the following steps:
[0008] Step 1: Obtain multi-dimensional historical data for power generation prediction. The multi-dimensional historical data includes wind speed and wind direction data at different heights of the wind measurement tower, wind speed and wind direction data at the hub height, as well as multi-source feature data such as temperature, air pressure, humidity, and actual power generation.
[0009] Step 2: Preprocess the multi-dimensional historical data, including data cleaning, denoising, and normalization processing, and divide the multi-dimensional historical data into a training set and a test set according to a preset ratio.
[0010] Step 3: Construct a GRNN model based on the training set. The GRNN model captures the non-linear mapping relationship between input features and power generation output through an input layer, a pattern layer, a summation layer, and an output layer.
[0011] Step 4: Optimize the smoothing factor of the GRNN model using the CPO algorithm, including initializing population parameters and setting the search range of the smoothing factor, and iteratively updating the optimal value of the smoothing factor by combining various strategies of the CPO algorithm.
[0012] Step 5: Predict the power generation of the test set data based on the optimized GRNN model, and calculate the error between the prediction result and the actual value to complete the verification of the model performance.
[0013] As a preferred solution of the present invention, in Step 1, the multi-dimensional historical data is collected in real time by sensors installed at different heights of 10 meters, 30 meters, 50 meters, and 70 meters of the wind measurement tower and sensors of the hub.
[0014] As a preferred solution of the present invention, in Step 2, the specific method for preprocessing the multi-dimensional historical data includes the following steps:
[0015] Normalize the multi-dimensional historical data. The normalization formula is as follows:
[0016]
[0017] Where: x g is the normalized data value; X is the original data value; is the average value of the original data; s is the standard deviation of the original data;
[0018] Remove outliers from the normalized data through the following criteria:
[0019]
[0020] Where, v g is the residual; is the average value of the normalized data; s′ is the standard deviation of the normalized data;
[0021] Divide the dataset after removing outliers into a training set and a test set according to a ratio of 7:3. Use the wind speed and direction data at different heights of the wind measurement tower, the wind speed and direction data at the hub height, as well as the temperature, pressure, and humidity as input data, and the actual power generation as output data.
[0022] As a preferred solution of the present invention, in step 3, the GRNN model has a four-layer forward propagation neural network with non-linear approximation ability. After the data is input into the network, it passes through the input layer, pattern layer, summation layer, and output layer in sequence to complete the prediction of the power generation. Specifically, it includes the following steps:
[0023] Input layer: Receive the preprocessed multi-source feature data of the training set and transfer this data to the pattern layer. The number of nodes in the input layer is equal to the dimension of the multi-source feature data;
[0024] Pattern layer: Based on the data transferred from the input layer, use the Gaussian function to process the training samples. The number of nodes in the pattern layer is equal to the number of training samples. The calculation formula is:
[0025]
[0026] Where: g i is the output value of the pattern layer; x i is the training sample; x j is the input sample; σ is the smoothing factor; the output data of the pattern layer is transferred to the summation layer;
[0027] Summation layer: Receive the data output by the pattern layer and perform a weighted summation operation on the output of the pattern layer to generate intermediate data. The calculation formula is:
[0028]
[0029] Among them: S D is the weighted summation denominator of the output data of the pattern layer; S Ni is the weighted summation numerator of the output data of the pattern layer; n is the number of training samples; w ij is the weighting coefficient;
[0030] Output layer, which receives the data output by the summation layer and calculates the predicted power generation value. The calculation formula is:
[0031]
[0032] Among them: O j is the predicted power generation value.
[0033] As a preferred solution of the present invention, in step 4, the CPO algorithm simulates four defense strategies of the crested porcupine, including visual strategy, auditory strategy, olfactory strategy and physical attack strategy, and is used to dynamically adjust the smoothing factor of the GRNN model. Specifically, it includes the following steps:
[0034] Through the visual strategy, the position of the optimization parameter is dynamically adjusted in the exploration stage, simulating the visual tracking behavior of the crested porcupine for potential solutions. The position update is determined by the following formula:
[0035]
[0036] Among them: is the position of the i-th candidate solution in the (t + 1)-th generation, representing the position of the optimization parameter in the next generation; is the position of the i-th candidate solution in the t-th generation; is the current optimal solution position in the t-th generation population; is the velocity vector of the i-th candidate solution in the t-th generation; γ 1 is a random number obeying the normal distribution, representing the random perturbation of the candidate solution; γ 2 is a random number in the interval [0, 1], used to simulate the exploration randomness of the candidate solution;
[0037] Through the velocity update strategy, the position of the candidate solution is updated in combination with the position of the random reference solution. The specific formula is:
[0038]
[0039] Among them: is the position of the r-th reference individual randomly selected when iterating to the t-th generation, and r is a random number between [1, X].
[0040] As a preferred solution of the present invention, the auditory strategy dynamically adjusts the position of the candidate solution by simulating the sound waves emitted by the crested porcupine to threaten the predator, and is specifically calculated by the following formula:
[0041]
[0042] Wherein: is a binary random vector for making a defense decision; is the predator position; γ 3 is a random number generated within the range of [0, 1]; r 1 and r 2 are two random integers within the range of [1, X]; is the position of the r 1 th individual randomly selected in the t-th generation; is the position of the r 2 th individual randomly selected in the t-th generation.
[0043] As a preferred embodiment of the present invention, the olfactory strategy disperses the predator and optimizes the position of the candidate solution by simulating the release of odor by the crested porcupine in a dangerous environment, and is specifically calculated by the following formula:
[0044]
[0045] Wherein: is the odor diffusion factor; is the position of the r 3 th individual randomly selected in the t-th generation; δ is a parameter controlling the search direction, taking values of ±1:
[0046]
[0047] β t is the defense factor, and the calculation formula is:
[0048]
[0049] Wherein: t max is the maximum number of iterations;
[0050] is the odor diffusion factor, and the calculation formula is:
[0051]
[0052] Wherein: is the objective function value, used to evaluate the fitness of the current candidate solution; is the sum of the fitness values of all candidate solutions in the current t-th generation; is the position of the k-th candidate solution in the t-th generation; x is the total number of the candidate solution population; ε is a small positive value to avoid a zero denominator.
[0053] As a preferred embodiment of the present invention, the physical attack strategy precisely adjusts the position of the candidate solution by simulating the physical defense behavior of the crested porcupine when a predator approaches, specifically calculated by the following formula:
[0054]
[0055] Where: is the position of the i-th candidate solution in the (t + 1)-th generation; is the optimal solution position of the crested porcupine population in the t-th generation; α is the convergence speed factor, controlling the convergence speed of the solution; γ 4 and γ 5 are random values within the interval [0, 1];
[0056] In the physical attack strategy, the collision force received by the candidate solution is calculated by the formula:
[0057]
[0058] Where: γ 6 is a random scaling factor within the interval [0, 1]; and are the position velocities of the candidate solution in the (t + 1)-th generation and the t-th generation; Δt is the time step, representing the time interval between each iteration;
[0059] m i is the mass of the individual, representing the importance of the candidate solution, and the calculation formula is:
[0060]
[0061] Where: is the objective function value of the i-th candidate solution in the t-th generation; is the position fitness function value of the k-th candidate solution, used to evaluate the optimization performance of the current solution; N is the total number of candidate solutions in the population.
[0062] As a preferred embodiment of the present invention, in step 5, based on the optimized GRNN model, the power generation is predicted for the training set and the test set respectively, and the model performance is evaluated by the error between the prediction result and the true value. The performance evaluation includes the following indicators:
[0063] Coefficient of determination R 2 is:
[0064]
[0065] The mean absolute error MAE is:
[0066]
[0067] The root mean square error RMSE is as follows:
[0068]
[0069] The mean absolute percentage error MAPE is as follows:
[0070]
[0071] Where: n is the number of samples; x i is the experimental output; is the predicted output of the i-th sample data; is the average of all predicted outputs; The higher the R 2 value, the lower the RMSE, MAE, and MAPE values, indicating that the prediction accuracy of the model is higher.
[0072] As a preferred embodiment of the present invention, the CPO algorithm is optimized by dynamically adjusting the smoothing factor of the GRNN model, specifically including:
[0073] Generate candidate solutions through population initialization, optimize the candidate solutions by introducing Gaussian distribution random perturbations and diversity constraints, and dynamically update the positions of the candidate solutions based on the fitness evaluation function to expand the search range;
[0074] In the middle and late stages of optimization, perform local search on the historical optimal solutions of the candidate solutions, and adjust the distance between the candidate solutions and the optimal solutions through dynamic convergence factors;
[0075] Adjust the value range of the smoothing factor, and optimize the nonlinear fitting ability of the network according to the input data distribution;
[0076] Use R 2 , RMSE, MAE, and MAPE performance indicators to verify the performance of the optimized model.
[0077] Compared with the prior art, the beneficial effects of the present invention are as follows: By acquiring multi-dimensional historical data, including wind speed and wind direction data at different heights of the anemometer tower, wind speed and wind direction data at the hub height, and multi-source characteristic data such as temperature, air pressure, humidity, and actual power generation, the present invention ensures the comprehensiveness and diversity of the model input data, providing a reliable basis for capturing the complex dynamic characteristics of wind power. In the data preprocessing stage, through cleaning, denoising, and normalization, the interference of data noise and outliers is effectively eliminated, improving the data quality. At the same time, the division of the training set and the test set lays a solid foundation for model training and verification. In the model construction stage, a Generalized Regression Neural Network (GRNN) is adopted. Through the collaborative work of the input layer, pattern layer, summation layer, and output layer, it can accurately capture the non-linear mapping relationship between the input features and the power generation output, enhancing the model's fitting ability for complex data characteristics. Compared with traditional linear models, the GRNN model is more adaptable to the dynamic change characteristics of wind power data, improving the prediction accuracy. In the optimization stage, the Crown Porcupine Optimization (CPO) algorithm is used to optimize the smoothing factor of the GRNN model. By initializing the population parameters and setting the search range, and combining multiple strategies (such as vision, hearing, smell, physical attack, etc.) to iteratively update the optimal value of the smoothing factor, the problem that the smoothing factor in traditional methods depends on manual adjustment and is prone to falling into local optimum is solved. The CPO algorithm can achieve precise optimization of the smoothing factor through the combination of global search and local development, enhancing the model's non-linear fitting ability and significantly improving the prediction stability. Finally, the optimized GRNN model is used to predict the power generation of the test set data, and the error between the prediction result and the actual value is calculated to verify the performance of the model. Through the method of the present invention, not only can the accuracy of wind power prediction be significantly improved, the error be reduced, but also it has strong adaptability and can cope with the dynamic changes in data distribution in the wind farm environment, providing important technical support for the dispatching and operation of large-scale wind power connected to the grid. Description of the Drawings
[0078] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0079] Wherein:
[0080] Figure 1 is the schematic flow chart of the method of the present invention;
[0081] Figure 2 is the schematic diagram of the GRNN model of the present invention;
[0082] Figure 3 Schematic diagram of the CPO-GRNN model of the present invention;
[0083] Figure 4 Curve graph of the fitness value change of the CPO-GRNN algorithm in the embodiment of the present invention;
[0084] Figure 5 Training effect diagram of the GRNN model in the embodiment of the present invention;
[0085] Figure 6 Prediction effect diagram of the GRNN model in the embodiment of the present invention;
[0086] Figure 7 Training effect diagram of the CPO-GRNN model in the embodiment of the present invention;
[0087] Figure 8 Prediction effect diagram of the CPO-GRNN model in the embodiment of the present invention. Specific implementation manner
[0088] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the described embodiments of the present invention fall within the scope of protection of the present invention.
[0089] Embodiment 1
[0090] As Figure 1 shown, it is an embodiment of the present invention. This embodiment provides a power generation power prediction method for optimizing a GRNN model based on a CPO algorithm, including:
[0091] Step 1, obtain multi-dimensional historical data for power generation power prediction, where the multi-dimensional historical data includes wind speed and wind direction data at different heights of the wind measurement tower, wind speed and wind direction data at the hub height, and multi-source feature data such as temperature, air pressure, humidity, and actual power generation power;
[0092] Specifically in this embodiment, in step 1, the multi-dimensional historical data is collected in real time by sensors installed at different heights of 10 meters, 30 meters, 50 meters, and 70 meters of the wind measurement tower and sensors of the hub.
[0093] Further in this embodiment, step 2, preprocess the multi-dimensional historical data, including data cleaning, denoising, and normalization processing, and divide the multi-dimensional historical data into a training set and a test set according to a preset ratio;
[0094] Specifically, in this embodiment, in step 2, the specific method for preprocessing the multi-dimensional historical data includes the following steps:
[0095] Perform normalization processing on the multi-dimensional historical data. The formula for normalization processing is:
[0096]
[0097] where: x g is the normalized data value; X is the original data value; is the average value of the original data; s is the standard deviation of the original data;
[0098] Eliminate outliers from the normalized data through the following criteria:
[0099]
[0100] where, v g is the residual; is the average value of the normalized data; s' is the standard deviation of the normalized data;
[0101] Divide the data set after eliminating outliers into a training set and a test set according to a ratio of 7:3. Use the wind speed and direction data at different heights of the wind measurement tower, the wind speed and direction data at the hub height, as well as temperature, pressure, and humidity as input data, and the actual power generation as output data.
[0102] Further in this embodiment, in step 3, construct a GRNN model based on the training set. The GRNN model captures the non-linear mapping relationship between input features and power generation output through an input layer, a pattern layer, a summation layer, and an output layer;
[0103] It should be emphasized in this embodiment that the GRNN model is a four-layer forward propagation neural network with non-linear approximation ability. After the data is input into the network, it passes through the input layer, the pattern layer, the summation layer, and the output layer in sequence to complete the prediction of power generation. Specifically, it includes the following steps:
[0104] Input layer: Receive the multi-source feature data of the preprocessed training set and transfer this data to the pattern layer. The number of nodes in the input layer is equal to the dimension of the multi-source feature data;
[0105] Pattern layer: Based on the data transferred from the input layer, use the Gaussian function to process the training samples. The number of nodes in the pattern layer is equal to the number of training samples. The calculation formula is:
[0106]
[0107] where: g i is the output value of the pattern layer; x i is the training sample; xj is the input sample; σ is the smoothing factor; the output data of the pattern layer is transmitted to the summation layer;
[0108] The summation layer receives the data output by the pattern layer and performs a weighted summation operation on the output of the pattern layer to generate intermediate data. The calculation formula is:
[0109]
[0110] where: S D is the weighted summation denominator of the output data of the pattern layer; S Ni is the weighted summation numerator of the output data of the pattern layer; n is the number of training samples; w ij is the weighting coefficient;
[0111] The output layer receives the data output by the summation layer and calculates the predicted power generation value. The calculation formula is:
[0112]
[0113] where: O j is the predicted power generation value.
[0114] In this embodiment, further, in step 4, the CPO algorithm is used to optimize the smoothing factor of the GRNN model, including initializing the population parameters and setting the search range of the smoothing factor, and iteratively updating the optimal value of the smoothing factor by combining various strategies of the CPO algorithm;
[0115] Specifically, in this embodiment, the CPO algorithm simulates four defense strategies of the crested porcupine, including visual strategy, auditory strategy, olfactory strategy, and physical attack strategy, and is used to dynamically adjust the smoothing factor of the GRNN model. Specifically, it includes the following steps:
[0116] Through the visual strategy, the position of the optimization parameter is dynamically adjusted in the exploration stage, simulating the visual tracking behavior of the crested porcupine for potential solutions. The position update is determined by the following formula:
[0117]
[0118] where: is the position of the i-th candidate solution in the (t + 1)-th generation, representing the position of the optimization parameter in the next generation; is the position of the i-th candidate solution in the t-th generation; is the current optimal solution position in the t-th generation population; is the velocity vector of the i-th candidate solution in the t-th generation; γ 1 is a random number obeying the normal distribution, representing the random perturbation of the candidate solution; γ 2 is a random number in the interval [0, 1], used to simulate the exploration randomness of the candidate solution;
[0119] The position of the candidate solution is updated by combining the random reference solution position through a velocity update strategy. The specific formula is as follows:
[0120]
[0121] Where: is the position of the r-th reference individual randomly selected at the t-th iteration. r is a random number between [1, X].
[0122] Specifically in this embodiment, the auditory strategy dynamically adjusts the position of the candidate solution by simulating the sound waves emitted by the crested porcupine to threaten the predator. The specific calculation is through the following formula:
[0123]
[0124] Where: is a binary random vector for making defense decisions; is the position of the predator; γ 3 is a random number generated within the range of [0, 1]; r 1 and r 2 are two random integers within the range of [1, X]; is the position of the r-th 1 individual randomly selected in the t-th generation; is the position of the r-th 2 individual randomly selected in the t-th generation.
[0125] Specifically in this embodiment, the olfactory strategy optimizes the position of the candidate solution by simulating the release of odors by the crested porcupine in a dangerous environment to disperse the predator. The specific calculation is through the following formula:
[0126]
[0127] Where: is the odor diffusion factor; is the position of the r-th 3 individual randomly selected in the t-th generation; δ is a parameter controlling the search direction, taking values of ±1:
[0128]
[0129] β t is the defense factor, and the calculation formula is:
[0130]
[0131] Where: t max is the maximum number of iterations;
[0132] is the odor diffusion factor, and its calculation formula is:
[0133]
[0134] Where: is the objective function value, which is used to evaluate the fitness of the current candidate solution; is the sum of the fitness values of all candidate solutions in the current t-th generation; is the position of the k-th candidate solution in the t-th generation; x is the total number of the candidate solution population; ε is a small positive value to avoid the denominator being zero.
[0135] When the crested porcupine will stop spreading the odor, and the predator will stop moving due to fear of the crested porcupine, and the distance between the predator and the crested porcupine remains unchanged. At this time, the behavior of the optimizer will be in a "static" state without any exploration or exploitation.
[0136] When the predator approaches, the crested porcupine releases the odor. At this time, the optimizer enters an active exploration stage, expanding the search range to more widely search for potential global optimal solutions by increasing the search for other areas of the target space.
[0137] When the predator stays at a safe distance, so the crested porcupine does not need to release a large amount of odor. In this case, the optimizer focuses on local exploitation in the current search area, finely adjusting the solution to improve the quality of the solution.
[0138] Specifically in this embodiment, the physical attack strategy precisely adjusts the position of the candidate solution by simulating the physical defense behavior of the crested porcupine when the predator approaches. The specific calculation is through the following formula:
[0139]
[0140] Where: is the position of the i-th candidate solution in the (t + 1)-th generation; is the position of the optimal solution of the crested porcupine population in the t-th generation; α is the convergence speed factor, which controls the convergence speed of the solution; γ 4 γ 5 are random values in the interval [0, 1];
[0141] In the physical attack strategy, the collision force received by the candidate solution has the following calculation formula:
[0142]
[0143] Where: γ 6 is a random scaling factor in the interval [0, 1]; and The position velocities of the candidate solutions in the (t + 1)-th generation and the t-th generation; Δt is the time step, representing the time interval between each iteration.
[0144] m i is the mass of the individual, representing the importance of the candidate solution, and the calculation formula is:
[0145]
[0146] where: is the objective function value of the i-th candidate solution in the t-th generation; is the position fitness function value of the k-th candidate solution, used to evaluate the optimization performance of the current solution; N is the total number of candidate solutions in the population.
[0147] In this embodiment, further, in step 5, power generation prediction is performed on the test set data based on the optimized GRNN model, and the error between the prediction result and the actual value is calculated to complete the verification of the model performance.
[0148] Specifically, in this example, in step 5, power generation prediction is respectively performed on the training set and the test set based on the optimized GRNN model, and the model performance is evaluated through the error between the prediction result and the true value. The performance evaluation includes the following indicators:
[0149] Coefficient of determination R 2 is:
[0150]
[0151] The mean absolute error MAE is:
[0152]
[0153] The root mean square error RMSE is:
[0154]
[0155] The mean absolute percentage error MAPE is:
[0156]
[0157] where: n is the number of samples; x i is the experimental output; is the predicted output of the i-th sample data; is the average value of all predicted outputs; The higher the R 2 value, the lower the RMSE, MAE, and MAPE values, indicating that the prediction accuracy of the model is higher.
[0158] Specifically, in this embodiment, the CPO algorithm is optimized by dynamically adjusting the smoothing factor of the GRNN model, which specifically includes:
[0159] Generate candidate solutions through population initialization, introduce Gaussian distribution random perturbation and diversity constraints to optimize the candidate solutions, and dynamically update the positions of the candidate solutions based on the fitness evaluation function to expand the search range;
[0160] In the middle and late stages of optimization, perform local search on the historical optimal solutions of the candidate solutions, and adjust the distance between the candidate solutions and the optimal solutions through dynamic convergence factors;
[0161] Adjust the value range of the smoothing factor, and optimize the non-linear fitting ability of the network according to the input data distribution;
[0162] Use R 2 , RMSE, MAE, and MAPE performance indicators to verify the performance of the optimized model.
[0163] Embodiment 2
[0164] We give the following examples to illustrate the specific implementation steps and experimental results:
[0165] (1) Select the observation data set of a wind farm in Jiangsu region, with a time span from 01:00 on July 1, 2022 to 23:00 on July 31, 2022, a total of 2,976 records. This data set contains multi-source feature data, specifically including wind speed and wind direction at different heights (10m, 30m, 50m, 70m) of the wind measurement tower, wind speed and wind direction at the hub height, and 13 input features such as environmental variables like temperature, pressure, humidity, etc. In addition, the data of actual power generation is also recorded.
[0166] (2) Preprocess the obtained data by cleaning and denoising, and divide the sample data set into a training set and a test set; 70% of the data in the data set is used as the training data set, and the remaining 30% of the data is used as the test data set.
[0167] (3) The Generalized Regression Neural Network (GRNN) is based on the non-linear regression theory and belongs to a feed-forward neural network, including an input layer, a hidden layer, and an output layer, where the hidden layer includes a radial basis hidden layer (pattern layer) and a special linear layer (summation layer). Each sample has a corresponding radial basis neuron, as Figure 2 shown. Initialize the population size of the GRNN model to 5; the maximum number of iterations is 5. The parameter optimization range of the model is determined by the lower bound lb = [10, 0.01, 2] and the upper bound ub = [100, 1, 10], which represent the value intervals of the three hyperparameters to be optimized in the model respectively.
[0168] (4) Use the CPO algorithm to optimize the parameters of the GRNN model, and the specific process is asFigure 3 As shown in Figure 3 . The CPO algorithm initializes the population by using the smoothing factor value as the position information of individuals. It calculates the input data with GRNNs of different smoothing factor values to obtain the mean square error between the output value and the target value, and uses it as the fitness value of each individual. By comparing the fitness values, it updates the position information of individuals and the historical optimal position, and finally obtains the optimal parameters. As Figure 4 shown in Figure 4 , it shows the change curve of the fitness value during the parameter optimization process of the CPO-GRNN algorithm.
[0169] (5) Input the test set into the trained GRNN model for wind power prediction. As Figure 5 shown in Figure 5 , it is the training effect diagram of the GRNN model. The x-axis represents the training set data, the y-axis represents the power generation value. The solid line is the actual power value, and the dashed line is the predicted power value of the GRNN. As Figure 6 shown in Figure 6 , it is the prediction effect diagram of the GRNN model. As Figure 7 shown in Figure 7 , it is the training effect diagram of the CPO-GRNN algorithm. The x-axis is the training set data, the y-axis is the power generation value. The solid line is the actual power value, and the dashed line is the predicted power value of the CPO-GRNN. As Figure 8 shown in Figure 8 , it is the prediction effect diagram of the CPO-GRNN model. The x-axis represents the prediction set data, the y-axis is the wind power value. The solid line is the actual power value, and the dashed line is the predicted power value of the CPO-GRNN. Although there are certain fluctuations between the actual data and the predicted data, the prediction line generally follows the main trend of the actual line. Thus, it can be seen the accuracy and effectiveness of the GRNN model optimized by the CPO algorithm in power generation prediction.
[0170] (6) Use multiple evaluation indicators such as the coefficient of determination (R^2), mean absolute error (MAE), root mean square error (RMSE), mean absolute percentage error (MAPE), etc. to measure the prediction performance of the model, as shown in Table 1 below:
[0171]
[0172] Table 1 shows the improvement in accuracy of the CPO-GRNN model compared to the traditional GRNN model.
[0173] (7) Table 2 shows the comparison effect of the CPO-GRNN model with the CPO-CNN and CPO-LSTM prediction models in this embodiment;
[0174]
[0175] As can be seen from Table 2, the CPO-GRNN model shows superiority in all indicators, with the highest R^2 value and the lowest error indicators. Among them, the R^2 value of CPO-GRNN is as high as, significantly higher than that of CPO-LSTM and CPO-CNN. In terms of error indicators, CPO-GRNN also performs the best, with the lowest RMSE, MAE, and MAPE values. These results indicate that the prediction performance of CPO-GRNN is the most stable and accurate on this group of data.
[0176] In summary, by introducing the Crest Porcupine Optimization (CPO) algorithm, the present invention globally optimizes the smoothing factor of the Generalized Regression Neural Network (GRNN) model, realizes the automatic tuning of the parameters of the wind power prediction model, and effectively avoids the problems of relying on manual parameter tuning and being prone to falling into local optima in traditional methods. Through the fusion of multi-source data, the non-linear fitting ability of the GRNN model, and the optimization strategy combining the global search and local development of the CPO algorithm, the present invention significantly improves the accuracy of wind power prediction and the robustness of the model. At the same time, the optimized GRNN model has a higher convergence speed and stronger generalization ability, and can adapt to the dynamic and complex data distribution in the wind farm environment. The method of the present invention is applicable to short-term or medium- and long-term prediction of wind power, provides important technical support for the operation and dispatching of wind farms and grid balancing, and has high practical value and promotion prospects.
[0177] In the description of this specification, the description with reference to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.
[0178] Any process or method description shown in the flowchart or described in other ways herein can be understood as representing a module, segment, or part of code including one or more executable instructions for implementing a specific logical function or process. And the scope of the preferred embodiments of the present application includes additional implementations, where the functions can be executed in a substantially simultaneous manner or in the reverse order according to the involved functions, rather than in the order shown or discussed.
[0179] As described above, it is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed by this application can easily think of various changes or substitutions thereof, and these should all be covered within the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.
Claims
1. A power generation prediction method based on CPO algorithm to optimize GRNN model, characterized in that: The following steps are involved: Step 1: Acquire multidimensional historical data for power generation prediction, wherein the multidimensional historical data includes wind speed and wind direction data at different heights of a wind tower, wind speed and wind direction data at hub height, and multi-source characteristic data of temperature, air pressure, humidity, and actual power generation; Step 2: preprocessing the multidimensional historical data, including data cleaning, denoising and normalization, and dividing the multidimensional historical data into a training set and a test set according to a preset ratio; Step 3: construct a GRNN model based on the training set, wherein the GRNN model captures the nonlinear mapping relationship between input features and power generation output through an input layer, a pattern layer, a summation layer, and an output layer; Step 4: Use the CPO algorithm to optimize the smoothing factor of the GRNN model, including initializing population parameters and setting the search range of the smoothing factor, and iteratively updating the optimal value of the smoothing factor in combination with multiple strategies of the CPO algorithm; Step 5: Based on the optimized GRNN model, the power generation is predicted for the test set data, and the error between the predicted result and the actual value is calculated to complete the model performance verification.
2. The method for predicting power generation based on CPO algorithm-optimized GRNN model according to claim 1, characterized in that: In step 1, the multi-dimensional historical data is collected in real time by sensors installed at different heights of 10 meters, 30 meters, 50 meters and 70 meters on the wind tower and sensors on the hub.
3. The power generation prediction method based on CPO algorithm optimization GRNN model according to claim 1 is characterized in that: In step 2, the specific method for preprocessing the multidimensional historical data includes the following steps: Normalize the multi-dimensional historical data. The normalization formula is: Where: x g is the normalized data value; X is the original data value; is the average value of the original data; s is the standard deviation of the original data; The normalized data is then cleaned of outliers using the following criteria: Among them, v g is the residual; is the mean value of normalized data; s′ is the standard deviation of normalized data; After removing outliers, the data set is divided into training set and test set in a ratio of 7:
3. The wind speed and direction data at different heights of the wind tower, the wind speed and direction data at the hub height, as well as temperature, air pressure and humidity are used as input data, and the actual power generation is used as output data.
4. The method for predicting power generation based on CPO algorithm-optimized GRNN model according to claim 1, characterized in that: In step 3, the GRNN model has a four-layer forward propagation neural network with nonlinear approximation capability. After the data is input into the network, it passes through the input layer, pattern layer, summation layer and output layer in sequence to complete the prediction of the generated power, which specifically includes the following steps: An input layer receives the preprocessed multi-source feature data of the training set and passes the data to the pattern layer, and the number of nodes in the input layer is equal to the dimension of the multi-source feature data; The pattern layer processes the training samples using the Gaussian function based on the data transmitted by the input layer. The number of nodes in the pattern layer is equal to the number of training samples. The calculation formula is: Where: g i is the output value of the pattern layer; x i is a training sample; x j is the input sample; σ is the smoothing factor; the output data of the pattern layer is passed to the summation layer; The summation layer receives the data output by the pattern layer and performs a weighted summation operation on the pattern layer output to generate intermediate data. The calculation formula is: Where: S D is the weighted sum denominator of the output data of the model layer; S Ni is the weighted sum numerator of the model layer output data; n is the number of training samples; w ij is the weighting coefficient; The output layer receives the data output by the summation layer and calculates the predicted value of the generated power. The calculation formula is: Among them: j is the predicted value of the generated power.
5. The method for predicting power generation based on CPO algorithm-optimized GRNN model according to claim 1, characterized in that: In step 4, the CPO algorithm simulates four defense strategies of crested porcupines, including visual strategy, auditory strategy, olfactory strategy and physical attack strategy, for dynamically adjusting the smoothing factor of the GRNN model, specifically including the following steps: Through the visual strategy, the position of the optimization parameters is dynamically adjusted during the exploration phase to simulate the visual tracking behavior of the crested porcupine for potential solutions. The position update is determined by the following formula: in: is the position of the i-th candidate solution in the t+1th generation, indicating the position of the optimization parameters in the next generation; is the position of the i-th candidate solution of the t-th generation; is the current optimal solution position in the t-th generation population; is the velocity vector of the ith candidate solution of the tth generation; γ1 is a random number that obeys the normal distribution, representing the random perturbation of the candidate solution; γ2 is a random number in the interval [0,1], which is used to simulate the exploration randomness of the candidate solution; Through the speed update strategy, the position of the candidate solution is updated in combination with the random reference solution position. The specific formula is: in: is the rth reference individual position randomly selected when the election reaches generation t, where r is a random number between [1,X].
6. The method for predicting power generation based on CPO algorithm-optimized GRNN model according to claim 5, characterized in that: The auditory strategy simulates the sound waves emitted by the crested porcupine to threaten the predator and dynamically adjusts the position of the candidate solution, which is specifically calculated by the following formula: in: Binary random vector for making defense decisions; is the predator position; γ3 is a random number generated in the range [0,1]; r1 and r2 are two random integers in the range [1,X]; is the r1th individual position randomly selected in the tth generation; is the r2th individual position randomly selected in the tth generation.
7. The method for predicting power generation based on CPO algorithm-optimized GRNN according to claim 5, characterized in that: The olfactory strategy simulates the release of odor by crested porcupines in dangerous environments to disperse predators and optimize the location of candidate solutions. It is specifically calculated by the following formula: in: is the odor diffusion factor; is the position of the r3th individual randomly selected in the tth generation; δ is a parameter that controls the search direction and takes a value of ±1: β t is the defense factor, and the calculation formula is: Where: t max is the maximum number of iterations; is the odor diffusion factor, and the calculation formula is: in: is the objective function value, which is used to evaluate the fitness of the current candidate solution; is the sum of the fitness values of all candidate solutions in the current tth generation; is the position of the kth candidate solution in the tth generation; x is the total number of candidate solutions; ε is a small positive value to avoid the denominator being zero.
8. The method for predicting power generation based on CPO algorithm-optimized GRNN model according to claim 5, characterized in that: The physical attack strategy simulates the physical defense behavior of the crested porcupine when the predator approaches, and accurately adjusts the position of the candidate solution, which is specifically calculated by the following formula: in: is the position of the i-th candidate solution of the t+1th generation; is the optimal solution position of the t-th generation crested porcupine population; α is the convergence speed factor, which controls the convergence speed of the solution; γ4 and γ5 are random values in the interval [0,1]; In the physical attack strategy, the collision force on the candidate solution is The calculation formula is: Where: γ6 is a random scaling factor in the interval [0,1]; and The position and velocity of the candidate solution at the t+1th and tth generations; Δt is the time step, which indicates the time interval between each iteration; m i is the quality of the individual, indicating the importance of the candidate solution, and the calculation formula is: in: is the objective function value of the i-th candidate solution of the t-th generation; is the position fitness function value of the kth candidate solution, which is used to evaluate the optimization performance of the current solution; N is the total number of candidate solutions in the population.
9. The method for predicting power generation based on CPO algorithm-optimized GRNN model according to claim 1, characterized in that: In step 5, based on the optimized GRNN model, the power generation is predicted for the training set and the test set respectively, and the model performance is evaluated by the error between the predicted result and the true value. The performance evaluation includes the following indicators: Coefficient of determination R 2 for: The mean absolute error MAE is: The root mean square error RMSE is: The mean absolute percentage error MAPE is: Where: n is the number of samples; xi is the experimental output; is the predicted output of the i-th sample data; is the average of all prediction outputs; R 2 The higher the value, the lower the RMSE, MAE, and MAPE values, indicating that the prediction accuracy of the model is higher.
10. The method for predicting power generation based on CPO algorithm-optimized GRNN model according to claim 1, characterized in that: The CPO algorithm achieves optimization by dynamically adjusting the smoothing factor of the GRNN model, specifically including: Candidate solutions are generated by population initialization, Gaussian distribution random perturbations and diversity constraints are introduced to optimize the candidate solutions, and the positions of candidate solutions are dynamically updated based on the fitness evaluation function to expand the search range; In the middle and late stages of optimization, local searches are performed on the historical optimal solutions of candidate solutions, and the distance between the candidate solutions and the optimal solution is adjusted through a dynamic convergence factor; Adjust the value range of the smoothing factor to optimize the nonlinear fitting ability of the network according to the input data distribution; Using R 2 , RMSE, MAE and MAPE performance indicators verify the performance of the optimized model.