Meteorological feature extraction method and device for power prediction, terminal equipment and storage medium
By generating covariance matrix and screening meteorological features using mutual information values and redundancy, the problem of inability to evaluate dependencies during feature selection in the prior art is solved, efficient photovoltaic power prediction is achieved, and prediction accuracy and characteristic representation are improved.
Patent Information
- Application Number
- CN202411605766.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-02-28
AI Technical Summary
The prior art cannot evaluate the dependence between features when selecting meteorological features, resulting in the selected set of meteorological features that may contain multiple highly correlated features, increasing noise and redundant information in model training and reducing the accuracy of photovoltaic power prediction.
By generating a covariance matrix, the correlation between meteorological features is evaluated, and combining mutual information values and redundancy, the mRMR algorithm is used to filter out meteorological features with high correlation and low redundancy as input features of the model.
It effectively reduces the noise and redundant information in the model input, improves the accuracy of photovoltaic output prediction, and ensures that the selected meteorological characteristics have high predictive value and avoids information redundancy.
Smart Images

Figure CN119537903A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of model feature extraction for power prediction, and in particular to a meteorological feature extraction method, device, terminal equipment and storage medium for power prediction. Background Art
[0002] When large-scale centralized photovoltaic power stations and distributed photovoltaic systems are connected to the grid, accurate photovoltaic power prediction can reduce the fluctuations and shocks of the power grid and improve the stability and security of the power grid. When using machine learning models to predict new energy power, the most important step is to train the model with the collected historical data so that the model can predict power. However, the original training data often contains multiple redundant information, so feature construction is required before model training, such as feature selection for various factors such as meteorology that affect photovoltaic output. Feature selection refers to the process of selecting the most useful feature subset that has the greatest impact on the model's prediction performance from the original feature set during the construction of the machine learning model. It has two main purposes: one is to reduce the complexity and computational cost of the model, and the other is to improve the prediction accuracy and generalization ability of the model.
[0003] However, when selecting features for meteorological factors that affect photovoltaic output, the existing technology often uses a single correlation screening method (such as the Pearson correlation coefficient) to obtain meteorological factors related to power prediction, such as photovoltaic output, wind speed, wind direction, humidity, and temperature, but does not evaluate the dependency between the various features, and cannot consider the redundancy between the various meteorological features, resulting in the selected meteorological feature set may contain multiple highly correlated features, so that too much redundant information will interfere with each other during the model training process, resulting in low prediction performance of the model, unable to obtain accurate photovoltaic power prediction results, and unable to guarantee the stability of the power grid. Summary of the invention
[0004] The embodiments of the present invention provide a meteorological feature extraction method, apparatus, terminal device and storage medium for power prediction, which can comprehensively evaluate the influence of each meteorological feature on photovoltaic output and its dependence on other features, thereby ensuring that the selected target meteorological features are not only highly correlated with photovoltaic output, but also have low redundancy with each other, thereby reducing noise and redundant information in the model input, and can effectively solve the problem in the prior art that the redundancy between various meteorological features cannot be considered due to the inability to evaluate the dependence between various features, resulting in excessive redundant information and low prediction performance of the model.
[0005] An embodiment of the present invention provides a meteorological feature extraction method for power forecasting, comprising:
[0006] Generate a covariance matrix for characterizing the correlation between meteorological features according to a first meteorological factor set corresponding to a photovoltaic output sequence; wherein the first meteorological factor set includes a plurality of different first meteorological features;
[0007] Based on the variance values of each meteorological feature in the covariance matrix, selecting a plurality of second meteorological features from the covariance matrix in descending order;
[0008] Obtaining the mutual information value between each first meteorological feature and the photovoltaic output sequence, and the redundancy used to characterize the redundancy between any two first meteorological features, and extracting a number of third meteorological features from the first meteorological factor set through a screening rule of maximizing the mutual information value and minimizing the redundancy; wherein the total number of the second meteorological features and the total number of the third meteorological features are both less than the total number of the first meteorological features;
[0009] Determine whether the same meteorological feature exists in each second meteorological feature and each third meteorological feature; if so, take the same meteorological feature as the target meteorological feature; if not, take the to-be-selected meteorological feature as the target meteorological feature;
[0010] According to each target meteorological feature, input features of a prediction model for photovoltaic output prediction are generated.
[0011] Preferably, generating a covariance matrix for characterizing the correlation between meteorological features according to a first meteorological factor set corresponding to a photovoltaic output sequence includes:
[0012] Obtaining the linear correlation degree between each first meteorological feature and the photovoltaic output sequence;
[0013] Based on each linear correlation degree, selecting fourth meteorological features corresponding to a first preset number from the first meteorological factor set in descending order; wherein the first preset number is less than the total number of the first meteorological features;
[0014] A covariance matrix for characterizing the correlation between the meteorological characteristics is generated according to the fourth meteorological characteristics.
[0015] Preferably, the method of selecting a plurality of second meteorological features from the covariance matrix in descending order based on the variance values of each meteorological feature in the covariance matrix includes:
[0016] Determining the variance values corresponding to the fourth meteorological characteristics according to the diagonal elements in the covariance matrix;
[0017] Based on each variance value, second meteorological features corresponding to a second preset number are screened out from each fourth meteorological feature in order from large to small; wherein the second preset number is smaller than the first preset number.
[0018] Preferably, the plurality of third meteorological features are extracted from the first meteorological factor set by using the screening rule of maximizing mutual information value and minimizing redundancy, including:
[0019] According to the mutual information value and redundancy corresponding to each first meteorological feature, a scoring function with the goal of maximizing the mutual information value and minimizing the redundancy is constructed;
[0020] The scoring function is solved based on the mRMR algorithm, and a plurality of third meteorological characteristics are output.
[0021] Preferably, the scoring function is solved based on the mRMR algorithm to output a plurality of third meteorological characteristics, including:
[0022] With the goal of maximizing the mutual information value and minimizing the redundancy, the scoring function is solved based on the mRMR algorithm to generate a balance value corresponding to each first meteorological feature for characterizing the balance between correlation and redundancy;
[0023] Based on each balance value, third meteorological features corresponding to a second preset number are screened out from each first meteorological feature in descending order.
[0024] Preferably, the mutual information value between each first meteorological feature and the photovoltaic output sequence is calculated according to the following formula:
[0025]
[0026] Among them, I(X i ,Y) is the mutual information value between the first meteorological feature and the photovoltaic output sequence, p(X i ,Y) is the joint probability distribution of the first meteorological characteristic and the photovoltaic output sequence, p(X i ) is the marginal probability distribution of the first meteorological characteristic, p(Y) is the marginal probability distribution of the photovoltaic output sequence, X i is the i-th first meteorological feature in the first meteorological factor set, and Y is the photovoltaic output sequence.
[0027] Preferably, before judging whether the same meteorological feature exists in each of the meteorological features to be selected, the method further includes:
[0028] Based on a permutation importance analysis method for evaluating the degree of influence of a feature on the prediction performance of a model, the first meteorological factors in the first meteorological factor set are sorted in descending order according to the degree of influence on the prediction performance, and then the fifth meteorological features corresponding to the second preset number are screened out in descending order;
[0029] Inputting the first meteorological factor set and each fifth meteorological feature into a trained prediction model for photovoltaic output prediction, so that the prediction model outputs a first mean square error corresponding to the first meteorological factor set and a second mean square error corresponding to each fifth meteorological feature;
[0030] The difference between each second mean square error and the first mean square error is used as the model accuracy attenuation degree value corresponding to each fifth meteorological feature;
[0031] The fifth meteorological feature whose model accuracy attenuation value is greater than the preset attenuation threshold is used as the candidate meteorological feature.
[0032] Based on the above method embodiments, the present invention provides corresponding device embodiments.
[0033] An embodiment of the present invention provides a meteorological feature extraction device for power prediction, comprising: a covariance matrix generation module, a meteorological feature screening first module, a meteorological feature screening second module, a meteorological feature determination module, and a model input feature generation module;
[0034] The covariance matrix generation module is used to generate a covariance matrix for characterizing the correlation between various meteorological characteristics according to a first meteorological factor set corresponding to a photovoltaic output sequence; wherein the first meteorological factor set includes a plurality of different first meteorological characteristics;
[0035] The meteorological feature screening first module is used to screen out a plurality of second meteorological features from the covariance matrix in descending order based on the variance values of the meteorological features in the covariance matrix;
[0036] The second meteorological feature screening module is used to obtain the mutual information value between each first meteorological feature and the photovoltaic output sequence, and the redundancy used to characterize the redundancy between any two first meteorological features, and extract a plurality of third meteorological features from the first meteorological factor set through a screening rule of maximizing the mutual information value and minimizing the redundancy; wherein the total number of the second meteorological features and the total number of the third meteorological features are both less than the total number of the first meteorological features;
[0037] The meteorological feature determination module is used to determine whether the same meteorological feature exists in each second meteorological feature and each third meteorological feature; if so, the same meteorological feature is used as the target meteorological feature; if not, the meteorological feature to be selected is used as the target meteorological feature;
[0038] The model input feature generation module is used to generate input features of a prediction model for photovoltaic output prediction according to various target meteorological features.
[0039] Based on the above method embodiments, the present invention provides corresponding terminal device embodiments.
[0040] Another embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, a meteorological feature extraction method for power prediction described in the above-mentioned embodiment of the invention is implemented.
[0041] Based on the above method embodiments, the present invention provides corresponding storage medium item embodiments.
[0042] Another embodiment of the present invention provides a storage medium, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute a meteorological feature extraction method for power prediction described in the above-mentioned embodiment of the invention.
[0043] The following beneficial effects are achieved by implementing the present invention:
[0044] The embodiment of the present invention provides a meteorological feature extraction method, apparatus, terminal device and storage medium for power prediction. The present invention first generates a covariance matrix for characterizing the correlation between meteorological features, and then screens out a number of second meteorological features that are less than the total number of the original first meteorological factor set based on the variance value of each meteorological feature in the covariance matrix, so that the second meteorological feature with better performance in volatility and direct correlation with photovoltaic output can be obtained; then, based on the mutual information value between each first meteorological feature and the photovoltaic output sequence (reflecting the strength of the nonlinear relationship between the feature and the photovoltaic output) and the redundancy between each first meteorological feature (reflecting the dependence and repeated information between the features), the third meteorological feature is screened out by a screening rule of maximizing the mutual information value and minimizing the redundancy, that is, the selected feature can be obtained. It has not only a high correlation with the photovoltaic output (measured by the linear correlation degree and the mutual information value), but also a low redundancy between each other, so that the noise and redundant information in the model input can be reduced, and the accuracy of the model for photovoltaic output prediction is improved. Finally, by judging whether there are the same features in the second and third meteorological features, the present invention can use the same features as the target meteorological features, which can avoid the repeated introduction of the same information in the prediction model input, and make the selected target meteorological features have both high predictive value (such as having a high nonlinear relationship strength and mutual information value), and avoid information redundancy, which can improve the subsequent prediction accuracy of the model. If there is no intersection in the various feature sets, all the selected features are combined as target meteorological features, which can ensure the integrity and diversity of the feature combination. Compared with the prior art, the present invention combines multiple dimensions such as covariance matrix analysis, mutual information value and redundancy to screen out the meteorological features of the model input, which can more comprehensively evaluate the degree of influence of each meteorological feature on photovoltaic output and its dependence on other features, thereby selecting more representative and predictive features, that is, ensuring that the selected target meteorological features are not only highly correlated with photovoltaic output, but also have low redundancy with each other, thereby reducing the noise and redundant information in the model input, significantly improving the accuracy of photovoltaic output prediction, and better ensuring the stability of the power grid. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is a flow chart of a meteorological feature extraction method for power forecasting provided by one embodiment of the present invention.
[0046] Figure 2 It is a schematic diagram of the minimum sensitive meteorological factor set extraction process provided by another embodiment of the present invention.
[0047] Figure 3 It is a schematic diagram of the structure of a meteorological feature extraction device for power prediction provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0048] 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 only 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.
[0049] like Figure 1 FIG. 1 is a flow chart of a meteorological feature extraction method for power prediction provided by an embodiment of the present invention. The meteorological feature extraction method for power prediction includes:
[0050] Step S1: generating a covariance matrix for characterizing the correlation between various meteorological features according to a first meteorological factor set corresponding to a photovoltaic output sequence; wherein the first meteorological factor set includes a plurality of different first meteorological features;
[0051] Step S2: based on the variance values of each meteorological feature in the covariance matrix, selecting a plurality of second meteorological features from the covariance matrix in descending order;
[0052] Step S3: obtaining the mutual information value between each first meteorological feature and the photovoltaic output sequence, and the redundancy used to characterize the redundancy between any two first meteorological features, and extracting a plurality of third meteorological features from the first meteorological factor set by a screening rule of maximizing the mutual information value and minimizing the redundancy; wherein the total number of the second meteorological features and the total number of the third meteorological features are both less than the total number of the first meteorological features;
[0053] Step S4: determining whether the same meteorological feature exists in each of the second meteorological features and each of the third meteorological features; if so, taking the same meteorological feature as the target meteorological feature; if not, taking the to-be-selected meteorological feature as the target meteorological feature;
[0054] Step S5: generating input features of a prediction model for photovoltaic output prediction according to each target meteorological feature.
[0055] For step S1, in a preferred embodiment, the present invention can collect meteorological factors of a typical photovoltaic power station and use them as the first meteorological factor set corresponding to the photovoltaic output sequence.
[0056] Illustratively, the first meteorological factors include different first meteorological characteristics, which may be factors such as wind speed, wind direction, humidity, temperature, air pressure, irradiance, cloud cover and precipitation.
[0057] Furthermore, by calculating the covariance between the meteorological features in the first meteorological factor set, a covariance matrix is constructed to characterize the correlation between these meteorological features. The elements of the covariance matrix represent the degree of linear correlation between the features, and the elements on the diagonal are the variance of each feature, indicating the degree of discreteness of the feature itself.
[0058] Then, when generating the covariance matrix used to characterize the correlation between various meteorological characteristics, it specifically includes:
[0059] Obtaining the linear correlation degree between each first meteorological feature and the photovoltaic output sequence;
[0060] Based on each linear correlation degree, selecting fourth meteorological features corresponding to a first preset number from the first meteorological factor set in descending order; wherein the first preset number is less than the total number of the first meteorological features;
[0061] A covariance matrix for characterizing the correlation between the meteorological characteristics is generated according to the fourth meteorological characteristics.
[0062] In the process of generating the covariance matrix used to characterize the correlation between various meteorological features, since the original first meteorological factor set may contain a large number of meteorological features, directly calculating the covariance between these features will consume a lot of computing resources. By first screening out the fourth meteorological feature with a high degree of linear correlation with photovoltaic output, the amount of calculation of the subsequent covariance matrix can be significantly reduced, and the processing efficiency can be improved.
[0063] Then, the embodiment of the present invention firstly performs screening based on the linear correlation degree between each first meteorological feature and the photovoltaic output sequence, and selects fourth meteorological features corresponding to a first preset number therefrom;
[0064] Illustratively, the embodiment of the present invention can quantify the correlation between meteorological factors and the output power of the photovoltaic power station through the Pearson correlation coefficient, that is, calculate the linear correlation between the first meteorological feature and the photovoltaic output sequence. The Pearson correlation coefficient can be used to reflect the linear correlation between two variables X and Y. The correlation coefficient value is between -1 and 1. The larger the absolute value, the stronger the correlation. The calculation method of the Pearson correlation coefficient is as follows:
[0065]
[0066] In the formula, ρ x,y is the Pearson linear correlation coefficient, data set X is weather data, including temperature, atmospheric pressure, humidity, cloud cover, etc., data set Y is the photovoltaic output series, ρ x,y Used to show the correlation between numerical meteorological data and PV output.
[0067] According to the size of the Pearson correlation coefficient, the first meteorological feature in the first meteorological factor set can be sorted and analyzed, so as to extract the corresponding fourth meteorological feature according to the first preset number, and if the first preset number is less than the total number of the first meteorological features, some of the most representative meteorological features can be selected from the original set to construct the covariance moment, thereby reducing the number of features, thereby further reducing the computational complexity of the covariance matrix and improving the efficiency of data processing and model training.
[0068] For step S2, in a preferred embodiment, based on the variance values of each meteorological feature in the covariance matrix, a plurality of second meteorological features are screened out from the covariance matrix in descending order, including:
[0069] Determining the variance values corresponding to the fourth meteorological characteristics according to the diagonal elements in the covariance matrix;
[0070] Based on each variance value, second meteorological features corresponding to a second preset number are screened out from each fourth meteorological feature in order from large to small; wherein the second preset number is smaller than the first preset number.
[0071] Illustratively, the present invention can perform non-correlation processing on each meteorological subset based on the principal component analysis (PCA) method, thereby screening out mutually unrelated principal component variables, namely, the second meteorological characteristics.
[0072] First, the variance values corresponding to the fourth meteorological features (i.e., the meteorological features with a high degree of linear correlation with photovoltaic output selected in step S1) are extracted from the diagonal of the covariance matrix;
[0073] Then, these variance values are sorted. The features with larger variance values indicate that their data are more discrete, and they may contain more useful information or change information about photovoltaic output.
[0074] Then, in descending order, the second meteorological features corresponding to the second preset number are selected from the sorted features. The second preset number here is a pre-set value, which is less than the first preset number (i.e., the total number of the fourth meteorological features selected in step S1). Then, by selecting again based on the variance value in the selected fourth meteorological features, the number of features input into the prediction model can be further reduced, the complexity of the model can be reduced, and the calculation efficiency can be improved.
[0075] Therefore, the screened second meteorological feature not only has a high linear correlation with the photovoltaic output (obtained through screening in step S1), but also has a high degree of discreteness within itself (obtained through screening in step S2). The second meteorological feature finally obtained takes into account both the relationship between the feature and the photovoltaic output and the characteristics of the feature itself, so that each second meteorological feature is both independent and related, which can further optimize the performance of the prediction model.
[0076] For step S3, in a preferred embodiment, the extraction of a plurality of third meteorological features from the first meteorological factor set by the screening rule of maximizing mutual information value and minimizing redundancy includes:
[0077] According to the mutual information value and redundancy corresponding to each first meteorological feature, a scoring function with the goal of maximizing the mutual information value and minimizing the redundancy is constructed;
[0078] The scoring function is solved based on the mRMR algorithm to output a number of third meteorological characteristics; specifically:
[0079] With the goal of maximizing the mutual information value and minimizing the redundancy, the scoring function is solved based on the mRMR algorithm to generate a balance value corresponding to each first meteorological feature for characterizing the balance between correlation and redundancy;
[0080] Based on each balance value, third meteorological features corresponding to a second preset number are screened out from each first meteorological feature in descending order.
[0081] It can be understood that the mRMR algorithm is a feature selection method based on information theory. It evaluates the importance of features by maximizing the relevance between features and target variables and minimizing the redundancy between features. It aims to select a subset of features that are highly correlated with the target variable and have low redundancy with each other.
[0082] The embodiment of the present invention first calculates the mutual information value between each first meteorological feature and the photovoltaic output sequence, and calculates the redundancy between the features through the mutual information and correlation coefficient of each first meteorological feature, so that a scoring function with the maximum mutual information value and the minimum redundancy as the goal can be constructed based on the mutual information value and redundancy corresponding to each first meteorological feature.
[0083] Through the scoring function, the calculation results of each meteorological feature based on relevance and redundancy can be obtained, and an mRMR value (i.e., a balance value used to characterize the balance between relevance and redundancy) can be assigned to each feature, which reflects the importance and non-redundancy of the feature.
[0084] Further, based on each balance value, each first meteorological feature is sorted in descending order, and the top N features with the highest scores are selected as the optimal feature subset, for example, the third meteorological feature corresponding to the second preset number is selected as the optimal feature subset. Then, the embodiment of the present invention can comprehensively consider the correlation between the features and the categories and the redundancy between the features, so as to select a feature subset that is both relevant and non-redundant.
[0085] The mRMR algorithm is applied to extract the third meteorological feature from the first meteorological factor set through the screening rule of maximizing the mutual information value and minimizing the redundancy, so that the selected third meteorological feature (i.e., the optimal feature subset) is highly correlated with the target variable (such as the photovoltaic output sequence), and the redundancy between the features is low. It can not only more accurately reflect the changes in the target variable, thereby improving the prediction accuracy of the model. In addition, redundant features can be eliminated, reducing the number of input features, thereby simplifying the complexity of the model. Therefore, it not only reduces the computational cost, but also reduces the risk of overfitting, making the model more robust.
[0086] In a preferred embodiment, the mutual information value between each first meteorological feature and the photovoltaic output sequence can be calculated according to the following formula:
[0087]
[0088] Among them, I(X i ,Y) is the mutual information value between the first meteorological feature and the photovoltaic output sequence, p(X i ,Y) is the joint probability distribution of the first meteorological characteristic and the photovoltaic output sequence, p(X i ) is the marginal probability distribution of the first meteorological characteristic, p(Y) is the marginal probability distribution of the photovoltaic output sequence, X i is the i-th first meteorological feature in the first meteorological factor set, and Y is the photovoltaic output sequence.
[0089] Furthermore, the constructed scoring function includes: a correlation maximization function, a redundancy minimization function, and a balance value calculation function for characterizing the balance between correlation and redundancy. The process of constructing the scoring function and solving the minimum set of sensitive meteorological factors (including the third meteorological characteristics corresponding to the second preset number) based on the mRMR principle is:
[0090] ①Solving the maximum correlation:
[0091] The maximum correlation is obtained by feature X i The average value of the mutual information between and the photovoltaic output Y is expressed as follows:
[0092]
[0093] In the formula, I(X i ,Y) represents feature X i The mutual information between PV output Y is expressed as follows:
[0094]
[0095] ②Solving the minimum redundancy
[0096] Minimum redundancy requires that the dependency between each feature is minimized, so the redundancy minimization function can be expressed as follows:
[0097]
[0098] Then the calculation function of the balance value mRMR used to characterize the balance between relevance and redundancy can be expressed as:
[0099]
[0100] After solving the mRMR values of each feature set according to the above function, they are arranged in descending order to obtain the characteristic arrangement of meteorological factors based on the mRMR principle, which can be expressed as:
[0101] mRMR1>mRMR2>mRMR3>…mRMR i
[0102] Among them, mRMR1, mRMR2, mRMR3..., mRMR i is the mRMR value of each feature in the feature set F. It can be understood that, based on the above mRMR balance values, the third meteorological features corresponding to the second preset number are screened out from the first meteorological features in descending order.
[0103] In a preferred embodiment, before determining whether the same meteorological feature exists in each of the meteorological features to be selected, the following process of determining the features to be selected is also included:
[0104] Based on a permutation importance analysis method for evaluating the degree of influence of a feature on the prediction performance of a model, the first meteorological factors in the first meteorological factor set are sorted in descending order according to the degree of influence on the prediction performance, and then the fifth meteorological features corresponding to the second preset number are screened in descending order;
[0105] Inputting the first meteorological factor set and each fifth meteorological feature into a trained prediction model for photovoltaic output prediction, so that the prediction model outputs a first mean square error corresponding to the first meteorological factor set and a second mean square error corresponding to each fifth meteorological feature;
[0106] The difference between each second mean square error and the first mean square error is used as the model accuracy attenuation degree value corresponding to each fifth meteorological feature;
[0107] The fifth meteorological feature whose model accuracy attenuation value is greater than the preset attenuation threshold is used as the candidate meteorological feature.
[0108] Specifically, the principle of permutation importance is that randomly sorting a column of features should reduce the accuracy of the prediction. If the prediction model is highly dependent on the randomly shuffled column of features, the accuracy of the model will be attenuated even more.
[0109] The steps of sorting the first meteorological factors in the first meteorological factor set according to the degree of influence on the prediction performance from large to small based on the arrangement importance of the present invention are as follows:
[0110] ① Using all meteorological features, train a model and obtain the model’s prediction error.
[0111] ② Randomly shuffle a meteorological feature column in the validation set to cause a large number of changes in the order of the feature values, and predict the score again.
[0112] ③The difference between the two prediction scores can be used to obtain the influence of the feature value on the prediction.
[0113] ④ Repeat the above process for each feature.
[0114] According to the above process, each first meteorological factor is sorted in descending order according to the degree of influence on the forecast performance, and the feature set F after feature sorting by importance is obtained. L .
[0115] The original feature set F Y And the feature set F after feature sorting by importance L By inputting them into the photovoltaic power prediction model respectively, the original predicted MSE1 value and the newly predicted MSE2 value can be obtained. According to the difference between the two, the corresponding model accuracy attenuation degree S is obtained. With 95% of the total proportion as the preset attenuation degree threshold, several fifth meteorological characteristics are screened out, that is, the minimum sensitive meteorological factor set Q3 can be obtained, and then:
[0116] MSE1=M Yc (F Y )
[0117] MSE2=M Yc (F L )
[0118] S=f(MSE1-MSE2)
[0119] Among them, M Yc is the short-term photovoltaic power prediction model, S is the degree of model accuracy attenuation, MSE1 is the mean square error obtained by inputting the feature set F into the model, and MSE2 is the feature set F L The mean squared error obtained by entering the model.
[0120] Finally, the meteorological features whose model accuracy attenuation value is greater than the preset attenuation threshold are marked as the fifth meteorological features and used as the meteorological features to be selected. Then, one more feature set to be selected can be screened out when the intersection is subsequently calculated.
[0121] Therefore, the embodiment of the present invention can quantitatively evaluate the influence of each meteorological feature on the prediction performance of the photovoltaic output prediction model through the permutation importance analysis, and further sort the feature set F after the permutation importance is used. L By inputting them into the photovoltaic power prediction model respectively, the fifth meteorological feature that has a significant contribution to the model prediction performance can be screened out more accurately. Moreover, by selecting the fifth meteorological feature that has a significant impact on the model prediction performance, a more stable and generalized model can be constructed, making the model more consistent and reliable in different scenarios and conditions, and better able to adapt to the output prediction needs in practical applications.
[0122] In a preferred embodiment, Figure 2 As shown in FIG. 1 , three meteorological feature subsets can be screened out first, and then the final minimum feature subset can be determined by finding the intersection, and used as the input feature of the prediction model.
[0123] First, a set of sensitive meteorological factors F (i.e., the first meteorological factor set mentioned above) related to the power prediction of the photovoltaic power station can be collected, which includes several different first meteorological characteristics;
[0124] By inputting the sensitive meteorological factor set F into the models based on Pearson correlation coefficient and PCA decorrelation respectively, the minimum sensitive meteorological factor set Q1 can be obtained; by inputting the sensitive meteorological factor set F into the descending arrangement model based on the mutual information and redundancy principle, the minimum sensitive meteorological factor set Q2 can be obtained; further, the original sensitive meteorological factor set F and the disordered meteorological feature set are input into the short-term photovoltaic power prediction model, and the degree of accuracy attenuation is analyzed to obtain the minimum sensitive meteorological factor set Q3. Finally, the intersection of the above three meteorological factor sets is taken to obtain the final minimum sensitive meteorological factor set. The final minimum sensitive meteorological factor set contains several target meteorological features, which can be used as the input features of the final prediction model.
[0125] Schematically, different methods evaluate the importance of meteorological features to PV power forecasting from different perspectives. Pearson correlation coefficient and PCA decorrelation focus on the linear correlation between features and the dimensionality reduction of data; mutual information and redundancy principle consider the nonlinear relationship and redundancy between features; and the degree of accuracy attenuation directly evaluates the impact of features on the model prediction performance. Through multi-dimensional evaluation, features that contribute significantly to the prediction results can be more comprehensively and accurately identified.
[0126] The minimum set of sensitive meteorological factors was screened out by three different methods, and their intersection was taken as the final feature subset, which improved the robustness of feature selection. Even if a method has bias or errors in the evaluation of certain features, cross-validation with other methods can effectively reduce the impact of such bias on the final result.
[0127] For step S4, in a preferred embodiment, each second meteorological feature, each third meteorological feature and each fifth meteorological feature can be used as a candidate meteorological feature, so as to determine whether the same meteorological feature exists in each candidate meteorological feature. If the same meteorological feature exists (such as the same name), then these same meteorological features are regarded as target meteorological features. If there is no same meteorological feature, then each candidate meteorological feature is directly used as the target meteorological feature.
[0128] It is understandable that when there are no completely identical meteorological features, it means that each screening method has identified some unique features that may contribute to the forecast. Taking all of them as target meteorological features can retain as much information as possible and reduce the useful data that may be lost due to screening.
[0129] For step S5, in a preferred embodiment, selecting target meteorological features that are highly correlated with photovoltaic output as input can make the prediction model more focused on factors that have a significant impact on the prediction results, thereby improving the accuracy of the prediction.
[0130] When screening the target meteorological characteristics, the present invention also uses the screening rules of maximizing the mutual information value and minimizing the redundancy to extract a number of third meteorological characteristics from the first meteorological factor set, thereby ensuring that the selected target meteorological characteristics are not only highly correlated with the photovoltaic output but also have low redundancy with each other, which can reduce the noise and redundant information in the model input and improve the prediction accuracy of the photovoltaic output.
[0131] In a preferred embodiment, the numerical weather forecast data of Haifa photovoltaic power station in a certain period of time is taken as the research object, and the meteorological data is divided into 5 subsets according to the month; and the feature set F is established. Y , as shown in Table 1:
[0132] Table 1 Names and representations of impact features
[0133]
[0134] According to the Pearson correlation coefficient heat map, the correlation coefficients are sorted and analyzed to determine the sensitive meteorological factors affecting photovoltaic power generation: X1, X2, X3, ..., X n , the principal component analysis (PCA) method is used to perform non-correlation processing on the sensitive meteorological factors screened based on Pearson, and the minimum sensitive meteorological factor set Q1 obtained based on principal component analysis is {irradiance, humidity, wind speed, temperature}.
[0135] Furthermore, the historical power of Haifa PV power station in a certain period of time is taken as the research object, the time scale is 15min, a total of 10760 sample points, the meteorological feature set F is input, and the results of MI value and mRMR value are obtained based on the mRMR algorithm as shown in Table 2.
[0136] Table 2 Feature selection results
[0137]
[0138] It can be seen from the above table that the minimum sensitive meteorological factor set Q2 constructed based on the mRMR principle should be {irradiance, temperature, wind direction, humidity}.
[0139] By transforming the original feature set F Y And the feature set F after feature screening by permutation importance L Input into the short-term photovoltaic power prediction model, and obtain the importance of each feature arrangement, as shown in Table 3:
[0140] Table 3 Importance of each feature ranking
[0141]
[0142] From the perspective of feature interpretability, with a total share of 95% as the target, the minimum set of sensitive meteorological factors Q3 should be {irradiance, humidity, air pressure, cloud cover}.
[0143] In summary, the minimum sensitive meteorological factor set obtained based on the Pearson correlation coefficient is {irradiance, humidity, wind speed, temperature}, the minimum sensitive meteorological factor set obtained based on the mRME principle is {irradiance, temperature, wind direction, humidity}, and the intersection of the three evaluation methods is further taken to obtain the final minimum sensitive meteorological factor set of {irradiance, humidity}. It can be understood that the embodiment of the present invention can obtain multiple target meteorological characteristics, such as irradiance and humidity.
[0144] Therefore, the present invention can construct a minimum set of sensitive meteorological factors that are highly correlated with the output power of photovoltaic power stations and are independent of each other. It not only takes into account the meteorological factors and environmental factors that affect the output power of photovoltaic power stations in multiple scenarios and the linear and nonlinear relationships between them, but also incorporates the power prediction model to establish a connection between the obtained meteorological characteristics and the subsequent power prediction model, thereby providing higher quality and explainable feature inputs for the subsequent power prediction model.
[0145] like Figure 3 As shown, based on the above-mentioned various embodiments of the meteorological feature extraction method for power prediction, the present invention provides a corresponding device embodiment;
[0146] An embodiment of the present invention provides a meteorological feature extraction device for power prediction, comprising: a covariance matrix generation module, a meteorological feature screening first module, a meteorological feature screening second module, a meteorological feature determination module, and a model input feature generation module;
[0147] The covariance matrix generation module is used to generate a covariance matrix for characterizing the correlation between various meteorological characteristics according to a first meteorological factor set corresponding to a photovoltaic output sequence; wherein the first meteorological factor set includes a plurality of different first meteorological characteristics;
[0148] The meteorological feature screening first module is used to screen out a plurality of second meteorological features from the covariance matrix in descending order based on the variance values of the meteorological features in the covariance matrix;
[0149] The second meteorological feature screening module is used to obtain the mutual information value between each first meteorological feature and the photovoltaic output sequence, and the redundancy used to characterize the redundancy between any two first meteorological features, and extract a plurality of third meteorological features from the first meteorological factor set through a screening rule of maximizing the mutual information value and minimizing the redundancy; wherein the total number of the second meteorological features and the total number of the third meteorological features are both less than the total number of the first meteorological features;
[0150] The meteorological feature determination module is used to determine whether the same meteorological feature exists in each second meteorological feature and each third meteorological feature; if so, the same meteorological feature is used as the target meteorological feature; if not, the meteorological feature to be selected is used as the target meteorological feature;
[0151] The model input feature generation module is used to generate input features of a prediction model for photovoltaic output prediction according to various target meteorological features.
[0152] It should be noted that the device embodiments described above are merely schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, and may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art can understand and implement it without paying creative labor.
[0153] Those skilled in the art can clearly understand that, for the sake of convenience and simplicity, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0154] Based on the above-mentioned various embodiments of the meteorological feature extraction method for power prediction, the present invention provides corresponding terminal equipment embodiments.
[0155] An embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, a meteorological feature extraction method for power prediction described in any method embodiment of the present invention is implemented.
[0156] The terminal device may be a computing terminal device such as a desktop computer, a notebook, a palm computer, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0157] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, and uses various interfaces and lines to connect various parts of the entire terminal device.
[0158] The memory can be used to store the computer program, and the processor realizes various functions of the terminal device by running or executing the computer program stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Med i aCard, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device or other volatile solid-state storage device.
[0159] Based on the above-mentioned various embodiments of the meteorological feature extraction method for power prediction, the present invention provides corresponding storage medium item embodiments.
[0160] An embodiment of the present invention provides a storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute a meteorological feature extraction method for power forecasting described in any method embodiment of the present invention.
[0161] The storage medium is a computer-readable storage medium, and the computer program is stored in the computer-readable storage medium. When the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0162] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A meteorological feature extraction method for power forecasting, characterized in that: include: Generate a covariance matrix for characterizing the correlation between meteorological features according to a first meteorological factor set corresponding to a photovoltaic output sequence; wherein the first meteorological factor set includes a plurality of different first meteorological features; Based on the variance values of each meteorological feature in the covariance matrix, selecting a plurality of second meteorological features from the covariance matrix in descending order; Obtaining the mutual information value between each first meteorological feature and the photovoltaic output sequence, and the redundancy used to characterize the redundancy between any two first meteorological features, and extracting a number of third meteorological features from the first meteorological factor set through a screening rule of maximizing the mutual information value and minimizing the redundancy; wherein the total number of the second meteorological features and the total number of the third meteorological features are both less than the total number of the first meteorological features; Each second meteorological feature and each third meteorological feature are used as the meteorological features to be selected, and then it is determined whether the same meteorological feature exists in each of the meteorological features to be selected; if so, the same meteorological feature is used as the target meteorological feature; if not, the meteorological feature to be selected is used as the target meteorological feature; According to each target meteorological feature, input features of a prediction model for photovoltaic output prediction are generated.
2. A meteorological feature extraction method for power prediction according to claim 1, characterized in that: The step of generating a covariance matrix for characterizing the correlation between meteorological features according to a first meteorological factor set corresponding to a photovoltaic output sequence includes: Obtaining the linear correlation degree between each first meteorological feature and the photovoltaic output sequence; Based on each linear correlation degree, fourth meteorological features corresponding to a first preset number are selected from the first meteorological factor set in descending order; wherein the first preset number is less than the total number of the first meteorological features; A covariance matrix for characterizing the correlation between the meteorological characteristics is generated according to the fourth meteorological characteristics.
3. A meteorological feature extraction method for power prediction according to claim 2, characterized in that: The method of selecting a plurality of second meteorological features from the covariance matrix in descending order based on the variance values of the meteorological features in the covariance matrix includes: Determining the variance values corresponding to the fourth meteorological characteristics according to the diagonal elements in the covariance matrix; Based on each variance value, second meteorological features corresponding to a second preset number are screened out from each fourth meteorological feature in order from large to small; wherein the second preset number is smaller than the first preset number.
4. A meteorological feature extraction method for power prediction as claimed in claim 3, characterized in that: The screening rule of maximizing mutual information value and minimizing redundancy is used to extract a plurality of third meteorological features from the first meteorological factor set, including: According to the mutual information value and redundancy corresponding to each first meteorological feature, a scoring function with the goal of maximizing the mutual information value and minimizing the redundancy is constructed; The scoring function is solved based on the mRMR algorithm, and a plurality of third meteorological characteristics are output.
5. A meteorological feature extraction method for power prediction according to claim 4, characterized in that: The scoring function is solved based on the mRMR algorithm to output a plurality of third meteorological characteristics, including: With the goal of maximizing the mutual information value and minimizing the redundancy, the scoring function is solved based on the mRMR algorithm to generate a balance value corresponding to each first meteorological feature for characterizing the balance between correlation and redundancy; Based on each balance value, third meteorological features corresponding to a second preset number are screened out from each first meteorological feature in descending order.
6. A meteorological feature extraction method for power prediction according to claim 4, characterized in that: The mutual information value between each first meteorological feature and the photovoltaic output sequence is calculated according to the following formula: Among them, I(X i ,Y) is the mutual information value between the first meteorological feature and the photovoltaic output sequence, p(X i ,Y) is the joint probability distribution of the first meteorological characteristic and the photovoltaic output sequence, p(X i ) is the marginal probability distribution of the first meteorological characteristic, p(Y) is the marginal probability distribution of the photovoltaic output sequence, X i is the i-th first meteorological feature in the first meteorological factor set, and Y is the photovoltaic output sequence.
7. A meteorological feature extraction method for power prediction according to claim 1, characterized in that: Before determining whether the same meteorological feature exists in each of the meteorological features to be selected, the method further includes: Based on a permutation importance analysis method for evaluating the degree of influence of a feature on the prediction performance of a model, the first meteorological factors in the first meteorological factor set are sorted in descending order according to the degree of influence on the prediction performance, and then the fifth meteorological features corresponding to the second preset number are screened out in descending order; Inputting the first meteorological factor set and each fifth meteorological feature into a trained prediction model for photovoltaic output prediction, so that the prediction model outputs a first mean square error corresponding to the first meteorological factor set and a second mean square error corresponding to each fifth meteorological feature; The difference between each second mean square error and the first mean square error is used as the model accuracy attenuation degree value corresponding to each fifth meteorological feature; The fifth meteorological feature whose model accuracy attenuation value is greater than the preset attenuation threshold is used as the candidate meteorological feature.
8. A meteorological feature extraction device for power prediction, characterized in that: include: A covariance matrix generation module, a first meteorological feature screening module, a second meteorological feature screening module, a meteorological feature determination module, and a model input feature generation module; The covariance matrix generation module is used to generate a covariance matrix for characterizing the correlation between various meteorological characteristics according to a first meteorological factor set corresponding to a photovoltaic output sequence; wherein the first meteorological factor set includes a plurality of different first meteorological characteristics; The meteorological feature screening first module is used to screen out a plurality of second meteorological features from the covariance matrix in descending order based on the variance values of the meteorological features in the covariance matrix; The second meteorological feature screening module is used to obtain the mutual information value between each first meteorological feature and the photovoltaic output sequence, and the redundancy used to characterize the redundancy between any two first meteorological features, and extract a plurality of third meteorological features from the first meteorological factor set through a screening rule of maximizing the mutual information value and minimizing the redundancy; wherein the total number of the second meteorological features and the total number of the third meteorological features are both less than the total number of the first meteorological features; The meteorological feature determination module is used to determine whether the same meteorological feature exists in each second meteorological feature and each third meteorological feature; if so, the same meteorological feature is used as the target meteorological feature; if not, the meteorological feature to be selected is used as the target meteorological feature; The model input feature generation module is used to generate input features of a prediction model for photovoltaic output prediction according to various target meteorological features.
9. A terminal device, characterized in that: It comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, a meteorological feature extraction method for power forecasting as described in any one of claims 1 to 7 is implemented.
10. A storage medium, characterized in that: The storage medium includes a stored computer program, wherein when the computer program is executed, the device where the storage medium is located is controlled to execute a meteorological feature extraction method for power prediction as described in any one of claims 1 to 7.