A wind power prediction method
Through the random forest screening feature information and layer-by-layer initialization and optimization of DNN network, the problems of insufficient sorting of feature information and insufficient deep capture of model relationships in the existing wind power prediction methods are solved, and high-precision wind power prediction is achieved.
Patent Information
- Application Number
- CN202010937652.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-07
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2040-09-07
AI Technical Summary
The existing wind power prediction methods have shortcomings in the sorting of feature information and the deep capture of model input and output relationships, resulting in low prediction accuracy and neglecting the influence of meteorological factors such as wind speed, wind direction and air pressure.
Random forest algorithm is used to screen the set of optimal feature information for wind power, and initialize and adjust the DNN network layer by layer through the restricted Boltzmann machine and particle swarm optimization algorithm to build a reasonable wind power prediction model.
The accuracy and effect of wind power prediction are improved, and the performance of the prediction model is improved through feature information screening and fine adjustment of DNN network.
Smart Images

Figure CN112085272B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of new energy and relates to a wind power prediction method. Background Art
[0002] Since the 21st century, as traditional fossil energy has been depleted, renewable energy represented by wind power has begun to become the trend and fashion of world energy development. Renewable energy plays an irreplaceable role in the following aspects: since there is no emission of polluting gas during the power generation process, it effectively protects the ecological environment, secondly, it also ensures the country's energy security, and finally, because its cost is generally low, it has unparalleled economic efficiency.
[0003] The commonly used wind power prediction methods currently have certain shortcomings, which are reflected in the prediction process. Most prediction models use all historical data of wind farms as model inputs, and fail to sort and screen the characteristic information (wind power, wind speed, temperature, air pressure, etc.) by importance, thereby reducing the prediction accuracy and effect. In addition, relatively excellent heuristic prediction methods also have the problem of insufficient hidden layers and inability to deeply capture the relationship between model input and output. Thirdly, wind power data is affected by meteorological factors such as wind speed, wind direction and air pressure. Some models ignore the impact of these factors on wind power data when decomposing wind power data, resulting in poor prediction results. Summary of the invention
[0004] The purpose of the present invention is to provide a wind power prediction method, which solves the problem of low wind power prediction accuracy in the prior art.
[0005] The technical solution adopted by the present invention is a wind power prediction method, comprising the following steps:
[0006] Step 1: Use historical values of wind power, historical values of weather factors (wind direction, wind speed, temperature, air pressure, humidity, etc.) and other characteristic information as training data sets for training random forest RF;
[0007] Step 2: Calculate the PI value of all characteristic information, and select the optimal characteristic information set Q of wind power by using the reverse search method of the sequence;
[0008] Step 3: Use the historical values of the optimal feature information set Q as the data set for training the DNN network, input it into the DNN model, and complete the initialization of the DNN;
[0009] Step 4: Adopting the idea of “layer-by-layer initialization”, the restricted Boltzmann machine (RBM) is used to roughly pre-train the DNN network layer by layer. The hidden layer weight coefficient w and threshold coefficient b that are close to the converged solution are obtained through RBM calculation.
[0010] Step 5: Use the particle swarm optimization algorithm (PSO) to make more precise adjustments to the weight coefficient and threshold coefficient to obtain a DNN network with excellent parameters.
[0011] Step 6: Use the prediction data set composed of the optimal feature information set Q as the DNN model input, and obtain the wind power value to be predicted through calculation.
[0012] The beneficial effects of the present invention are:
[0013] The present invention is a wind power prediction method, and its prediction model mainly has two parts: the first part is feature information selection based on random forest, firstly, the historical samples of feature information of wind power (wind speed, wind direction, temperature, air pressure, humidity, historical values of wind power, etc.) are used to train the random forest model, and the prediction importance index PI corresponding to all feature information is obtained, and then the optimal feature information set Q of wind power is selected based on the size of PI; the second part is wind power prediction based on DNN model, that is, the historical value of the optimal feature information set of wind power is used as input, and a reasonable DNN network is constructed after the step-by-step training of RBM and the fine-tuning operation of PSO, and finally the test data set composed of the historical values of the set Q is used as the DNN model input, and the wind power value to be predicted is obtained by calculation. The prediction effect is good and the accuracy is high. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 It is a technical roadmap of a wind power prediction method of the present invention.
[0015] Figure 2 It is a structural schematic diagram of a DNN model in a wind power prediction method of the present invention.
[0016] Figure 3 It is a flow chart of a particle swarm algorithm in a wind power prediction method of the present invention. DETAILED DESCRIPTION
[0017] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0018] A wind power prediction method, such as Figure 1 As shown, the following steps are included:
[0019] Step 1.1: Use the initial wind power feature information set as input to train the random forest. After the training is completed, the PI value of all feature information can be obtained. At this time, the prediction accuracy p of the random forest algorithm is evaluated using the test set. all , and set this value as the prediction threshold.
[0020] Step 1.2: Sort the PI values of all feature information in descending order. After the sorting is completed, the feature information corresponding to the first 10 PI values is imported into the rough selected feature information set Q which is initially an empty set. pre At the same time, these feature information are deleted from the initial feature set M.
[0021] Step 1.3: Use Train the random forest again and get the prediction error for the test The upper right corner subscript i in the formula represents the information set Q pre The number of feature information.
[0022] Step 1.4: Judgement If Then the feature information set Add ten more feature information to form a new set if No longer ask Q pre Otherwise, continue to select the top ten most important feature information in M to add.
[0023] The feature information F in step 1 j The PI value of the i-th decision tree is:
[0024] PI i (F j )=OOBerror i '-OOBerror i (1)
[0025] According to the same principle, the corresponding PI value is obtained for each decision tree in the random forest, and finally all the obtained PI values are averaged, and the result is the feature information F j PI value:
[0026]
[0027] Out-of-bag data error (OOBerror), as shown in formula (3):
[0028]
[0029] Where: n is the total number of data samples; y r is the actual value of the data sample; y p is the predicted value of the data sample.
[0030] Step 2: Establish a feature set;
[0031] As shown in Table 1. The size of wind power will be affected by characteristic factors such as wind speed, temperature and wind direction. Therefore, wind power will be affected by different characteristics;
[0032] Table 1 Names and representations of impact features
[0033]
[0034] The temperature, humidity, air pressure, wind direction sine, and wind direction cosine in the table are the measured values at the time of prediction. t With P t is a historical value, representing the wind speed or wind power t minutes ago. For example, S0 represents the wind speed measurement value at time t (it should be noted that the time to be predicted is recorded as t+1), S 30 Represents the wind speed measurement 30 minutes ago, P 30 Represents the wind power measurement value 30 minutes ago.
[0035] Then use RF to calculate the PI size corresponding to each feature information and arrange them in order from large to small. The number of populations in the random forest is n tree The default value is 500, the dimension of the candidate segmentation feature information set
[0036] Step 3.1: When using the DNN network to predict wind power, wind energy is closely related to air density. Atmospheric temperature, humidity, air pressure and other parameters will affect air density. Therefore, the DNN model input data should contain wind speed, wind direction, temperature, air pressure and humidity. First, all data needs to be normalized.
[0037] (1) Wind speed normalization
[0038] Generally, wind turbines operate in a wind speed range between 3m / s and 25m / s, and the maximum wind speed on land is usually less than or equal to 30m / s. Obviously, the maximum wind speed varies in different areas. The wind speed can be normalized as follows:
[0039]
[0040] Where: V g ——Wind speed value obtained after normalization, V t ——Wind speed value obtained from numerical weather forecast, V max ——The maximum wind speed value in actual operation.
[0041] (2) Wind direction normalization
[0042] Methods for normalizing wind direction are as follows: Figure 1-3As shown in the figure: north is the positive direction of the x-axis, and east is the positive direction of the y-axis. The sin of the wind direction is positive between 0° and 180°, and negative from 180° to 360°; the cos of the wind direction is positive between 0° to 90° and 270° to 360°, and negative between 90° and 270°. Based on this, the combination of the sine wind direction and the cosine wind direction can represent all wind directions.
[0043] (3) Temperature normalization
[0044] The measures for normalizing temperature are roughly the same as those for normalizing wind speed, as shown in the following formula:
[0045]
[0046] Where: T g ——normalized temperature value, T t ——Temperature obtained from numerical weather forecast, |T t | max ——The maximum value after taking the absolute value of the temperature.
[0047] (4) Air pressure normalization
[0048] The normalization of air pressure is the same as that of wind speed and temperature, as shown in the following formula:
[0049]
[0050] Where: Pr g ——normalized air pressure value; Pr t ——is the air pressure value obtained from numerical weather forecast, Pr max ——The highest air pressure observed in meteorological observations.
[0051] (5) Standardization of humidity values
[0052] The method for standardizing humidity values is basically the same as the standardization methods of the above variables:
[0053]
[0054] Where: H g ——H t After the normalization, H t ——Humidity value obtained from numerical weather forecast, H max ——Maximum humidity value.
[0055] After that, all the test data are input into the DNN network, and a suitable structure is constructed in two steps. The first step is to use the restricted Boltzmann machine (RBM) to roughly pre-train the DNN network layer by layer, and obtain the hidden layer weight coefficient w and threshold coefficient b that are close to the converged solution through RBM calculation. The second step is to make more precise adjustments to the weight coefficient and threshold coefficient through the particle swarm optimization algorithm (PSO), which can also be considered as "fine-tuning". Through these two steps, the sophistication of the DNN network can be greatly improved.
[0056] Step 3.2: When using the restricted Boltzmann machine (RBM), the commonly used single-step alternating GIbbs sampling contrast divergence algorithm is used for training, which greatly improves the training speed of the RBM. The initial value of the algorithm is the known training sample value, which is used as the initial value state of the visible node unit vector and recorded as v data , and then use formula (8) to calculate the initial state value h of the hidden layer data :
[0057]
[0058] Where: m is the number of visible units in the visible layer.
[0059] After the first iteration calculation of all units in the hidden layer is completed, an overall alternating GIbbs sampling is performed, that is, the state of all visible units is adjusted using formula (9) to obtain v new , and then use the previous formula (8) to adjust the state of the hidden unit to get h new .
[0060]
[0061] Thus, the weight update formula of the visible node unit and the hidden node unit, and the threshold update formula of the visible node unit and the hidden node unit can be obtained as follows:
[0062] Δw ij =s·( <v i ·h j > data - <v i ·h j > new ) (10)
[0063] Δb i =s·( <v i > data- <v i > new ) (11)
[0064] Δc j =s·( <h j > data - <h j > new ) (12)
[0065] Where: S is the learning rate, usually 0.004
[0066] Through pre-training of the restricted Boltzmann machine, the hidden layer weight coefficient w and threshold coefficient b that are close to the converged solution are obtained. Then the particle swarm optimization algorithm is used to make more precise adjustments to the weight threshold of the DNN, which is the "fine-tuning" of the parameter value.
[0067] Step 3.3: The mathematical model of Particle Swarm Optimization (PSO) can be expressed as follows: There is a particle swarm x = [x1, x2, x3, ... x m ] (where m is the total number of particles in this particle swarm). This particle swarm exists in an n-dimensional space, and the optimization process is also carried out in this space. The spatial position of the i-th particle is represented by x i =[x i1 ,x i2 ,x i3 ,…x in ], and the corresponding search speed of the i-th particle is v i =[v i1 ,v i2 ,v i3 ,…v in ], and the optimal spatial position of the i-th particle in history is p i =[p i1 ,p i2 ,p i3 ,…p in ], the optimal position of all particles in the global space is p g =[p g1 ,p g2 ,p g3 ,…p gn ], during the algorithm operation, the search speed and spatial position of the particle will change according to equations (13) and (14):
[0068] v id (k+1)=ωv id (k)+c1r1(p id -x id (k))+c2r2(p gd -xid (k)) (13)
[0069] x id (k+1)=x id (k)+v id (k+1) (14)
[0070] Where: v id (k)——the velocity of the ith particle corresponding to the kth change in the dth dimension; x id (k)——the position of the ith particle corresponding to the kth change in the dth dimension; ω——inertia coefficient; c1, c2——acceleration coefficients; r1, r2——random numbers between 0 and 1; p id ——The i-th particle corresponds to the historical optimal position in the d-th dimension; p gd ——All particles correspond to the historical optimal positions in the dth dimension.
[0071] In formula (14), the inertia coefficient ω plays a very important role. It reflects the relationship between the historical particle speed and the latest particle speed. By controlling the size of the inertia coefficient ω, the search speed and optimization speed of the particle swarm algorithm can be adjusted, affecting the results of local optimization and global optimization. Generally speaking, the larger the inertia coefficient, the faster the new particle speed, the improved search speed, the stronger the global search capability but the weaker the local search capability. On the contrary, the smaller the inertia coefficient, the slower the new particle speed, the lower the search speed, the weaker the global search capability but the stronger the local search capability. In order to better balance the impact of the inertia coefficient on local search and global search, it is proposed to use a dynamic inertia coefficient, and its iterative process is shown in formula (15):
[0072]
[0073] Where: max ——The maximum value of the inertia coefficient; ω min ——minimum value of inertia coefficient; k max ——The maximum number of iterations; k——The current number of iterations.
[0074] Step 3.4: Use this DNN network to predict wind power. Figure 2 The constructed model structure contains one input layer, multiple hidden layers and one output layer. Under the condition of known historical wind power values and weather conditions, the wind power of the period to be predicted can be obtained through the DNN network.
[0075] Step 4: Evaluate the prediction results.
[0076] Four evaluation indicators are used to evaluate the wind power prediction value: (1) mean absolute error (MAE), (2) mean absolute percentage error (MAPE), (3) mean square error (MSE), and (4) root mean square error (RMSE):
[0077]
[0078] Where: P Mi ——actual value of wind power at time i, P Pi ——The wind power forecast value at time i, n——The number of forecast points in the forecast period
[0079]
[0080]
[0081]
[0082] Example
[0083] To verify the effectiveness of the prediction model proposed in this chapter, the method is applied to two different wind farms, denoted as Wind Farm 1 and Wind Farm 2. The wind power data resolution of each wind farm is 10 minutes, and the wind farm has 144 data points every day.
[0084] Wind farm 1 is located in Gansu Province, China, at 40°11'22.5"N, 96°59'27.5"E. It is named Jieyuandi Wopu Wind Farm with a total installed capacity of 49.5MW. When establishing the DNN wind power prediction model, a total of 3,600 data points from August 1 to 25, 2017 were used for modeling, and a total of 864 data points from August 26 to 31 were used for testing to verify the effectiveness of the prediction model.
[0085] Wind Farm 2 is located in Gansu Province, China, at 40°36'17.9"N, 95°48'23.5"E. It is named Xiangyang Wind Farm and has a total installed capacity of 49.5MW. When establishing the DNN wind power prediction model, a total of 3,600 data points from August 1 to 25, 2017 were used for modeling, and a total of 864 data points from August 26 to 31 were used for testing to verify the effectiveness of the prediction model.
[0086] In order to compare with the RF-DNN network, the SVM and ARMA algorithms are selected for result comparison to verify the effectiveness of the proposed DNN network wind power prediction model. The SVM selects the RBF kernel function, the loss function P = 0.1, and the termination criterion e = 0.001; the ARMA algorithm uses P = 2, Q = 5; According to the above settings, the wind power of wind farm 1 and wind farm 2 in the prediction period is obtained, and the comparison results are shown in Table 1;
[0087] Table 24 Prediction results of the same method under two wind farms
[0088]
[0089] As can be seen from the table, the MAE, MAPE, MSE, and RMSE indicators of the RF-DNN wind power prediction method are smaller than those of other prediction algorithms, indicating that the prediction effect of the proposed method is significantly better than that of the other three comparison algorithms; in general, since the feature information is screened by the RF algorithm before being input into the DNN prediction model, the error of the prediction period is effectively reduced. The proposed RF-DNN prediction model has the highest accuracy and the best prediction effect.
Claims
1. A wind power prediction method, characterized in that: The following steps are involved: Step 1: Use the historical values of wind power and weather factors, i.e., wind direction, wind speed, temperature, air pressure, and humidity, as training data sets to train the random forest RF, calculate the PI values of all feature information, and use the reverse search method of the sequence to select the optimal feature information set Q of wind power; Step 2: Use the historical value of the optimal feature information set Q as the data set for training the DNN network, input it into the DNN model, and complete the initialization of the DNN; use the restricted Boltzmann machine to roughly pre-train the DNN network layer by layer, and obtain the hidden layer weight coefficient w and threshold coefficient b that are close to the converged solution through RBM calculation; Step 3: Use the particle swarm optimization algorithm to make more precise adjustments to the weight coefficient and threshold coefficient to obtain a DNN network with excellent parameters; Step 4: Use the prediction data set composed of the optimal feature information set Q as the DNN model input, and obtain the wind power value to be predicted by calculation; The step 1 specifically includes: Step 1.1: Use the initial wind power feature information set as input to train the random forest. After the training is completed, the PI value of all feature information can be obtained. At this time, the prediction accuracy p of the random forest algorithm is evaluated using the test set. all , and set this value as the prediction threshold; Step 1.2: Sort the PI values of all feature information in descending order; after the sorting is completed, import the feature information corresponding to the first 10 PI values into the rough selected feature information set Q which is initially an empty set. pre At the same time, these feature information are deleted from the initial feature set M; Step 1.3, use Train the random forest again and get the prediction error for the test The upper right corner subscript i in the formula represents the information set Q pre The number of feature information; Step 1.4: Judgment If Then the feature information set Add ten more feature information to form a new set if No more feature information will be added to Qpre, otherwise the top ten most important feature information will be selected in M for addition.
2. A wind power prediction method according to claim 1, characterized in that: The steps 2 and 3 specifically include: In step 2, when using the restricted Boltzmann machine, the commonly used single-step alternating GIbbs sampling contrast divergence algorithm is used for training; the initial value of the algorithm is the known training sample value, which is used as the initial value state of the visible node unit vector and recorded as v data , and then use formula (20) to calculate the initial state value h of the hidden layer data : Where: m – the number of visible units in the visible layer; After the first iterative calculation of all units in the hidden layer is completed, an overall alternating GIbbs sampling is performed, that is, the states of all visible units are adjusted using formula (21) to obtain v new , and then use the previous formula (20) to adjust the state of the hidden unit to get h new ; Thus, the weight update formula of the visible node unit and the hidden node unit, and the threshold update formula of the visible node unit and the hidden node unit can be obtained as follows: Δw ij =s·(<v i ·h j > data -<v i ·h j > new ) (22) Δb i =s·(<v i > data -<v i > new ) (23) Δc j =s·(<h j > data -<h j > new ) (24) Where: s—learning rate, s is taken as 0.004; Through the pre-training of the restricted Boltzmann machine, the hidden layer weight coefficient w and threshold coefficient b that are close to the converged solution are obtained. Then the particle swarm optimization algorithm is used to make a more precise adjustment to the weight threshold of the DNN, that is, the "fine-tuning" of the parameter value; In step 3, the mathematical model of the particle swarm optimization algorithm (PSO) can be expressed as follows: there is a particle swarm x = [x1, x2, x3, ... x m ], where m is the total number of particles in this particle swarm. This particle swarm exists in an n-dimensional space, and the optimization process is also carried out in this space; the spatial position of the i-th particle is represented by x i =[x i1 ,x i2 ,x i3 ,…x in ], and the corresponding search speed of the i-th particle is v i =[v i1 ,v i2 ,v i3 ,…v in ], and the optimal spatial position of the i-th particle in history is p i =[p i1 ,p i2 ,p i3 ,…p in ], the optimal position of all particles in the global space is p g =[p g1 ,p g2 ,p g3 ,…p gn ], during the algorithm operation, the search speed and spatial position of the particle will change according to equations (25) and (26): v id (k+1)=ωv id (k)+c1r1(p id -x id (k))+c2r2(p gd -x id (k)) (25) x id (k+1)=x id (k)+v id (k+1) (26) Where: v id (k)——the velocity of the ith particle corresponding to the kth change in the dth dimension; x id (k)——the position of the ith particle corresponding to the kth change in the dth dimension; ω——inertia coefficient; c1, c2——acceleration coefficients; r1, r2——random numbers between 0 and 1; p id ——The i-th particle corresponds to the historical optimal position in the d-th dimension; p gd ——All particles correspond to the historical optimal position in the dth dimension; In formula (25), the inertia coefficient ω reflects the relationship between the historical particle velocity and the latest particle velocity. By controlling the size of the inertia coefficient ω, the search speed and optimization speed of the particle swarm algorithm can be adjusted, affecting the results of local optimization and global optimization. In order to better balance the impact of the inertia coefficient on local search and global search, it is proposed to use a dynamic inertia coefficient, and its iterative process is shown in formula (27): Where: max ——The maximum value of the inertia coefficient; ω min ——minimum value of inertia coefficient; k max ——The maximum number of iterations; k——The current number of iterations.
3. A wind power prediction method according to claim 1, characterized in that: The DNN network of step 4 contains one input layer, multiple hidden layers and one output layer; under the condition that the historical wind power values and weather conditions are known, the wind power for the period to be predicted can be obtained through the DNN network.
4. A wind power prediction method according to claim 1, characterized in that: The wind power prediction value is evaluated using mean absolute error, mean absolute percentage error, mean square error and root mean square error.
Citation Information
Patent Citations
Short-term wind power prediction method based on improved neural network
CN107330248A
Short-term wind-power power prediction method
CN107507097A
Wind power prediction method based on deep belief network
CN110263915A