Wind power prediction method and system, medium and processor
By improving the particle swarm algorithm to optimize the parameter of the RNN model and combining the decision tree model to predict wind power, the problem of low prediction accuracy in the existing technology is solved, and higher prediction accuracy and faster prediction speed are achieved.
Patent Information
- Application Number
- CN202411701543.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-04
AI Technical Summary
The existing wind power power prediction methods have limited data volatility and nonlinear feature processing capabilities, resulting in low prediction accuracy.
The improved particle swarm algorithm is used to initialize and optimize the parameters of the recurrent neural network (RNN) model, and iterative operations are performed in combination with the decision tree model to improve the accuracy of wind power prediction.
By improving the particle swarm algorithm to optimize the parameters of the RNN model, it can better fit the historical data of wind power, improve prediction accuracy, and optimize the model structure, reduce calculation complexity, and improve prediction speed.
Smart Images

Figure CN119561027A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of wind power prediction, and in particular to a wind power prediction method, system, medium and processor. Background Art
[0002] Wind energy is generated by air flow caused by atmospheric pressure differences, so its wind direction and wind force are constantly changing. This volatility, intermittency and randomness lead to fluctuations in wind farm power, which affects the overall operation of the regional power grid, and in turn affects the voltage stability of the entire regional power grid. Existing wind power prediction methods, such as physical models and statistical models, require a large amount of historical data and have limited ability to handle the volatility and nonlinear characteristics of data, resulting in low prediction accuracy and weak generalization ability.
[0003] In view of this, a wind power prediction method, system, medium and processor are needed. Summary of the invention
[0004] Aiming at the problem that the wind power prediction in the prior art has limited data processing capability, resulting in low prediction accuracy, the present invention provides a wind power prediction method, such as physical models and statistical models, which require a large amount of historical data and have limited processing capabilities for the volatility and nonlinear characteristics of the data, resulting in low prediction accuracy. The improved particle swarm algorithm can be used to optimize the RNN to improve the accuracy of wind power prediction. The specific technical solution is as follows:
[0005] A wind power prediction method, comprising:
[0006] Step 1, obtaining historical data of wind power in the power system and preprocessing the historical data;
[0007] Step 2, use the improved particle swarm algorithm to initialize the parameters of the RNN model;
[0008] Step 3: Substitute the processed historical data into the initialized RNN model for training to obtain the predicted value of wind power; Step 4: Calculate the error between the predicted value and the actual value, use the error as the particle fitness, and determine the individual optimal solution of each particle and the global optimal solution of the entire particle swarm based on the particle fitness, and update the particle speed and position;
[0009] Step 5, determine whether the improved particle swarm algorithm reaches the preset iteration termination condition, if so, execute step 6;
[0010] Step 6: Optimize the parameters of the RNN model using the updated particle speed and position, and predict the wind power in real time through the optimized RNN model to obtain the prediction result of the wind power.
[0011] Preferably, a wind power prediction method further includes:
[0012] If the preset iteration termination condition is not met, the following steps are performed:
[0013] A decision tree model is constructed using the optimal solution of the particles, and the decision tree model is trained to obtain a trained decision tree model;
[0014] Substitute the trained decision tree model into the RNN model in step 3 to continue iterative operations.
[0015] Preferably, the optimal solution of the particles is used to construct a decision tree model, and the decision tree model is trained to obtain a trained decision tree model, which includes:
[0016] The optimal solution of the particle is used as the data set, and bootstrap sampling is used to randomly extract multiple samples from the data set to build a decision tree model;
[0017] A subset of attributes is randomly extracted from the input features of the RNN model to train the decision tree model. After the training, a decision tree model with optimal output data and splitting nodes is obtained.
[0018] Preferably, the initializing the parameters of the RNN model using the improved particle swarm algorithm includes:
[0019] The weights and bias values of the RNN model are initialized using an improved particle swarm algorithm with set control parameters.
[0020] Preferably, the step of judging whether the improved particle swarm algorithm reaches a preset iteration termination condition comprises:
[0021] If any of the conditions of reaching the preset maximum number of iterations or the error being less than the preset error threshold is met, the improved particle swarm algorithm stops iterating.
[0022] Preferably, the preprocessing of historical data includes:
[0023] Filter out the erroneous data and abnormal data in the historical data and perform normalization. The normalization should satisfy the formula:
[0024]
[0025] In the formula, X i Indicates the wind power data to be normalized; X max , X min They represent the maximum and minimum wind power respectively; α is a positive constant used to adjust the nonlinearity of the scaling factor; β is a constant used to control the influence of the sine term; N is the number of particles; i is the index of the particle, ranging from 0 to N-1.
[0026] Preferably, the error between the calculated predicted value and the actual value includes:
[0027] The time point of the predicted value of wind power is obtained according to historical data training, the actual value of wind power corresponding to the time point is found, and the error between the predicted value and the actual value is calculated.
[0028] A wind power prediction system, applied to the above-mentioned wind power prediction method, comprises:
[0029] A data acquisition unit, which acquires historical data of wind power in the power system and pre-processes the historical data;
[0030] A model initialization unit, used to initialize the parameters of the RNN model using an improved particle swarm algorithm;
[0031] The wind power prediction unit is used to substitute the processed historical data into the initialized RNN model for training to obtain the predicted value of wind power;
[0032] The particle update unit calculates the error between the predicted value and the actual value, takes the error as the particle fitness, and determines the individual optimal solution of each particle and the global optimal solution of the entire particle swarm based on the particle fitness, and updates the particle speed and position;
[0033] A judgment unit, judging whether the improved particle swarm algorithm reaches a preset iteration termination condition, and if so, optimizing the parameters of the RNN model by using the speed and position of the updated particles;
[0034] The wind power output unit predicts the wind power in real time through the optimized RNN model to obtain the final prediction result of the wind power.
[0035] A computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the aforementioned wind power prediction method.
[0036] A processor is provided, and the processor is used to run a program, wherein the program executes the aforementioned wind power prediction method when running.
[0037] Compared with the prior art, the present invention has the following beneficial effects:
[0038] A wind power prediction method of the present invention initializes the parameters of the RNN model by improving the particle swarm algorithm, and continuously optimizes these parameters during the training process, so that the model can better fit the historical data of wind power and improve the prediction accuracy. At the same time, by optimizing the parameters of the RNN model by improving the particle swarm algorithm, the model structure can be optimized, the calculation complexity can be reduced, and the prediction speed can be improved. Compared with the existing prediction methods, the method of the present invention not only realizes real-time wind power prediction, but also ensures the timeliness and accuracy of the prediction results. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for the specific embodiments or the prior art description. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn according to the actual scale.
[0040] Figure 1 The present invention is a flow chart of a wind power prediction method.
[0041] Figure 2 The present invention is a flow chart of another embodiment of a method for predicting wind power.
[0042] Figure 3 This is a schematic diagram of a wind power prediction system of the present invention. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0045] It should also be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0046] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0047] See the following examples Figure 1 , Figure 2 and Figure 3 .
[0048] The present application provides a wind power prediction method, including:
[0049] Step 1, obtaining historical data of wind power in the power system and preprocessing the historical data;
[0050] The historical data of wind power includes meteorological data, wind power data and other related data that affect wind power. Specifically, the preprocessing of the historical data includes:
[0051] Filter out the erroneous data and abnormal data in the historical data, and normalize the data. The normalization should satisfy the formula:
[0052]
[0053] In the formula, X i Indicates the wind power data to be normalized; X max , X min They represent the maximum and minimum wind power respectively; α is a positive constant used to adjust the nonlinearity of the scaling factor; β is a constant used to control the influence of the sine term; N is the number of particles; i is the index of the particle, ranging from 0 to N-1.
[0054] Before forecasting wind power, we must first screen the historical data and remove errors and outliers to ensure the accuracy of the forecast results. Next, we need to normalize the data to prevent the saturation of the neurons in the model. By converting the values of the input data to the range of 0 to 1, we can effectively avoid neuron saturation.
[0055] Step 2: Use the improved particle swarm algorithm to initialize the parameters of the RNN model; specifically:
[0056] The weights and bias values of the RNN model are initialized using an improved particle swarm algorithm with set control parameters. In this embodiment, the number of initial populations is set to 50 particles, the threshold of the maximum iteration speed is set to 0.5, and the value range of the inertia weight is set between 0.9 and 0.3, with 0.9 as the initial value and 0.3 as the minimum value, to balance the exploration and utilization capabilities of the particles. The learning factor is assigned a value of 2 after initialization, and its attenuation coefficient is set to 0.96. As the iteration proceeds, the learning factor will gradually decrease to promote the convergence of the algorithm. By setting these parameters, the wind power prediction error is minimized, that is, the difference between the predicted wind power and the actual wind power is minimized.
[0057] Step 3: Substitute the processed historical data into the initialized RNN model for training to obtain the predicted value of wind power;
[0058] Since the RNN model has advantages in processing time series data (historical wind power data), by inputting the preprocessed historical data into the initialized RNN model for training, the RNN model can learn the time series dependencies and internal laws in the wind power data, such as the periodic laws of daily, weekly, and seasonal changes in wind power, as well as the influence of meteorological factors such as wind speed and wind direction on wind power. After training, the RNN model can generate predicted values of wind power based on the input historical data.
[0059] Step 4: Calculate the error between the predicted value and the actual value, use the error as the particle fitness, and determine the individual optimal solution of each particle and the global optimal solution of the entire particle swarm based on the particle fitness, and update the particle speed and position;
[0060] Specifically, the error between the calculated predicted value and the actual value includes:
[0061] The time point of the predicted value of wind power is obtained according to historical data training, the actual value of wind power corresponding to the time point is found, and the error between the predicted value and the actual value is calculated.
[0062] By calculating the error between the predicted value and the actual value, we can intuitively understand the accuracy of the current prediction of the RNN model. Taking the error as the particle fitness, we can evaluate each particle (representing a RNN parameter combination) in the improved particle swarm algorithm. The smaller the fitness value, the more accurate the prediction result can be produced by the corresponding RNN model parameter combination.
[0063] Step 5, determine whether the improved particle swarm algorithm reaches the preset iteration termination condition, if so, execute step 6;
[0064] By judging whether the improved particle swarm algorithm reaches the preset iteration termination condition, in this process, the particles will continue to update their positions according to the specified formula. In this embodiment, two conditions are set as the criteria for stopping the iteration: one is that the algorithm reaches the preset error threshold, and the other is that the maximum number of iterations is performed. If any of the conditions is met, the iteration process of the particles will be terminated. By setting the iteration conditions, the running time and optimization degree of the improved particle swarm algorithm can be controlled. When the termination condition is met, the updated particle speed and position are used to optimize the parameters of the RNN model, so that the RNN model can obtain the best parameter combination after being optimized by the improved particle swarm algorithm, further improving the prediction performance of the RNN model.
[0065] Step 6: Optimize the parameters of the RNN model using the updated particle speed and position, and predict the wind power in real time through the optimized RNN model to obtain the prediction result of the wind power.
[0066] Using the RNN model optimized by the improved particle swarm algorithm for real-time wind power forecasting can obtain more accurate wind power forecasting results. Since the parameters of the RNN model have been optimized by the improved particle swarm algorithm, it can quickly and accurately predict wind power when facing new real-time data, providing a reliable basis for the dispatch, operation and management of the power system.
[0067] In this embodiment, the individual optimal solution and the global optimal solution of the particle are determined, and particle i updates its position in each iteration process by pursuing the two optimal values.
[0068] The improved particle swarm needs to make the weight distribution of RNN reasonable, which can reduce the possibility of RNN falling into local optimality in the initial stage and obtain a relatively reasonable and effective solution.
[0069] In each iteration, when particle i updates its position, it will pursue two optimal solutions: one is the historical best position of the particle itself, called the individual optimal (the minimum prediction error achieved on historical data); the other is the historical best position of all particles in the entire particle group, called the global optimal (the minimum wind power prediction error). By referring to these two optimal solutions, particle i can adjust its position in order to find a better solution during the search process. In short, particle i will update its position in each iteration based on its own and the group's best performance. The speed and position updates of each particle should meet the corresponding conditional formula.
[0070] The particle velocity update should satisfy the expression:
[0071]
[0072] The particle position update should satisfy the expression:
[0073]
[0074] Where ω is the inertia weight; ξ1, ξ2, ξ3 and ξ4 are learning factors used to control the step size of the particle moving to the individual optimum and the global optimum; R1 and R2 are random numbers in the interval [0,1]; k represents the number of particle iterations; X id represents the current position of the particle after k iterations; N represents the number of particles; V id represents the iteration speed of the d-th dimension particle; R represents a random number in the range of [0,1], which adds randomness to the movement of the particle; P id represents the individual optimal solution of the d-dimensional particle; P gd represents the global optimal solution of the d-dimensional particle; represents the parameter used in the hyperbolic tangent function, which is used to control the smoothness of the function; α is an exponential parameter; β is a constant used to control the influence of the sine term; ∈ represents a constant.
[0075] The optimized particle swarm algorithm can ensure that the weights of the recurrent neural network (RNN) are properly configured. The particle swarm algorithm can more effectively guide the RNN to avoid local minimum points during the learning process, and thus tend to find the global optimal solution.
[0076] The particle distance should satisfy the condition:
[0077]
[0078] In the formula, m represents the number of particles; n represents the vector dimension of the position; L represents the maximum search diameter of the particle swarm; p id represents the coordinate of the ith particle in d dimension; k d is the weight of the total particle group in the d-dimensional coordinate system; w i represents the weight of the i-th element; α is an exponential parameter; β is a constant used to control the influence of the sinusoidal term; N is the number of particles; and t is the time variable.
[0079] The inertia weight should satisfy the following condition:
[0080]
[0081] In the formula, ω max ,ω min Respectively represent the maximum and minimum weights; t max Indicates the maximum number of iterations; γ is a coefficient used to adjust the influence of the sine term on the inertia weight; T represents the function period, which is used to determine the frequency of the sine wave; δ is an exponential parameter used to adjust the rate at which the sine term changes over time; t represents the current number of iterations.
[0082] The learning factor c should satisfy the condition:
[0083]
[0084] In the formula, c max 、c min Represent the maximum and minimum student factors respectively; α and γ are coefficients used to adjust the rate at which the sine and cosine terms change over time; T represents the function period; δ and β are exponential parameters used to adjust the rate at which the sine term changes over time; t represents the current number of iterations.
[0085] In the specific implementation, the idea of probability mutation of simulated annealing algorithm can also be introduced into PSO algorithm, which not only has the inherent advantages of PSO algorithm, but also can avoid the algorithm from falling into local optimum.
[0086] A wind power prediction method of the present invention initializes the parameters of the RNN model by improving the particle swarm algorithm, and continuously optimizes these parameters during the training process, so that the model can better fit the historical data of wind power and improve the prediction accuracy. At the same time, by optimizing the parameters of the RNN model by improving the particle swarm algorithm, the model structure can be optimized, the calculation complexity can be reduced, and the prediction speed can be improved. Compared with the existing prediction methods, the method of the present invention not only realizes real-time wind power prediction, but also ensures the timeliness and accuracy of the prediction results.
[0087] Specifically, in a preferred implementation of the present application, a wind power prediction method further includes:
[0088] If the preset iteration termination condition is not met, the following steps are performed:
[0089] Step 7, using the optimal solution of the particles to build a decision tree model, and training the decision tree model to obtain a trained decision tree model; specifically:
[0090] The optimal solution of the particle is used as the data set, and bootstrap sampling is used to randomly extract multiple samples from the data set to build a decision tree model;
[0091] In this embodiment, the obtained particle optimal solution is used as a data set, and the bootstrap sampling method is performed on the data set, that is, the kth sample is randomly selected with replacement. Specifically, the bootstrap technique is used to randomly extract k times, and each extraction is replaced to form k new self-help samples. Then, these self-help sample sets are used to construct k independent classification or regression decision trees. This can increase the diversity of samples and improve the stability and prediction performance of the model.
[0092] A subset of attributes is randomly extracted from the input features of the RNN model to train the decision tree model. After the training, a decision tree model with optimal output data and splitting nodes is obtained.
[0093] When building the model, a subset of attributes in the input features of the RNN model is randomly selected to train each tree. Specifically, at each split node of each tree, m attributes are randomly selected from the attribute pool to form a candidate subset, and then the attribute with the strongest classification ability is found in this subset to determine the optimal split point. m, or mtry, is a pre-set number, usually the square root of the total number of attributes or a preset condition. It helps to improve the generalization ability of the model and reduce the risk of overfitting.
[0094] Determine the best data features and split points for building a decision tree model, and divide the sample data set into two different subsets at each decision node (non-leaf node). In this way, each node will determine the further branching of the data based on the selected feature value, thus forming a tree-like decision path.
[0095] Substitute the trained decision tree model into the RNN model in step 3 to continue iterative operations.
[0096] In this embodiment, the wind power prediction method based on the combination of improved particle swarm algorithm optimization recurrent neural network and random forest theory is used to realize the prediction of wind power. First, the recurrent neural network is used to improve the RNN, and on this basis, the random forest theory is added to make predictions by constructing multiple decision trees to increase the diversity of the model, capture more complex relationships between input features, and further improve the accuracy of wind power prediction. At the same time, due to the introduction of random forests, the problem of overfitting of the RNN model is alleviated to a certain extent. By combining the advantages of the three algorithms, the accuracy of wind power prediction is greatly improved.
[0097] The embodiment of the present application provides a wind power prediction system, which is applied to the aforementioned wind power prediction method, including:
[0098] A data acquisition unit, which acquires historical data of wind power in the power system and pre-processes the historical data;
[0099] A model initialization unit, used to initialize the parameters of the RNN model using an improved particle swarm algorithm;
[0100] The wind power prediction unit is used to substitute the processed historical data into the initialized RNN model for training to obtain the predicted value of wind power;
[0101] The particle update unit calculates the error between the predicted value and the actual value, takes the error as the particle fitness, and determines the individual optimal solution of each particle and the global optimal solution of the entire particle swarm based on the particle fitness, and updates the particle speed and position;
[0102] A judgment unit, judging whether the improved particle swarm algorithm reaches a preset iteration termination condition, and if so, optimizing the parameters of the RNN model by using the speed and position of the updated particles;
[0103] The wind power output unit predicts the wind power in real time through the optimized RNN model to obtain the final prediction result of the wind power.
[0104] The explanation of the functions of each unit in this embodiment is the same as that in the embodiment of a wind power prediction method, and the technical effects are also the same.
[0105] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the aforementioned wind power prediction method.
[0106] The technical effect of this embodiment is the same as the technical effect of a wind power prediction method in an embodiment, and will not be repeated here.
[0107] The present invention can be used in many general or special computer system environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like.
[0108] An embodiment of the present application further provides a processor, which is used to run a program, wherein the program executes the aforementioned wind power prediction method when running.
[0109] The technical effect of this embodiment is the same as that of the wind power prediction method in Embodiment 1, and will not be repeated here.
[0110] The processor in this embodiment may be a central processing unit (CPU), a controller, a microcontroller, or other data processing chips.
[0111] The invention provides a method for predicting wind power based on the combination of improved particle swarm algorithm optimization recurrent neural network and random forest theory. Particles are continuously iterated and updated through the above formula. The minimum error requirement and the maximum number of iterations required when the particle swarm searches for the optimal position are used as the termination iteration conditions. When the particle swarm meets the termination iteration conditions, the particles stop iterating, and the optimal solution of each particle is used as a data set to randomly extract the kth sample from the data set. The bootstrap method is applied to randomly extract k new self-help sample sets with replacement, and k classification regression trees are constructed therefrom. Then, an attribute subset is randomly extracted from all attributes for training the model, and the mtry attribute subset is randomly selected at each node of each tree. Then, the attribute subset with the best classification ability is selected in the mtry attribute subset to obtain the best segmentation point. The method effectively combines the advantages of the three models to improve the accuracy of wind power prediction.
[0112] Those of ordinary skill in the art will appreciate that the units of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition of each example has been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0113] In the embodiments provided by the present invention, it should be understood that the division of units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units can be combined into one unit, one unit can be split into multiple units, or some features can be ignored, etc.
[0114] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0115] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-0nlyMemory), random access memory (RAM, RandomAccessMemory), mobile hard disk, magnetic disk or optical disk, etc., which can store program code.
[0116] 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 aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be included in the scope of the claims and specification of the present invention.
Claims
1. A wind power prediction method, characterized in that: include: Step 1, obtaining historical data of wind power in the power system and preprocessing the historical data; Step 2, use the improved particle swarm algorithm to initialize the parameters of the RNN model; Step 3: Substitute the processed historical data into the initialized RNN model for training to obtain the predicted value of wind power; Step 4: Calculate the error between the predicted value and the actual value, use the error as the particle fitness, and determine the individual optimal solution of each particle and the global optimal solution of the entire particle swarm based on the particle fitness, and update the particle speed and position; Step 5, determine whether the improved particle swarm algorithm reaches the preset iteration termination condition, if so, execute step 6; Step 6: Optimize the parameters of the RNN model using the updated particle speed and position, and predict the wind power in real time through the optimized RNN model to obtain the prediction result of the wind power.
2. A wind power prediction method according to claim 1, characterized in that: Also includes: If the preset iteration termination condition is not met, the following steps are performed: A decision tree model is constructed using the optimal solution of the particles, and the decision tree model is trained to obtain a trained decision tree model; Substitute the trained decision tree model into the RNN model in step 3 to continue iterative operations.
3. A wind power prediction method according to claim 2, characterized in that: The optimal solution of the particles is used to construct a decision tree model, and the decision tree model is trained to obtain a trained decision tree model including: The optimal solution of the particle is used as the data set, and bootstrap sampling is used to randomly extract multiple samples from the data set to build a decision tree model; A subset of attributes is randomly extracted from the input features of the RNN model to train the decision tree model. After the training, a decision tree model with optimal output data and splitting nodes is obtained.
4. A wind power prediction method according to claim 1, characterized in that: The method of initializing the parameters of the RNN model using the improved particle swarm algorithm includes: The weights and bias values of the RNN model are initialized using an improved particle swarm algorithm with set control parameters.
5. A wind power prediction method according to claim 1, characterized in that: The step of judging whether the improved particle swarm algorithm reaches a preset iteration termination condition includes: If any of the conditions of reaching the preset maximum number of iterations or the error being less than the preset error threshold is met, the improved particle swarm algorithm stops iterating.
6. A wind power prediction method according to claim 1, characterized in that: The preprocessing of historical data includes: Filter out the erroneous data and abnormal data in the historical data and perform normalization. The normalization should satisfy the formula: In the formula, X i Indicates the wind power data to be normalized; X max , X min They represent the maximum and minimum wind power respectively; α is a positive constant used to adjust the nonlinearity of the scaling factor; β is a constant used to control the influence of the sinusoidal term; N is the number of particles; i is the index of the particle.
7. A wind power prediction method according to claim 1, characterized in that: The error between the calculated predicted value and the actual value includes: The time point of the predicted value of wind power is obtained according to historical data training, the actual value of wind power corresponding to the time point is found, and the error between the predicted value and the actual value is calculated.
8. A wind power prediction system, characterized in that: A wind power prediction method applied to any one of claims 1 to 7, comprising: A data acquisition unit, which acquires historical data of wind power in the power system and pre-processes the historical data; A model initialization unit, used to initialize the parameters of the RNN model using an improved particle swarm algorithm; The wind power prediction unit is used to substitute the processed historical data into the initialized RNN model for training to obtain the predicted value of wind power; The particle update unit calculates the error between the predicted value and the actual value, takes the error as the particle fitness, and determines the individual optimal solution of each particle and the global optimal solution of the entire particle swarm based on the particle fitness, and updates the particle speed and position; A judgment unit, judging whether the improved particle swarm algorithm reaches a preset iteration termination condition, and if so, optimizing the parameters of the RNN model by using the speed and position of the updated particles; The wind power output unit predicts the wind power in real time through the optimized RNN model to obtain the final prediction result of the wind power.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute a wind power prediction method according to any one of claims 1 to 7.
10. A processor, characterized in that: The processor is used to run a program, wherein the program, when running, executes a wind power prediction method according to any one of claims 1 to 7.