A short-term power prediction method and system for renewable energy
Through multi-scale feature fusion and hybrid neural network models, combined with physical constraints and multi-objective optimization algorithms, the problems of insufficient accuracy and high computational cost of short-term power prediction of renewable energy in the existing technology are solved, and more accurate and reliable are achieved. Power prediction.
Patent Information
- Application Number
- CN202410613531.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-17
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-05-17
AI Technical Summary
The existing technology has problems of insufficient accuracy and high computational cost in short-term power prediction of renewable energy. It is difficult to effectively capture nonlinear and non-stationary characteristics, and it is difficult to adapt to variable factors.
The multi-scale feature fusion module is used to extract and fuse historical power data, meteorological data and geographical location information, combined with the hybrid neural network model and physical constraints, and is predicted through a multi-objective optimization algorithm to generate accurate short-term power prediction results.
It improves the prediction accuracy and stability of future power output of renewable energy power stations, reduces calculation costs, adapts to variable factors, and enhances the reliability of predictions.
Smart Images

Figure CN118199061B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of renewable energy management, and in particular to a short-term power prediction method and system for renewable energy. Background Art
[0002] With the intensification of the global energy crisis and the increasing prominence of environmental problems, the development and utilization of renewable energy has received more and more attention. Compared with traditional fossil energy, renewable energy has the advantages of being clean, environmentally friendly, and sustainable, and has become an important development direction in the energy field. However, the intermittent and volatile characteristics of renewable energy have brought great challenges to the operation and management of power systems. In order to ensure the stability and reliability of the power grid, it is crucial to accurately predict the short-term power output change trend of renewable energy.
[0003] Traditional renewable energy power prediction methods mainly include statistical methods and physical methods. Statistical methods, such as the autoregressive moving average model (ARMA) and support vector machine (SVM), analyze the statistical characteristics of historical power data and establish mathematical models for prediction. Physical methods, such as the numerical weather prediction (NWP) model and fluid dynamics model, simulate the power generation process based on the physical mechanism of the renewable energy power generation process, combined with meteorological conditions and geographical environment, and obtain power prediction results.
[0004] However, traditional methods have certain limitations when dealing with renewable energy power forecasting. Statistical methods are difficult to effectively capture the nonlinear and non-stationary characteristics of renewable energy power generation, and the prediction accuracy is limited; although physical methods can describe the physical mechanism of the power generation process, the modeling is complex, the calculation cost is high, and it is difficult to adapt to the variable factors in actual scenarios.
[0005] Therefore, it is urgent to further explore and improve the short-term power forecasting method of renewable energy based on deep learning, fully tap the application potential of deep learning in this field, improve the accuracy and reliability of prediction, and provide strong support for the efficient utilization of renewable energy and the stable operation of power systems. Summary of the invention
[0006] The embodiments of the present invention provide a short-term power prediction method and system for renewable energy, which can at least solve some of the problems existing in the prior art.
[0007] A first aspect of an embodiment of the present invention provides a short-term power forecasting method for renewable energy, comprising:
[0008] Acquire historical power data, meteorological data and geographic location information of the renewable energy power station, preprocess the historical power data to obtain preprocessed power data, construct a multi-scale feature fusion module to extract and fuse features of the preprocessed power data, meteorological data and geographic location information according to different time scales, and generate a fused feature vector;
[0009] The fused feature vector is input into a pre-built hybrid neural network model, wherein the hybrid neural network model is composed of a first module, a second module and a third module, wherein the first module is used to extract local features, the second module is used to model temporal dependencies, and the third module is used to determine local correlations to obtain key features. The hybrid neural network model is used to combine the current meteorological data and geographic location information to predict the hourly power output of the target renewable energy power station within the next 24 hours to obtain an initial power prediction result;
[0010] Physical constraints are introduced and the initial power prediction result is optimized in combination with a multi-objective optimization algorithm to obtain a second power prediction result. The second power prediction result is output to the power scheduling system and compared with the actual power output to calculate the prediction error. If the prediction error is less than a preset error threshold, the second power prediction result is used as a short-term power prediction result and output.
[0011] In an optional embodiment,
[0012] Obtain historical power data, meteorological data and geographic location information of a renewable energy power station, preprocess the historical power data to obtain preprocessed power data, construct a multi-scale feature fusion module to extract and fuse features of the preprocessed power data, meteorological data and geographic location information according to different time scales, and generate a fused feature vector including:
[0013] Acquire historical power data, meteorological data, and geographic location information of the renewable energy power station, preprocess the historical power data to obtain preprocessed power data, and perform feature extraction on the preprocessed power data, meteorological data, and geographic location information according to different time scales to obtain feature sets on different time scales;
[0014] For each feature set at each time scale, the Pearson correlation coefficient between each feature in the feature set and the power in the next 24 hours is calculated, and the features are sorted in descending order based on the absolute value of the Pearson correlation coefficient. At each time scale, the top five features with the largest Pearson correlation coefficient are selected to obtain a candidate feature subset;
[0015] For the candidate feature subsets and the candidate features therein at each time scale, the Gini index is calculated respectively and the reduction amount of the Gini index corresponding to each feature is used as the importance score of the current feature. The importance score of the feature in the feature subset at each time scale is mapped to the feature weight through the Softmax function to achieve adaptive adjustment;
[0016] The adjusted candidate feature subset is used as the final feature on the time scale and input into the multi-scale feature fusion module, and the features on different time scales are fused by weighted averaging to generate a fused feature vector, wherein the feature weight is used as the weight of the weighted averaging operation.
[0017] In an optional embodiment,
[0018] The reduction in the Gini index is shown in the following formula:
[0019] ;
[0020] in, △Gini im represents the reduction in the Gini index, Gini(D) Representation dataset D The Gini index, m represents the number of subsets, | D n | indicates the n Subset D n The number of samples, | D | indicates a subset D The number of samples, Gini ( D n ) subset D n The Gini index, α represents the weighting parameter.
[0021] In an optional embodiment,
[0022] The fused feature vector is input into a pre-built hybrid neural network model, which is composed of a first module, a second module and a third module, wherein the first module is used to extract local features, the second module is used to model temporal dependencies, and the third module is used to determine local correlations to obtain key features. The hybrid neural network model is used to predict the hourly power output of the target renewable energy power station within the next 24 hours in combination with the current meteorological data and geographic location information, and the initial power prediction results include:
[0023] Inputting the fused feature vector into a first module of a pre-built hybrid neural network model, wherein the first module sets a causal convolution kernel, performs causal convolution on the fused feature vector based on a causal weight matrix corresponding to the causal convolution kernel, and slides the causal convolution kernel on a sub-time series of the fused feature vector to obtain extracted local features;
[0024] The local features are input into the second module, the second module processes the local features through a gated recurrent unit, and models the temporal dependency of the local features through a simplified gating structure to obtain a temporal dependency feature;
[0025] The time-dependent features are input into the third module, and the third module uses a local attention mechanism to perform weighted processing on the time-dependent features, and by calculating the attention weights in a local range, the local correlations between the time-dependent features are captured to obtain key features;
[0026] The key features are input into a power prediction module, which uses a deep residual network as the main structure of the prediction module, introduces residual connections by setting multiple convolutional layers and shortcut connections, constructs a deep nonlinear mapping, uses historical meteorological data and geographic location information to train the deep residual network, adjusts the hyperparameters in the deep residual network, combines the current meteorological data and geographic location information, and uses the trained power prediction module to predict the hourly power output of the target renewable energy power station within the next 24 hours to obtain an initial power prediction result;
[0027] When training the hybrid neural network model, a loss function is constructed based on the difference between the predicted function and the true value of each sample at different time steps, and an adaptive learning rate optimization algorithm is used to optimize the model parameters.
[0028] In an optional embodiment,
[0029] The loss function is constructed based on the difference between the predicted function and the true value of each sample at different time steps as shown in the following formula:
[0030] ;
[0031] in, L(θ) represents the loss function value, N represents the number of samples, T represents the total number of time steps, β represents the decay rate factor, H Indicates the range of predicted values. F i,j (H) Indicates i samples at time step jThe prediction distribution function of y i,j Indicates i samples at time step j The true value of I() Represents the judgment indicator function.
[0032] In an optional embodiment,
[0033] Introducing physical constraints, optimizing the initial power prediction result in combination with a multi-objective optimization algorithm, obtaining a second power prediction result, outputting the second power prediction result to a power dispatching system, and comparing it with the actual power output, calculating a prediction error, and if the prediction error is less than a preset error threshold, using the second power prediction result as a short-term power prediction result and outputting the result including:
[0034] Based on the initial power prediction result, corresponding physical constraints are set, wherein the physical constraints include the installed capacity of the renewable energy power station, the power station type and the physical output limit, and the objective function is constructed with the goal of maximizing the prediction confidence value and maximizing the utilization rate of renewable energy. Based on the function value of the objective function, an initial fish school is generated in combination with a multi-objective optimization algorithm, wherein each individual in the initial fish school represents a solution of the objective function, and a position, speed and perception range are set for each individual in the initial fish school;
[0035] For each individual in the initial fish school, a position is randomly selected within the perception range of the current individual and the fitness value of the position and the current position is calculated. If the fitness value of the new position is greater, the fish moves to the new position. If the fitness value of the current position is greater, a position is randomly selected again until a position with a greater fitness value is found or a preset maximum number of attempts is reached, thereby obtaining a first position corresponding to the current individual.
[0036] Based on the first position, for each individual in the initial fish school, the center position of all fish within the perception range of the current individual is calculated and the fitness value of the first position and the center position is calculated; if the fitness value of the center position is larger, the current individual moves to the center position; otherwise, the fitness values corresponding to the positions of all fish within the perception range of the current individual are calculated respectively and the individual moves to the position with the highest fitness value; the update is repeated until a preset maximum number of iterations is reached to obtain an updated population;
[0037] For each individual in the update population, determining whether there is a dominance relationship, and if there is an individual that is not dominated by other individuals, outputting the current individual as the second power prediction result;
[0038] The second power prediction result is output to the power dispatching system and compared with the actual power output to calculate the prediction error. If the prediction error is less than the preset error threshold, the second power prediction result is used as the short-term power prediction result and output; otherwise, the power prediction is performed again.
[0039] In an optional embodiment,
[0040] The current individual moves to the central position as shown in the following formula:
[0041] ;
[0042] in, Indicates r The new position vector of the fish after it moves, X r Indicates r The current position vector of the fish, rand () express 0 arrive 1 A random number between X c Indicates r The center position vectors of other and within the fish's perception range, ε represents the smoothing term, iter represents the number of iterations, max iter represents the maximum number of iterations, β Indicates the rate at which the moving step size changes with the number of iterations.
[0043] A second aspect of an embodiment of the present invention provides a short-term power prediction system for renewable energy, comprising:
[0044] The first unit is used to obtain historical power data, meteorological data and geographical location information of the renewable energy power station, preprocess the historical power data to obtain preprocessed power data, and construct a multi-scale feature fusion module to extract and fuse the preprocessed power data, meteorological data and geographical location information according to different time scales to generate a fusion feature vector;
[0045] The second unit is used to input the fused feature vector into a pre-built hybrid neural network model, wherein the hybrid neural network model is composed of a first module, a second module and a third module, wherein the first module is used to extract local features, the second module is used to model temporal dependencies, and the third module is used to determine local correlations to obtain key features. The hybrid neural network model is used to combine the current meteorological data and geographic location information to predict the hourly power output of the target renewable energy power station within the next 24 hours to obtain an initial power prediction result;
[0046] The third unit is used to introduce physical constraints, optimize the initial power prediction result in combination with a multi-objective optimization algorithm, obtain a second power prediction result, output the second power prediction result to the power scheduling system, and compare it with the actual power output to calculate the prediction error. If the prediction error is less than a preset error threshold, the second power prediction result is used as a short-term power prediction result and output.
[0047] According to a third aspect of the embodiments of the present invention,
[0048] An electronic device is provided, comprising:
[0049] processor;
[0050] a memory for storing processor-executable instructions;
[0051] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0052] A fourth aspect of the embodiments of the present invention is:
[0053] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.
[0054] In the present invention, a multi-scale feature fusion module is used to extract and fuse the preprocessed power data, meteorological data and geographic location information according to different time scales. The generated fused feature vector can make full use of the information of multi-source data, improve the expression ability and accuracy of the prediction model, and introduce physical constraints to ensure that the prediction results meet the actual physical limitations. The hybrid neural network model can fully explore the correlation and timing characteristics between the data, thereby improving the accuracy and stability of the prediction. The multi-objective optimization algorithm further improves the accuracy and reliability of the prediction while ensuring feasibility. In summary, the present invention realizes the accurate prediction of the future power output of renewable energy power stations by integrating multiple technical means. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 A schematic diagram of a process flow of a short-term power prediction method for renewable energy according to an embodiment of the present invention;
[0056] Figure 2 The present invention is a schematic diagram of the structure of a short-term power prediction system for renewable energy. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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.
[0058] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0059] Figure 1 FIG. 1 is a flow chart of a method for short-term power prediction of renewable energy according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0060] S1. Obtain historical power data, meteorological data and geographic location information of renewable energy power stations, preprocess the historical power data to obtain preprocessed power data, construct a multi-scale feature fusion module to extract and fuse the preprocessed power data, meteorological data and geographic location information according to different time scales, and generate a fusion feature vector;
[0061] The multi-scale feature fusion module is a technology for processing image, video or time series data. Its main purpose is to integrate feature information from different scales to improve the performance and effect of the model. The time scale is a key concept in the multi-scale feature fusion module, which is used to provide a scale standard for describing the dynamic information of the feature.
[0062] In an optional embodiment,
[0063] Obtain historical power data, meteorological data and geographic location information of a renewable energy power station, preprocess the historical power data to obtain preprocessed power data, construct a multi-scale feature fusion module to extract and fuse features of the preprocessed power data, meteorological data and geographic location information according to different time scales, and generate a fused feature vector including:
[0064] Acquire historical power data, meteorological data, and geographic location information of the renewable energy power station, preprocess the historical power data to obtain preprocessed power data, and perform feature extraction on the preprocessed power data, meteorological data, and geographic location information according to different time scales to obtain feature sets on different time scales;
[0065] For each feature set at each time scale, the Pearson correlation coefficient between each feature in the feature set and the power in the next 24 hours is calculated, and the features are sorted in descending order based on the absolute value of the Pearson correlation coefficient. At each time scale, the top five features with the largest Pearson correlation coefficient are selected to obtain a candidate feature subset;
[0066] For the candidate feature subsets and the candidate features therein at each time scale, the Gini index is calculated respectively and the reduction amount of the Gini index corresponding to each feature is used as the importance score of the current feature. The importance score of the feature in the feature subset at each time scale is mapped to the feature weight through the Softmax function to achieve adaptive adjustment;
[0067] The adjusted candidate feature subset is used as the final feature on the time scale and input into the multi-scale feature fusion module, and the features on different time scales are fused by weighted averaging to generate a fused feature vector, wherein the feature weight is used as the weight of the weighted averaging operation.
[0068] The Pearson correlation coefficient is a statistic used to measure the strength and direction of the linear relationship between two variables. The Gini index is a statistic used to measure the degree of unequal distribution. The Softmax function is a normalization function, which is usually used in the output layer of multi-classification problems. The importance score usually refers to the score used in machine learning models to evaluate the importance of features for model prediction.
[0069] Obtain historical power data, meteorological data and geographic location information of renewable energy power stations, wherein the historical power data usually includes power values per hour or per minute, the meteorological data includes information such as temperature, wind speed, humidity, etc., usually with an hourly time interval, and the geographic location information includes longitude and latitude or regional information, and use interpolation to process missing values and outliers for the historical power data, and extract features from the pre-processed power data, meteorological data and geographic location information according to different time scales. For example, the time scale can select different intervals, such as per hour or per day. For power data, statistical features such as mean, standard deviation, etc. can be extracted, and for meteorological data, the same statistical features can be extracted. For geographic location information, regional features such as city, province, etc. can be extracted;
[0070] For each feature set at each time scale, the Pearson correlation coefficient between each feature and the power of the next 24 hours is calculated. For example, by sliding the window, each time a time step is moved forward, and the correlation coefficient between the current time step and the power of the next 24 hours is calculated. At each time scale, the features are sorted in descending order according to the absolute value of the Pearson correlation coefficient, and the top 5 features with the largest absolute value of the Pearson correlation coefficient are selected as the candidate feature subset;
[0071] For each candidate feature subset at each time scale, the Gini index corresponding to each feature is calculated, and the reduction amount of the Gini index corresponding to each feature is used as the importance score of the current feature. For the importance score of the feature in the feature subset at each time scale, the Softmax function is used to map it to the feature weight;
[0072] The adjusted candidate feature subset is used as the final feature on this time scale and input into the multi-scale feature fusion module. The features on different time scales are fused by weighted averaging to generate a fused feature vector.
[0073] In this embodiment, feature selection through the Pearson correlation coefficient can help filter out features that are irrelevant to the target or redundant, improve the performance and generalization ability of the model, and adaptively adjust the feature weights to more effectively utilize the information of each feature, thereby increasing the model's attention to different features. The feature weights are used as weights for weighted averaging operations to ensure that the contributions of different time scales and different features are reasonably considered. In summary, this embodiment effectively integrates information at different time scales through multi-scale feature fusion, thereby improving the accuracy and stability of the model for future power prediction of renewable energy power stations.
[0074] In an optional embodiment,
[0075] The reduction in the Gini index is shown in the following formula:
[0076] ;
[0077] in, △Gini im represents the reduction in the Gini index, Gini(D) Representation dataset D The Gini index, m represents the number of subsets, | D n | indicates the n Subset D n The number of samples, | D | indicates a subset D The number of samples, Gini ( D n ) subset D n The Gini index, α represents the weighting parameter.
[0078] In this function, by calculating the reduction in the Gini index, we can quantify the degree to which each feature reduces the impurity when dividing the data set, which helps to determine which features are more suitable for dividing the data set. By adjusting the weighting parameters, the algorithm can better balance the impact of the number of samples on the results when considering feature partitioning, thereby enhancing the robustness and generalization ability of the model. In summary, this function provides an effective method to evaluate the importance of features and provides strong support for feature selection and model building.
[0079] S2. Input the fused feature vector into a pre-built hybrid neural network model, the hybrid neural network model consists of a first module, a second module and a third module, wherein the first module is used to extract local features, the second module is used to model temporal dependencies, and the third module is used to determine local correlations to obtain key features. The hybrid neural network model is used to combine the current meteorological data and geographic location information to predict the hourly power output of the target renewable energy power station within the next 24 hours to obtain an initial power prediction result;
[0080] The hybrid neural network model is a model that combines multiple neural network structures, aiming to overcome the limitations of a single neural network model and give full play to the advantages of different model structures. The local features refer to the features of certain local areas or subsets in the data. The temporal dependency refers to the time series information in the data, including the temporal order relationship between data points and the dependency relationship between adjacent data points. The local correlation describes the correlation or degree of association between local areas or subsets in the data. The key features refer to features that have an important impact on the task objectives.
[0081] In an optional embodiment,
[0082] The fused feature vector is input into a pre-built hybrid neural network model, which is composed of a first module, a second module and a third module, wherein the first module is used to extract local features, the second module is used to model temporal dependencies, and the third module is used to determine local correlations to obtain key features. The hybrid neural network model is used to predict the hourly power output of the target renewable energy power station within the next 24 hours in combination with the current meteorological data and geographic location information, and the initial power prediction results include:
[0083] Inputting the fused feature vector into a first module of a pre-built hybrid neural network model, wherein the first module sets a causal convolution kernel, performs causal convolution on the fused feature vector based on a causal weight matrix corresponding to the causal convolution kernel, and slides the causal convolution kernel on a sub-time series of the fused feature vector to obtain extracted local features;
[0084] The local features are input into the second module, the second module processes the local features through a gated recurrent unit, and models the temporal dependency of the local features through a simplified gating structure to obtain a temporal dependency feature;
[0085] The time-dependent features are input into the third module, and the third module uses a local attention mechanism to perform weighted processing on the time-dependent features, and by calculating the attention weights in a local range, the local correlations between the time-dependent features are captured to obtain key features;
[0086] The key features are input into a power prediction module, which uses a deep residual network as the main structure of the prediction module, introduces residual connections by setting multiple convolutional layers and shortcut connections, constructs a deep nonlinear mapping, uses historical meteorological data and geographic location information to train the deep residual network, adjusts the hyperparameters in the deep residual network, combines the current meteorological data and geographic location information, and uses the trained power prediction module to predict the hourly power output of the target renewable energy power station within the next 24 hours to obtain an initial power prediction result;
[0087] When training the hybrid neural network model, a loss function is constructed based on the difference between the predicted function and the true value of each sample at different time steps, and an adaptive learning rate optimization algorithm is used to optimize the model parameters.
[0088] The causal convolution kernel is a convolution kernel used to process time series data in a convolutional neural network. The causal weight matrix is a weight matrix used to process time series data in a neural network. Unlike an ordinary weight matrix, the causal weight matrix only allows information to propagate forward in time. The causal convolution is a convolution operation used to process time series data in a convolutional neural network. It only allows information to propagate forward in time, which can effectively capture the causal relationship in the time series data and improve the performance and generalization ability of the model. The gating structure is a structure commonly used in neural networks to control the flow and propagation of information. The local attention mechanism is a structure commonly used in attention mechanisms to strengthen the focus on local information in neural networks. The deep residual network is a deep neural network structure that solves the gradient vanishing and gradient exploding problems in the deep neural network training process through residual connections.
[0089] The fused feature vector is input into the first module of the hybrid neural network model, a causal convolution kernel is set in the first module by defining a convolution layer, a causal convolution operation is performed on the fused feature vector based on a causal weight matrix corresponding to the causal convolution kernel, and in the causal convolution operation, a sub-time series of the fused feature vector is used as input, and the causal convolution kernel is slid to extract local features;
[0090] The extracted local features are input into the second module of the hybrid neural network model. The second module uses a gated recurrent unit (such as GRU) to process the local features. The gated recurrent unit includes an update gate, a reset gate, and a candidate hidden state. These gates control the flow and propagation of information. The update gate determines how the current information should be integrated into the hidden state, and the reset gate determines how the past information should be forgotten or retained. The temporal dependency is captured. The temporal dependency of the local features is modeled through a simplified gating structure, thereby obtaining the temporal dependency feature.
[0091] The extracted time-dependent features are input into the third module of the hybrid neural network model, and the third module uses a local attention mechanism to perform weighted processing on the time-dependent features to obtain weighted key features, wherein the key features include local correlations between the time-dependent features;
[0092] The key features obtained are input into the power prediction module. The power prediction module uses a deep residual network as the main structure to predict the hourly power output of the target renewable energy power station in the next 24 hours. The deep residual network is trained using historical meteorological data and geographic location information, and the hyperparameters in the deep residual network are adjusted to optimize the performance and generalization ability of the model. Combined with the current meteorological data and geographic location information, the trained power prediction module is used to predict the hourly power output of the target renewable energy power station in the next 24 hours to obtain the initial power prediction result.
[0093] In this embodiment, the operation of the three modules can effectively extract, learn and express key features from the original data, providing a more effective feature representation for subsequent power prediction tasks. By training historical meteorological data and geographic location information, the hyperparameters in the deep residual network are adjusted so that the model can better adapt to task requirements. When training the hybrid neural network model, constructing a loss function based on the difference between the prediction function and the true value of each sample at different time steps helps to improve the prediction accuracy and stability of the model. In summary, this embodiment effectively captures the key features and time series dependencies in the data, and provides a reliable model foundation and prediction capability for renewable energy power station power prediction tasks.
[0094] In an optional embodiment,
[0095] The loss function is constructed based on the difference between the predicted function and the true value of each sample at different time steps as shown in the following formula:
[0096] ;
[0097] in, L(θ) represents the loss function value, Nrepresents the number of samples, T represents the total number of time steps, β represents the decay rate factor, H Indicates the range of predicted values. F i,j (H) Indicates i samples at time step j The prediction distribution function of y i,j Indicates i samples at time step j The true value of I() Represents the judgment indicator function.
[0098] In this embodiment, by accumulating and summing the difference between the prediction function and the true value of each sample at different time steps, the prediction accuracy at different time steps in the time series data is taken into account, so that the loss function can better reflect the performance of the model in the entire time series, and use an exponential decay function to weight the difference between the predicted value and the true value of the sample, so that it is more sensitive to samples with larger prediction errors, while retaining the penalty for samples with smaller prediction errors. The introduction of the prediction distribution function allows the model to predict uncertainty while also considering the distribution of the predicted value in the entire value range. The introduction of the judgment indicator function can effectively constrain the predicted value within a certain range, avoiding the situation where the predicted value deviates from the actual value, thereby making the loss function more reasonable. In summary, this embodiment enables the loss function to better reflect the performance of the model in the entire time series and has good generalization performance.
[0099] S3. Introduce physical constraints, and optimize the initial power prediction result in combination with a multi-objective optimization algorithm to obtain a second power prediction result. Output the second power prediction result to the power scheduling system, and compare it with the actual power output to calculate the prediction error. If the prediction error is less than a preset error threshold, the second power prediction result is used as a short-term power prediction result and output.
[0100] The multi-objective optimization algorithm is generally used to solve optimization problems that consider multiple objectives simultaneously. The power dispatching system refers to the dynamic dispatching of various generators, energy storage devices and loads in the power generation system to meet the needs of the power system and optimize the operation. The error threshold is used to measure whether the error or deviation of the system has reached an acceptable range.
[0101] In an optional embodiment,
[0102] Introducing physical constraints, optimizing the initial power prediction result in combination with a multi-objective optimization algorithm, obtaining a second power prediction result, outputting the second power prediction result to a power dispatching system, and comparing it with the actual power output, calculating a prediction error, and if the prediction error is less than a preset error threshold, using the second power prediction result as a short-term power prediction result and outputting the result including:
[0103] Based on the initial power prediction result, corresponding physical constraints are set, wherein the physical constraints include the installed capacity of the renewable energy power station, the power station type and the physical output limit, and the objective function is constructed with the goal of maximizing the prediction confidence value and maximizing the utilization rate of renewable energy. Based on the function value of the objective function, an initial fish school is generated in combination with a multi-objective optimization algorithm, wherein each individual in the initial fish school represents a solution of the objective function, and a position, speed and perception range are set for each individual in the initial fish school;
[0104] For each individual in the initial fish school, a position is randomly selected within the perception range of the current individual and the fitness value of the position and the current position is calculated. If the fitness value of the new position is greater, the fish moves to the new position. If the fitness value of the current position is greater, a position is randomly selected again until a position with a greater fitness value is found or a preset maximum number of attempts is reached, thereby obtaining a first position corresponding to the current individual.
[0105] Based on the first position, for each individual in the initial fish school, the center position of all fish within the perception range of the current individual is calculated and the fitness value of the first position and the center position is calculated; if the fitness value of the center position is larger, the current individual moves to the center position; otherwise, the fitness values corresponding to the positions of all fish within the perception range of the current individual are calculated respectively and the individual moves to the position with the highest fitness value; the update is repeated until a preset maximum number of iterations is reached to obtain an updated population;
[0106] For each individual in the update population, determining whether there is a dominance relationship, and if there is an individual that is not dominated by other individuals, outputting the current individual as the second power prediction result;
[0107] The second power prediction result is output to the power dispatching system and compared with the actual power output to calculate the prediction error. If the prediction error is less than the preset error threshold, the second power prediction result is used as the short-term power prediction result and output; otherwise, the power prediction is performed again.
[0108] The prediction confidence value represents the confidence level of the model's prediction for a given data point, usually presented in the form of a probability or confidence interval. The perception range represents the range that can be detected or perceived. The dominance relationship represents a statistical relationship between variables, where changes in one variable significantly affect another variable, which can be represented as the other variable being dominated by the current variable.
[0109] Collect historical power data, weather data, equipment parameters, etc. of renewable energy power stations, set physical constraints according to the actual situation of renewable energy power stations, including installed capacity, power station type (such as wind power, photovoltaic), physical output limit (such as wind speed, irradiance), etc., convert the constraints into mathematical forms, such as inequalities or equations, determine the optimization objectives, that is, maximize the prediction confidence value and maximize the utilization rate of renewable energy, convert the optimization objectives into mathematical forms, construct the objective function, the independent variable of the objective function is the output scheduling plan of the renewable energy power station, select the appropriate multi-objective optimization algorithm, generate the initial fish school according to the objective function and constraints, each individual in the initial fish school represents a feasible solution to the objective function, that is, a possible output scheduling plan, and randomly set the position, speed and perception range for each individual in the initial fish school;
[0110] For each individual in the initial fish school, a new position is randomly selected within the perception range of the current individual, and the fitness values of the new position and the current position are calculated, that is, the objective function value. If the fitness value of the new position is greater, the individual is moved to the new position. If the fitness value of the current position is greater, a new position is randomly selected again, and the above process is repeated until a new position with a greater fitness value is found, or the preset maximum number of attempts is reached, and the corresponding first position is obtained;
[0111] Based on the first position, for each individual in the initial fish school, the center position of all fish within the perception range of the current individual is calculated, and the fitness value of the first position and the center position is calculated. If the fitness value of the center position is greater, the individual is moved to the center position. If the fitness value of the first position is greater, the fitness value corresponding to the position of all fish within the perception range of the current individual is calculated, and the position with the highest fitness value is found. The individual is moved to the position with the highest fitness value, and the above process is repeated until the preset maximum number of iterations is reached;
[0112] For each individual in the updated population, calculate the dominance relationship between the current individual and other individuals in the population. If the current individual is not dominated by any other individual, add it to the non-dominated solution set and output the individuals in the non-dominated solution set as the second power prediction result;
[0113] The second power prediction result is output to the power dispatching system. In actual operation, the actual power output of the renewable energy power station is recorded, the second power prediction result is compared with the actual power output, and the prediction error is calculated. If the prediction error is less than the preset error threshold, the second power prediction result is used as the final short-term power prediction result, and the short-term power prediction result is output and applied to power grid dispatching, power trading and other links. If the prediction error is greater than or equal to the preset error threshold, the cause of the prediction error is analyzed, such as model parameters, data quality, and external factors. According to the analysis results, the power prediction model, constraints, optimization algorithm, etc. are appropriately adjusted and a new power prediction result is calculated.
[0114] In this embodiment, the installed capacity, power station type and physical output limit of the renewable energy power station are set to ensure the feasibility and practicality of the solution. By iteratively updating the fish school, each individual moves to a better position, thereby continuously improving the quality of the solution, helping to gradually converge to the vicinity of the optimal solution, and improving the quality and efficiency of the solution. By comparing the dominance relationship between individuals in the updated population, a solution that is not dominated by other individuals is found as the final second power prediction result to ensure that the obtained solution is optimal under multiple objectives. In summary, this embodiment generates high-quality feasible solutions through the reasonable setting of multi-objective optimization algorithms and physical constraints, and ensures the accuracy and reliability of the prediction results through verification, thereby improving the operating efficiency and sustainable development capabilities of renewable energy power stations.
[0115] In an optional embodiment,
[0116] The current individual moves to the central position as shown in the following formula:
[0117] ;
[0118] in, Indicates r The new position vector of the fish after it moves, X r Indicates r The current position vector of the fish, rand () express 0 arrive 1 A random number between X c Indicates r The center position vectors of other and within the fish's perception range, ε represents the smoothing term, iter represents the number of iterations, max iter represents the maximum number of iterations, β Indicates the rate at which the moving step size changes with the number of iterations.
[0119] In this embodiment, by introducing random numbers, the diversity of the search is increased to a certain extent, which helps to avoid falling into the local optimal solution, thereby enhancing the global search ability of the algorithm. The moving step size decreases as the number of iterations increases, which helps to promote global search with a larger step size in the early stage of iteration, and reduces the step size in the later stage of iteration to improve accuracy, thereby more effectively converging to the optimal solution. In summary, this embodiment can effectively guide the current individual to move to a better position through reasonable update rules, introduction of randomness, and step size control, thereby helping the algorithm to converge to the global optimal solution faster, which helps to improve the optimization effect and the convergence speed of the algorithm.
[0120] Figure 2 Schematic diagram of the structure of the system of the embodiment of the present invention, as shown in Figure 2 As shown, the system comprises:
[0121] The first unit is used to obtain historical power data, meteorological data and geographical location information of the renewable energy power station, preprocess the historical power data to obtain preprocessed power data, and construct a multi-scale feature fusion module to extract and fuse the preprocessed power data, meteorological data and geographical location information according to different time scales to generate a fusion feature vector;
[0122] The second unit is used to input the fused feature vector into a pre-built hybrid neural network model, wherein the hybrid neural network model is composed of a first module, a second module and a third module, wherein the first module is used to extract local features, the second module is used to model temporal dependencies, and the third module is used to determine local correlations to obtain key features. The hybrid neural network model is used to combine the current meteorological data and geographic location information to predict the hourly power output of the target renewable energy power station within the next 24 hours to obtain an initial power prediction result;
[0123] The third unit is used to introduce physical constraints, optimize the initial power prediction result in combination with a multi-objective optimization algorithm, obtain a second power prediction result, output the second power prediction result to the power scheduling system, and compare it with the actual power output to calculate the prediction error. If the prediction error is less than a preset error threshold, the second power prediction result is used as a short-term power prediction result and output.
[0124] According to a third aspect of the embodiments of the present invention,
[0125] An electronic device is provided, comprising:
[0126] processor;
[0127] a memory for storing processor-executable instructions;
[0128] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0129] A fourth aspect of the embodiments of the present invention is:
[0130] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.
[0131] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.
[0132] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A short-term power forecasting method for renewable energy, characterized in that: include: Acquire historical power data, meteorological data and geographic location information of the renewable energy power station, preprocess the historical power data to obtain preprocessed power data, construct a multi-scale feature fusion module to extract and fuse features of the preprocessed power data, meteorological data and geographic location information according to different time scales, and generate a fused feature vector; The fused feature vector is input into a pre-built hybrid neural network model, wherein the hybrid neural network model is composed of a first module, a second module and a third module, wherein the first module is used to extract local features, the second module is used to model temporal dependencies, and the third module is used to determine local correlations to obtain key features. The hybrid neural network model is used to combine the current meteorological data and geographic location information to predict the hourly power output of the target renewable energy power station within the next 24 hours to obtain an initial power prediction result; Introducing physical constraints, optimizing the initial power prediction result in combination with a multi-objective optimization algorithm to obtain a second power prediction result, outputting the second power prediction result to a power dispatching system, and comparing the second power prediction result with the actual power output to calculate a prediction error. If the prediction error is less than a preset error threshold, the second power prediction result is used as a short-term power prediction result and outputted; Introducing physical constraints, optimizing the initial power prediction result in combination with a multi-objective optimization algorithm, obtaining a second power prediction result, outputting the second power prediction result to a power dispatching system, and comparing it with the actual power output, calculating a prediction error, and if the prediction error is less than a preset error threshold, using the second power prediction result as a short-term power prediction result and outputting the result including: Based on the initial power prediction result, corresponding physical constraints are set, wherein the physical constraints include the installed capacity of the renewable energy power station, the power station type and the physical output limit, and the objective function is constructed with the goal of maximizing the prediction confidence value and maximizing the utilization rate of renewable energy. Based on the function value of the objective function, an initial fish school is generated in combination with a multi-objective optimization algorithm, wherein each individual in the initial fish school represents a solution of the objective function, and a position, speed and perception range are set for each individual in the initial fish school; For each individual in the initial fish school, a position is randomly selected within the perception range of the current individual and the fitness value of the position and the current position is calculated. If the fitness value of the new position is greater, the fish moves to the new position. If the fitness value of the current position is greater, a position is randomly selected again until a position with a greater fitness value is found or a preset maximum number of attempts is reached, thereby obtaining a first position corresponding to the current individual. Based on the first position, for each individual in the initial fish school, the center position of all fish within the perception range of the current individual is calculated and the fitness value of the first position and the center position is calculated; if the fitness value of the center position is larger, the current individual moves to the center position; otherwise, the fitness values corresponding to the positions of all fish within the perception range of the current individual are calculated respectively and the individual moves to the position with the highest fitness value; the update is repeated until a preset maximum number of iterations is reached to obtain an updated population; For each individual in the update population, determining whether there is a dominance relationship, and if there is an individual that is not dominated by other individuals, outputting the current individual as the second power prediction result; Outputting the second power prediction result to the power dispatching system, and comparing it with the actual power output, calculating the prediction error, and if the prediction error is less than a preset error threshold, outputting the second power prediction result as a short-term power prediction result, otherwise, re-performing the power prediction; The current individual moves to the central position as shown in the following formula: ; in, Indicates r The new position vector of the fish after it moves, X r Indicates r The current position vector of the fish, rand() express 0 arrive 1 A random number between X c Indicates r The center position vectors of other and within the fish's perception range, ε represents the smoothing term, iter represents the number of iterations, max iter represents the maximum number of iterations, β Indicates the rate at which the moving step size changes with the number of iterations.
2. The method according to claim 1, characterized in that Obtain historical power data, meteorological data and geographic location information of a renewable energy power station, preprocess the historical power data to obtain preprocessed power data, construct a multi-scale feature fusion module to extract and fuse features of the preprocessed power data, meteorological data and geographic location information according to different time scales, and generate a fused feature vector including: Acquire historical power data, meteorological data, and geographic location information of the renewable energy power station, preprocess the historical power data to obtain preprocessed power data, and perform feature extraction on the preprocessed power data, meteorological data, and geographic location information according to different time scales to obtain feature sets on different time scales; For each feature set at each time scale, the Pearson correlation coefficient between each feature in the feature set and the power in the next 24 hours is calculated, and the features are sorted in descending order based on the absolute value of the Pearson correlation coefficient. At each time scale, the top five features with the largest Pearson correlation coefficient are selected to obtain a candidate feature subset; For the candidate feature subsets and the candidate features therein at each time scale, the Gini index is calculated respectively and the reduction amount of the Gini index corresponding to each feature is used as the importance score of the current feature. The importance score of the feature in the feature subset at each time scale is mapped to the feature weight through the Softmax function to achieve adaptive adjustment; The adjusted candidate feature subset is used as the final feature on the time scale and input into the multi-scale feature fusion module, and the features on different time scales are fused by weighted averaging to generate a fused feature vector, wherein the feature weight is used as the weight of the weighted averaging operation.
3. The method according to claim 2, characterized in that The reduction in the Gini index is shown in the following formula: ; in, △Gini im represents the reduction in the Gini index, Gini(D) Representation dataset D The Gini index, m represents the number of subsets, | D n | indicates the n Subset D n The number of samples, | D | indicates a subset D The number of samples, Gini ( D n ) subset D n The Gini index, α represents the weighting parameter.
4. The method according to claim 1, characterized in that: The fused feature vector is input into a pre-built hybrid neural network model, which is composed of a first module, a second module and a third module, wherein the first module is used to extract local features, the second module is used to model temporal dependencies, and the third module is used to determine local correlations to obtain key features. The hybrid neural network model is used to predict the hourly power output of the target renewable energy power station within the next 24 hours in combination with the current meteorological data and geographic location information, and the initial power prediction results include: Inputting the fused feature vector into a first module of a pre-built hybrid neural network model, wherein the first module sets a causal convolution kernel, performs causal convolution on the fused feature vector based on a causal weight matrix corresponding to the causal convolution kernel, and slides the causal convolution kernel on a sub-time series of the fused feature vector to obtain extracted local features; The local features are input into the second module, the second module processes the local features through a gated recurrent unit, and models the temporal dependency of the local features through a simplified gating structure to obtain a temporal dependency feature; The time-dependent features are input into the third module, and the third module uses a local attention mechanism to perform weighted processing on the time-dependent features, and by calculating the attention weights in a local range, the local correlations between the time-dependent features are captured to obtain key features; The key features are input into a power prediction module, which uses a deep residual network as the main structure of the prediction module, introduces residual connections by setting multiple convolutional layers and shortcut connections, constructs a deep nonlinear mapping, uses historical meteorological data and geographic location information to train the deep residual network, adjusts the hyperparameters in the deep residual network, combines the current meteorological data and geographic location information, and uses the trained power prediction module to predict the hourly power output of the target renewable energy power station within the next 24 hours to obtain an initial power prediction result; When training the hybrid neural network model, a loss function is constructed based on the difference between the predicted function and the true value of each sample at different time steps, and an adaptive learning rate optimization algorithm is used to optimize the model parameters.
5. The method according to claim 4, characterized in that The loss function is constructed based on the difference between the predicted function and the true value of each sample at different time steps as shown in the following formula: ; in, L(θ) represents the loss function value, N represents the number of samples, T represents the total number of time steps, β represents the decay rate factor, H Indicates the range of predicted values. F i,j (H) Indicates i samples at time step j The prediction distribution function of y i,j Indicates i samples at time step j The true value of I() Represents the judgment indicator function.
6. A short-term power prediction system for renewable energy, used to implement the method according to any one of claims 1 to 5, characterized in that: include: The first unit is used to obtain historical power data, meteorological data and geographical location information of the renewable energy power station, preprocess the historical power data to obtain preprocessed power data, and construct a multi-scale feature fusion module to extract and fuse the preprocessed power data, meteorological data and geographical location information according to different time scales to generate a fusion feature vector; The second unit is used to input the fused feature vector into a pre-built hybrid neural network model, wherein the hybrid neural network model is composed of a first module, a second module and a third module, wherein the first module is used to extract local features, the second module is used to model temporal dependencies, and the third module is used to determine local correlations to obtain key features. The hybrid neural network model is used to combine the current meteorological data and geographic location information to predict the hourly power output of the target renewable energy power station within the next 24 hours to obtain an initial power prediction result; The third unit is used to introduce physical constraints, optimize the initial power prediction result in combination with a multi-objective optimization algorithm, obtain a second power prediction result, output the second power prediction result to the power scheduling system, and compare it with the actual power output to calculate the prediction error. If the prediction error is less than a preset error threshold, the second power prediction result is used as a short-term power prediction result and output.
7. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method described in any one of claims 1 to 5.
8. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 5 is implemented.
