Power prediction precision improvement method and system for wind and light station
Through deep learning prediction model and multi-source data fusion technology, combined with attention mechanism and error compensation model, the problem of limited power prediction accuracy in the wind and light stations is solved, especially in extreme weather conditions, the prediction accuracy is significantly improved.
Patent Information
- Application Number
- CN202411706778.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-04-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The power prediction methods of existing wind and light stations fail to fully consider the operating status of equipment, environmental factors and station characteristics, resulting in limited prediction accuracy, especially in extreme weather conditions, the prediction error is significantly increased.
Through the data preprocessing module, historical power data, meteorological data and equipment operation data are obtained, timing decomposition, spatial interpolation and outlier detection are performed, and deep learning prediction models are constructed after fusing feature data, including convolutional neural networks and long-term memory networks, an attention mechanism is introduced, and correction and compensation are made based on real-time meteorological conditions and historical prediction errors.
The accuracy of the power prediction of the wind and light station is improved, especially in extreme weather conditions, the robustness and stability of the model are enhanced, and adaptive error compensation and accuracy improvement are achieved.
Smart Images

Figure CN119807609A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to new energy power generation technology, and in particular to a method and system for improving power prediction accuracy for wind and solar power stations. Background Art
[0002] The existing power prediction methods for wind and solar power stations are mainly based on single meteorological data or historical power data modeling, which does not fully consider the comprehensive impact of equipment operating status, environmental factors and station characteristics on power generation. Due to the lack of deep fusion and feature mining of multi-source data, the prediction model is difficult to accurately describe the power change law in complex scenarios, resulting in limited prediction accuracy.
[0003] Traditional prediction models perform particularly poorly under extreme weather conditions. When encountering extreme weather such as sandstorms, severe convective weather, typhoons and icing, the operating characteristics of power generation equipment will change significantly, and existing models are difficult to accurately capture the power change characteristics under these abnormal conditions, resulting in a significant increase in prediction errors.
[0004] In addition, there is a general phenomenon of short-term fluctuations in the power generation of wind and solar power stations, which is highly random and uncertain. The existing prediction models are not adaptable enough to short-term power fluctuations, and it is difficult to track and predict the dynamic changes of power in real time, resulting in a large deviation between the prediction results and the actual power. Especially in cases of drastic changes in weather or sudden changes in load, the prediction error will be further amplified. In terms of prediction error compensation, existing methods mostly use fixed compensation strategies and lack adaptive adjustment capabilities. The prediction errors in different time periods and weather conditions have different statistical characteristics and change patterns, and the static compensation method cannot dynamically optimize the compensation strategy according to the actual scenario, which affects the continuous improvement of prediction accuracy. At the same time, the cumulative effect of prediction errors has not been effectively dealt with. Summary of the invention
[0005] The embodiments of the present invention provide a method and system for improving the power prediction accuracy for wind and solar power stations, which can solve the problems in the prior art.
[0006] According to a first aspect of the embodiments of the present invention,
[0007] Provides methods for improving the power prediction accuracy of wind and solar power stations, including:
[0008] The historical power data, meteorological data and equipment operation data of the wind and solar power stations are obtained through the data preprocessing module, the historical power data is time-series decomposed to obtain multiple frequency components, the meteorological data is spatially interpolated to obtain continuous meteorological features, the equipment operation data is detected and corrected for abnormal values to obtain equipment features, and the multiple frequency components, continuous meteorological features and equipment features are feature-fused to obtain fused feature data;
[0009] A deep learning prediction model is constructed based on the fused feature data, wherein the deep learning prediction model includes a feature extraction layer and a prediction layer, wherein the feature extraction layer uses a convolutional neural network to extract spatial features of the fused feature data, and the prediction layer uses a long short-term memory network to process the spatial features to obtain an initial prediction result; an attention mechanism is introduced to perform weight assignment on the spatial features to obtain weighted features, and the weighted features are combined with the initial prediction results to obtain power prediction data;
[0010] The weather type is determined according to the real-time meteorological conditions of the wind and solar power stations. When extreme weather is identified, the power forecast data is corrected using a correction model that matches the extreme weather to obtain corrected power forecast data. An error compensation model is constructed based on historical prediction errors, and the corrected power forecast data is input into the error compensation model to obtain an error compensation value. A final power forecast result is obtained according to the corrected power forecast data and the error compensation value. The final power forecast result is compared with the actual power data to obtain an error correction amount, and the error correction amount is used to update the compensation parameters of the error compensation model.
[0011] In an optional embodiment,
[0012] A deep learning prediction model is constructed based on the fused feature data, the deep learning prediction model includes a feature extraction layer and a prediction layer, wherein the feature extraction layer uses a convolutional neural network to extract the spatial features of the fused feature data, and the prediction layer uses a long short-term memory network to process the spatial features to obtain an initial prediction result; an attention mechanism is introduced to perform weight assignment on the spatial features to obtain weighted features, and the weighted features are combined with the initial prediction results to obtain power prediction data, the steps include:
[0013] Constructing a two-layer cascaded deep learning prediction model, wherein the deep learning prediction model includes a feature extraction layer and a prediction layer, and a feature transmission channel is set between the feature extraction layer and the prediction layer;
[0014] The feature extraction layer adopts a convolutional neural network structure, including a multi-scale convolution module and a dilated convolution module. The multi-scale convolution module sets a plurality of convolution kernels of different scales to extract the spatial features of the fused feature data. The dilated convolution module uses convolution layers with different dilation rates to construct a feature pyramid structure, and extracts long-range dependency features based on the feature pyramid structure.
[0015] The prediction layer adopts a bidirectional long short-term memory network, including a forward network unit and a backward network unit, wherein the forward network unit and the backward network unit both include a forget gate, an input gate, and an output gate, and the spatial features and the long-range dependency features are processed based on the forget gate, the input gate, and the output gate to obtain an initial prediction result;
[0016] Constructing a multi-head self-attention mechanism, mapping the spatial features and the long-range dependency features into a query vector, a key vector and a value vector, calculating an attention weight based on the query vector and the key vector, combining the attention weight with the value vector to obtain a weighted feature; splicing multiple groups of the weighted features to obtain an attention output feature;
[0017] The initial prediction result is adaptively fused with the attention output feature to obtain a fused prediction result, and the fused prediction result is mapped through a fully connected layer to obtain power prediction data.
[0018] In an optional embodiment,
[0019] Constructing a multi-head self-attention mechanism, mapping the spatial features and the long-range dependency features into a query vector, a key vector and a value vector, calculating an attention weight based on the query vector and the key vector, and combining the attention weight with the value vector to obtain a weighted feature; the step of concatenating multiple groups of the weighted features to obtain an attention output feature includes:
[0020] Construct multiple parallel attention heads, where each attention head performs three-way linear mapping on spatial features and long-range dependency features, maps the spatial features and long-range dependency features into query vectors through a first mapping matrix, maps the spatial features and long-range dependency features into key vectors through a second mapping matrix, and maps the spatial features and long-range dependency features into value vectors through a third mapping matrix;
[0021] Performing a matrix multiplication operation on the query vector and the transposed matrix of the key vector to obtain an original attention score, dividing the original attention score by the square root of the feature dimension of the query vector to obtain a scaled attention score, and normalizing the scaled attention score to obtain an attention weight matrix; multiplying the attention weight matrix by the value vector to obtain a weighted feature representation of the attention head;
[0022] The weighted feature representations obtained by all attention heads are sequentially connected in the feature dimension to form a spliced feature, and the feature dimension of the spliced feature is the product of the output dimension of a single attention head and the number of attention heads; the spliced feature is linearly transformed through the output mapping matrix, and the dimension of the spliced feature is reduced to the same as the original dimension of the spatial feature and the long-range dependency feature, so as to obtain the attention output feature.
[0023] In an optional embodiment,
[0024] The step of adaptively fusing the initial prediction result with the attention output feature to obtain a fused prediction result comprises:
[0025] Perform global average pooling operations on the initial prediction results and the attention output features respectively to obtain the channel statistics of the initial prediction results and the channel statistics of the attention output features;
[0026] The channel statistics of the initial prediction result and the channel statistics of the attention output feature are respectively input into a multi-layer perceptron with shared weights, wherein the multi-layer perceptron includes two fully connected layers, and the output of the first fully connected layer is input into the second fully connected layer after passing through a ReLU activation function, so as to obtain a feature interaction representation of the initial prediction result and a feature interaction representation of the attention output feature; the feature interaction representation of the initial prediction result and the feature interaction representation of the attention output feature are respectively sigmoid activated to obtain corresponding channel attention weights;
[0027] The channel attention weight of the initial prediction result is multiplied element by element with the initial prediction result in the channel dimension to obtain a weighted initial prediction result, and the channel attention weight of the attention output feature is multiplied element by element with the attention output feature in the channel dimension to obtain a weighted attention output feature; the weighted initial prediction result and the weighted attention output feature are element-wise added and fused to obtain a fused feature;
[0028] The fused feature is residually connected with the initial prediction result to obtain a fused prediction result.
[0029] In an optional embodiment,
[0030] The weather type is determined according to the real-time meteorological conditions of the wind and solar power stations. When extreme weather is identified, the power forecast data is corrected using a correction model that matches the extreme weather. The steps of obtaining the corrected power forecast data include:
[0031] Collecting real-time data from the meteorological monitoring system of the wind and solar power stations, the real-time data from the meteorological monitoring system includes solar irradiance, ambient temperature, cloud cover, visibility of the photovoltaic power station, and wind speed, wind direction, air pressure, and humidity of the wind power station; standardizing the real-time data from the meteorological monitoring system to obtain meteorological feature vectors;
[0032] Determine an extreme weather determination threshold based on historical data, wherein the extreme weather determination threshold includes a sandstorm weather threshold and a severe convective weather threshold for a photovoltaic power station, and a typhoon weather threshold and an icing weather threshold for a wind farm; construct a decision tree classification model based on the extreme weather determination threshold, map the input meteorological feature vector to a predefined weather type space, and obtain a corresponding weather type label;
[0033] According to the weather type label, a corresponding correction model is selected from a pre-trained correction model library, the correction model library including a sandstorm weather correction model, a severe convective weather correction model, a typhoon weather correction model, and an icing weather correction model. The sandstorm weather correction model performs photovoltaic power correction based on the attenuation coefficient, the severe convective weather correction model performs power fluctuation correction based on the dynamic change of cloud cover, the typhoon weather correction model performs wind power correction based on the wind speed cutoff characteristic, and the icing weather correction model performs power loss correction based on ice thickness. The power prediction data is input into the selected correction model to obtain the corrected power prediction data.
[0034] In an optional embodiment,
[0035] The training methods for the revised model include:
[0036] Based on the historical data collected by the meteorological monitoring system, a training sample set is constructed according to the labeling rules of different extreme weathers, wherein the labeling rules include the PM10 concentration and visibility combined threshold judgment rule for sandstorm weather, the radar echo intensity and precipitation intensity combined threshold judgment rule for severe convective weather, the wind speed and pressure gradient combined threshold judgment rule for typhoon weather, and the temperature and relative humidity combined threshold judgment rule for icy weather. The historical data that meets the labeling rules are marked as extreme weather samples of the corresponding type, and a training sample set containing meteorological characteristic data, power prediction data, and actual power data is established;
[0037] Performing data enhancement processing on the training sample set, constructing continuous time series samples using a sliding time window method, generating data missing scenarios using a random masking strategy, and simulating sensor errors by adding Gaussian noise to form an enhanced training sample set;
[0038] The modified model is trained using a phased training strategy. In the pre-training phase, a contrastive learning method is used to construct positive and negative sample pairs. The feature extraction capability of the model is trained by maximizing the feature similarity of similar samples and minimizing the feature similarity of heterogeneous samples.
[0039] In the fine-tuning training stage, the enhanced training sample set is used for supervised training, and a hierarchical learning rate strategy is adopted to calculate the loss function for different types of extreme weather samples, and the model parameters of the correction model are updated through gradient accumulation.
[0040] In the optimization training stage, knowledge distillation technology is used to transfer the knowledge of multiple expert models to a single model. Bootstrapping random sampling is used to construct multiple training subsets. The modified model is trained on different subsets to obtain integrated results. The optimal model parameter combination is selected through cross-validation method.
[0041] In an optional embodiment,
[0042] The steps of constructing an error compensation model based on historical prediction errors, inputting the corrected power prediction data into the error compensation model to obtain an error compensation value, and obtaining a final power prediction result according to the corrected power prediction data and the error compensation value; and comparing the final power prediction result with actual power data to obtain an error correction amount, wherein the error correction amount is used to update compensation parameters of the error compensation model include:
[0043] Perform time series analysis and power interval analysis on the historical errors of power forecasting to obtain the error distribution characteristics of different power levels and the error change pattern in time series;
[0044] Based on the error distribution characteristics and error change patterns, an error compensation model is constructed, wherein the error compensation model includes a deterministic compensation layer and an adaptive compensation layer, wherein the deterministic compensation layer is used to correct power interval deviation and time periodic error, and the adaptive compensation layer uses a sliding time window mechanism to dynamically update the error sample set, and a recursive neural network is trained based on the error sample set to predict short-term error trends;
[0045] Receive the corrected power prediction data, extract the compensation feature vector at the current moment, the compensation feature vector includes the historical error sequence feature and the current power interval feature, input the compensation feature vector into the deterministic compensation layer and the adaptive compensation layer respectively, adopt an adaptive weight fusion strategy to combine the outputs of the deterministic compensation layer and the adaptive compensation layer to obtain an error compensation value, and the weight allocation ratio of the adaptive weight fusion strategy is dynamically adjusted based on the historical prediction accuracy of the deterministic compensation layer and the adaptive compensation layer;
[0046] Combining the corrected power prediction data with the error compensation value to obtain a final power prediction result;
[0047] The final power prediction result is compared with the actual power data, and the residual error after compensation is calculated. Based on the residual error, the deviation correction coefficient of the deterministic compensation layer is updated, the hidden layer connection weights of the recursive neural network are adjusted, and the weight allocation ratio of the adaptive weight fusion strategy is updated.
[0048] According to a second aspect of the embodiments of the present invention,
[0049] Provide a power prediction accuracy improvement system for wind and solar power stations, including:
[0050] The first unit is used to obtain historical power data, meteorological data and equipment operation data of the wind and solar power station through a data preprocessing module, perform time series decomposition on the historical power data to obtain multiple frequency components, perform spatial interpolation processing on the meteorological data to obtain continuous meteorological features, perform outlier detection and correction on the equipment operation data to obtain equipment features, and perform feature fusion on the multiple frequency components, continuous meteorological features and equipment features to obtain fused feature data;
[0051] The second unit is used to construct a deep learning prediction model based on the fused feature data, wherein the deep learning prediction model includes a feature extraction layer and a prediction layer, wherein the feature extraction layer uses a convolutional neural network to extract spatial features of the fused feature data, and the prediction layer uses a long short-term memory network to process the spatial features to obtain an initial prediction result; an attention mechanism is introduced to perform weight assignment on the spatial features to obtain weighted features, and the weighted features are combined with the initial prediction results to obtain power prediction data;
[0052] The third unit is used to judge the weather type according to the real-time meteorological conditions of the wind and solar power stations. When extreme weather is identified, the power forecast data is corrected by using a correction model matching the extreme weather to obtain corrected power forecast data; an error compensation model is constructed based on historical prediction errors, the corrected power forecast data is input into the error compensation model to obtain an error compensation value, and a final power prediction result is obtained according to the corrected power prediction data and the error compensation value; the final power prediction result is compared with the actual power data to obtain an error correction amount, and the error correction amount is used to update the compensation parameters of the error compensation model.
[0053] According to a third aspect of the embodiments of the present invention,
[0054] An electronic device is provided, comprising:
[0055] processor;
[0056] a memory for storing processor-executable instructions;
[0057] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0058] According to a fourth aspect of the embodiments of the present invention,
[0059] 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.
[0060] By combining multiple data preprocessing methods such as time series decomposition, spatial interpolation, and outlier processing, as well as the feature extraction and prediction capabilities of deep learning models, the present invention can more accurately capture the complex laws of wind and solar power output, thereby improving power prediction accuracy, especially under extreme weather conditions.
[0061] The present invention adopts the attention mechanism to assign weights to features and combines it with the error compensation model for correction, which can effectively reduce the sensitivity of the model to abnormal data and noise and enhance the robustness and stability of the model.
[0062] The present invention utilizes historical prediction errors to update the parameters of the error compensation model, so that the model can perform adaptive learning and adjustment according to actual conditions, thereby continuously improving the prediction performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 A schematic diagram of a flow chart of a method for improving power prediction accuracy for a wind-solar station according to an embodiment of the present invention;
[0064] Figure 2 It is a structural schematic diagram of a system for improving power prediction accuracy for wind and solar power stations according to an embodiment of the present invention. DETAILED DESCRIPTION
[0065] 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.
[0066] 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.
[0067] Figure 1 FIG. 1 is a flow chart of a method for improving power prediction accuracy for wind and solar power stations according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0068] S1. Obtain historical power data, meteorological data and equipment operation data of the wind and solar power station through the data preprocessing module, perform time series decomposition on the historical power data to obtain multiple frequency components, perform spatial interpolation processing on the meteorological data to obtain continuous meteorological features, perform outlier detection and correction on the equipment operation data to obtain equipment features, and perform feature fusion on the multiple frequency components, continuous meteorological features and equipment features to obtain fused feature data;
[0069] S2. constructing a deep learning prediction model based on the fused feature data, the deep learning prediction model comprising a feature extraction layer and a prediction layer, wherein the feature extraction layer uses a convolutional neural network to extract the spatial features of the fused feature data, and the prediction layer uses a long short-term memory network to process the spatial features to obtain an initial prediction result; introducing an attention mechanism to perform weight assignment on the spatial features to obtain weighted features, and combining the weighted features with the initial prediction results to obtain power prediction data;
[0070] S3. Determine the weather type according to the real-time meteorological conditions of the wind and solar power stations. When extreme weather is identified, use a correction model that matches the extreme weather to correct the power forecast data to obtain corrected power forecast data; construct an error compensation model based on historical prediction errors, input the corrected power forecast data into the error compensation model to obtain an error compensation value, and obtain a final power prediction result according to the corrected power prediction data and the error compensation value; compare the final power prediction result with the actual power data to obtain an error correction amount, and the error correction amount is used to update the compensation parameters of the error compensation model.
[0071] In an optional embodiment,
[0072] A deep learning prediction model is constructed based on the fused feature data, the deep learning prediction model includes a feature extraction layer and a prediction layer, wherein the feature extraction layer uses a convolutional neural network to extract the spatial features of the fused feature data, and the prediction layer uses a long short-term memory network to process the spatial features to obtain an initial prediction result; an attention mechanism is introduced to perform weight assignment on the spatial features to obtain weighted features, and the weighted features are combined with the initial prediction results to obtain power prediction data, the steps include:
[0073] Constructing a two-layer cascaded deep learning prediction model, wherein the deep learning prediction model includes a feature extraction layer and a prediction layer, and a feature transmission channel is set between the feature extraction layer and the prediction layer;
[0074] The feature extraction layer adopts a convolutional neural network structure, including a multi-scale convolution module and a dilated convolution module. The multi-scale convolution module sets a plurality of convolution kernels of different scales to extract the spatial features of the fused feature data. The dilated convolution module uses convolution layers with different dilation rates to construct a feature pyramid structure, and extracts long-range dependency features based on the feature pyramid structure.
[0075] The prediction layer adopts a bidirectional long short-term memory network, including a forward network unit and a backward network unit, wherein the forward network unit and the backward network unit both include a forget gate, an input gate, and an output gate, and the spatial features and the long-range dependency features are processed based on the forget gate, the input gate, and the output gate to obtain an initial prediction result;
[0076] Constructing a multi-head self-attention mechanism, mapping the spatial features and the long-range dependency features into a query vector, a key vector and a value vector, calculating an attention weight based on the query vector and the key vector, combining the attention weight with the value vector to obtain a weighted feature; splicing multiple groups of the weighted features to obtain an attention output feature;
[0077] The initial prediction result is adaptively fused with the attention output feature to obtain a fused prediction result, and the fused prediction result is mapped through a fully connected layer to obtain power prediction data.
[0078] Exemplarily, first, prepare the fused feature data. Assuming that we are predicting the power output of a photovoltaic power station, the fused feature data can include historical power data, meteorological data (such as irradiance, temperature, humidity, etc.) and time features (such as month, hour, etc.). For example, we can collect the photovoltaic power output data, irradiance, temperature, humidity and timestamp of the corresponding time every hour for the past year. Arrange these data into a time series format, for example, each piece of data contains the feature information of the past 24 hours and the power output value of the next hour.
[0079] Next, a two-layer cascaded deep learning prediction model is constructed. The model consists of a feature extraction layer and a prediction layer, which are connected by a feature transfer channel. The feature extraction layer adopts a convolutional neural network structure, which includes a multi-scale convolution module and a dilated convolution module. The multi-scale convolution module uses convolution kernels of different sizes (such as 3x3, 5x5, 7x7) to extract local spatial features in the fused feature data and capture information of different scales. The dilated convolution module uses convolution layers with different dilation rates to construct a feature pyramid to extract spatial features and long-range dependency features in a larger range. For example, three layers of dilated convolutions with dilation rates of 1, 2, and 4 can be used, and their outputs can be spliced together to form a multi-scale feature representation.
[0080] Subsequently, the extracted spatial features and long-range dependency features are passed to the prediction layer. The prediction layer adopts a bidirectional long short-term memory network structure, which contains two network units, forward and backward. Each unit contains a forget gate, an input gate, and an output gate to process sequence data and capture time dependencies. The forward network unit processes the forward time series information, and the backward network unit processes the reverse time series information. The outputs of the two are combined to obtain the initial prediction result. For example, the outputs of the multi-scale convolution module and the void convolution module are spliced and input into the bidirectional long short-term memory network to obtain an initial prediction result containing time dependency information.
[0081] In order to further improve the prediction accuracy, a multi-head self-attention mechanism is introduced. The spatial features and long-range dependency features are mapped to query vectors, key vectors, and value vectors respectively. The attention weight is obtained by calculating the similarity between the query vector and the key vector, and then the weighted feature is obtained by multiplying the attention weight with the value vector. Use multiple attention heads to calculate the weighted features in parallel, and splice them together to obtain the attention output features. For example, 8 attention heads can be used, each of which learns a different weight allocation strategy, and finally the outputs of the 8 attention heads are spliced to obtain a richer feature representation.
[0082] Finally, the initial prediction results and the attention output features are adaptively fused. You can use a simple concatenation operation or a more complex fusion method, such as learning the fusion weights through a fully connected layer. The fused prediction results are mapped to the final power prediction data through a fully connected layer. For example, the initial prediction results and the attention output features can be concatenated and input into a fully connected layer to finally output the power prediction value for the next hour.
[0083] The present invention can effectively improve the accuracy of power prediction by fusing multi-source data, extracting multi-scale spatial features and long-range dependency features, and optimizing the prediction results in combination with the attention mechanism; the introduction of bidirectional long short-term memory network and attention mechanism enables the model to better capture the complex patterns and long-range dependencies in time series data, thereby improving the stability and robustness of the model; the combination of multi-scale convolution and void convolution enables the model to learn richer feature representations, thereby improving the generalization ability of the model and enabling it to adapt to different data scenarios and prediction tasks.
[0084] In an optional embodiment,
[0085] Constructing a multi-head self-attention mechanism, mapping the spatial features and the long-range dependency features into a query vector, a key vector and a value vector, calculating an attention weight based on the query vector and the key vector, and combining the attention weight with the value vector to obtain a weighted feature; the step of concatenating multiple groups of the weighted features to obtain an attention output feature includes:
[0086] Construct multiple parallel attention heads, where each attention head performs three-way linear mapping on spatial features and long-range dependency features, maps the spatial features and long-range dependency features into query vectors through a first mapping matrix, maps the spatial features and long-range dependency features into key vectors through a second mapping matrix, and maps the spatial features and long-range dependency features into value vectors through a third mapping matrix;
[0087] Performing a matrix multiplication operation on the query vector and the transposed matrix of the key vector to obtain an original attention score, dividing the original attention score by the square root of the feature dimension of the query vector to obtain a scaled attention score, and normalizing the scaled attention score to obtain an attention weight matrix; multiplying the attention weight matrix by the value vector to obtain a weighted feature representation of the attention head;
[0088] The weighted feature representations obtained by all attention heads are sequentially connected in the feature dimension to form a spliced feature, and the feature dimension of the spliced feature is the product of the output dimension of a single attention head and the number of attention heads; the spliced feature is linearly transformed through the output mapping matrix, and the dimension of the spliced feature is reduced to the same as the original dimension of the spatial feature and the long-range dependency feature, so as to obtain the attention output feature.
[0089] For example, in order to effectively fuse spatial features and long-range dependency features, a feature fusion method based on a multi-head self-attention mechanism is proposed. This method uses multiple parallel attention heads to focus on different aspects of feature information and integrates this information to obtain a more comprehensive and effective feature representation.
[0090] First, obtain the input spatial features and long-range dependency features. Assume that the spatial feature dimension is 256 and the long-range dependency feature dimension is 128. To facilitate subsequent processing, these two features are concatenated together to obtain a combined feature with a dimension of 384.
[0091] Then, build multiple parallel attention heads. Here we take 8 attention heads as an example. For each attention head, it is necessary to perform three-way linear mapping on the combined features to obtain the query vector, key vector and value vector respectively. Taking the first attention head as an example, assume that the dimensions of the three mapping matrices are all 384x64. Multiply the combined features with the first mapping matrix to obtain a query vector with a dimension of 64, multiply it with the second mapping matrix to obtain a key vector with a dimension of 64, and multiply it with the third mapping matrix to obtain a value vector with a dimension of 64. The operations of other attention heads are similar.
[0092] Next, the attention weights are calculated. The query vector and the transpose of the key vector are matrix multiplied to get the raw attention score. To avoid too large a value, the raw attention score is divided by the square root of the feature dimension of the query vector, which is 8, the square root of 64, to get the scaled attention score. The scaled attention score is then normalized, for example using the Softmax function, to get the attention weight matrix.
[0093] After that, the attention weight matrix is multiplied by the value vector to obtain the weighted feature representation of the attention head. The dimension of this weighted feature representation is the same as the dimension of the value vector, that is, 64. The same operation is performed on all 8 attention heads to obtain 8 weighted feature representations with a dimension of 64.
[0094] The weighted feature representations obtained by all attention heads are sequentially connected in the feature dimension to form a concatenated feature. The dimension of the concatenated feature is the product of the output dimension of a single attention head and the number of attention heads, that is, 64x8=512.
[0095] Finally, the concatenated features are linearly transformed by the output mapping matrix. Assume that the dimension of the output mapping matrix is 512x384. Multiply the concatenated features by the output mapping matrix to obtain the attention output feature with a dimension of 384. The dimension of this feature is the same as the dimension of the original combined feature, which is convenient for subsequent network processing.
[0096] The method of the present invention can capture the complex relationships between spatial features and long-range dependent features through a multi-head self-attention mechanism, thereby improving the expressiveness of features and facilitating the completion of subsequent tasks; the multi-head attention mechanism allows each attention head to be calculated in parallel, thereby improving computational efficiency and reducing model training time; each attention head can focus on feature information of different subspaces, thereby capturing more comprehensive and fine-grained feature representations and avoiding information loss.
[0097] In an optional embodiment,
[0098] The step of adaptively fusing the initial prediction result with the attention output feature to obtain a fused prediction result comprises:
[0099] Perform global average pooling operations on the initial prediction results and the attention output features respectively to obtain the channel statistics of the initial prediction results and the channel statistics of the attention output features;
[0100] The channel statistics of the initial prediction result and the channel statistics of the attention output feature are respectively input into a multi-layer perceptron with shared weights, wherein the multi-layer perceptron includes two fully connected layers, and the output of the first fully connected layer is input into the second fully connected layer after passing through a ReLU activation function, so as to obtain a feature interaction representation of the initial prediction result and a feature interaction representation of the attention output feature; the feature interaction representation of the initial prediction result and the feature interaction representation of the attention output feature are respectively sigmoid activated to obtain corresponding channel attention weights;
[0101] The channel attention weight of the initial prediction result is multiplied element by element with the initial prediction result in the channel dimension to obtain a weighted initial prediction result, and the channel attention weight of the attention output feature is multiplied element by element with the attention output feature in the channel dimension to obtain a weighted attention output feature; the weighted initial prediction result and the weighted attention output feature are element-wise added and fused to obtain a fused feature;
[0102] The fused feature is residually connected with the initial prediction result to obtain a fused prediction result.
[0103] For example, in order to more effectively fuse the initial prediction results and the attention output features, an adaptive fusion method is proposed. The core idea of this method is to dynamically adjust the fusion weights of the two according to channel statistical information.
[0104] First, global average pooling is performed on the initial prediction result and the attention output features. For example, the initial prediction result is a 3D tensor of shape 20x20x128, which represents the features of 128 channels on a 20x20 image area. The global average pooling operation averages all pixel values on each channel to obtain a 128-dimensional vector that represents the channel statistics of the initial prediction result. Similarly, the global average pooling operation is also performed on the attention output features to obtain their channel statistics.
[0105] Next, the two obtained channel statistics vectors are input into a shared weight multilayer perceptron. This multilayer perceptron contains two fully connected layers. The first fully connected layer converts the 128-dimensional input vector into, for example, a 64-dimensional intermediate vector and uses the ReLU activation function to perform a nonlinear transformation on the intermediate vector. The function of the ReLU activation function is to set the element values less than zero to zero and keep the element values greater than zero unchanged. Then, the 64-dimensional intermediate vector is input into the second fully connected layer, which converts it back to a 128-dimensional output vector to obtain the feature interaction representation of the initial prediction result and the attention output feature.
[0106] Then, the sigmoid activation function is applied to the two 128-dimensional feature interaction representations obtained. The sigmoid activation function maps the value of each element to between 0 and 1, and these values can be regarded as channel attention weights. For example, the attention weight of a channel of the initial prediction result is 0.8, while the attention weight of the corresponding channel of the attention output feature is 0.2, which indicates that the initial prediction result of this channel is more important.
[0107] Next, the channel attention weights of the initial prediction results are multiplied element-by-element with the initial prediction results in the channel dimension to obtain the weighted initial prediction results. For example, if the attention weight of a channel of the initial prediction result is 0.8, all pixel values on that channel will be multiplied by 0.8. Similarly, the channel attention weights of the attention output features are multiplied element-by-element with the attention output features in the channel dimension to obtain the weighted attention output features.
[0108] Then, the weighted initial prediction result and the weighted attention output feature are fused element-wise by addition to obtain the fused feature. This means adding the elements at corresponding positions in the two tensors.
[0109] Finally, the fused features are residually connected with the initial prediction results to obtain the final fused prediction results. Residual connection refers to adding the fused features to the initial prediction results. The advantage of this is that the information of the initial prediction results can be retained to avoid losing important details during the fusion process.
[0110] The present invention can more effectively utilize the information of the initial prediction results and the attention output features by adaptively fusing them, thereby improving the prediction accuracy; through the channel attention mechanism, the influence of noise and irrelevant information can be suppressed and the robustness of the model can be enhanced; the multi-layer perceptron with shared weights reduces the number of model parameters and simplifies the model training process.
[0111] In an optional embodiment,
[0112] The weather type is determined according to the real-time meteorological conditions of the wind and solar power stations. When extreme weather is identified, the power forecast data is corrected using a correction model that matches the extreme weather. The steps of obtaining the corrected power forecast data include:
[0113] Collecting real-time data from the meteorological monitoring system of the wind and solar power stations, the real-time data from the meteorological monitoring system includes solar irradiance, ambient temperature, cloud cover, visibility of the photovoltaic power station, and wind speed, wind direction, air pressure, and humidity of the wind power station; standardizing the real-time data from the meteorological monitoring system to obtain meteorological feature vectors;
[0114] Determine an extreme weather determination threshold based on historical data, wherein the extreme weather determination threshold includes a sandstorm weather threshold and a severe convective weather threshold for a photovoltaic power station, and a typhoon weather threshold and an icing weather threshold for a wind farm; construct a decision tree classification model based on the extreme weather determination threshold, map the input meteorological feature vector to a predefined weather type space, and obtain a corresponding weather type label;
[0115] According to the weather type label, a corresponding correction model is selected from a pre-trained correction model library, the correction model library including a sandstorm weather correction model, a severe convective weather correction model, a typhoon weather correction model, and an icing weather correction model. The sandstorm weather correction model performs photovoltaic power correction based on the attenuation coefficient, the severe convective weather correction model performs power fluctuation correction based on the dynamic change of cloud cover, the typhoon weather correction model performs wind power correction based on the wind speed cutoff characteristic, and the icing weather correction model performs power loss correction based on ice thickness. The power prediction data is input into the selected correction model to obtain the corrected power prediction data.
[0116] For example, first, various meteorological parameters are collected in real time through the meteorological monitoring system deployed in the wind and solar power stations. For photovoltaic power stations, the collected data include solar irradiance, ambient temperature, cloud cover and visibility. For example, at a certain moment, the collected data may be: solar irradiance 800W / m 2 , ambient temperature 25℃, cloud cover 30%, visibility 10km. For wind farms, the collected data include wind speed, wind direction, air pressure and humidity. For example, the data collected at the same time may be: wind speed 15m / s, wind direction southeast, air pressure 1000hPa, humidity 60%.
[0117] Next, the collected meteorological data is standardized and converted into dimensionless meteorological feature vectors. The standardization method can be min-max standardization, that is, the value of each meteorological parameter is scaled to between 0 and 1. For example, assuming that the minimum solar irradiance in the historical data is 0W / m 2 , the maximum value is 1000W / m 2 , then the solar irradiance collected above is 800W / m 2 After normalization, it becomes 0.8. Similar normalization is performed on other meteorological parameters, and finally a feature vector containing the normalized values of all meteorological parameters is obtained, for example: [0.8, 0.7, 0.3, 0.9, 0.6, 0.5, 0.95, 0.6].
[0118] Determine the extreme weather judgment threshold based on historical data and build a decision tree classification model.
[0119] First, based on historical meteorological data and power generation data, determine the thresholds for various extreme weather conditions. For example, by analyzing historical data, it can be determined that the threshold for sandstorm weather is: visibility is less than 1km, and the solar irradiance attenuation exceeds 50%. The threshold for severe convective weather is: cloud cover changes by more than 80% in a short period of time, accompanied by short-term heavy rainfall or strong winds. The threshold for typhoon weather is: wind speed exceeds 30m / s, and air pressure drops sharply. The threshold for icing weather is: ambient temperature is below 0℃, and humidity exceeds 90%.
[0120] Then, based on these extreme weather judgment thresholds, a decision tree classification model is constructed. Each node of the decision tree represents a meteorological feature, each branch represents the value range of a feature, and the leaf nodes represent different weather type labels. For example, the root node of the decision tree can be wind speed. If the wind speed exceeds 30m / s, the next node is entered to judge the change in air pressure. If the air pressure drops sharply, it is finally judged as typhoon weather. The judgment logic for other weather types is similar. By inputting the standardized meteorological feature vector into the decision tree model, the corresponding weather type label can be obtained, such as "sunny", "cloudy", "sandstorm weather", "severe convective weather", "typhoon weather" or "icing weather".
[0121] Select the correction model according to the weather type label and correct the power forecast data.
[0122] First, a correction model library is constructed, which contains correction models for different extreme weather conditions. For example, the sandstorm weather correction model corrects the photovoltaic power based on the attenuation coefficient. Assuming that the measured solar irradiance attenuation coefficient is 0.6, the original photovoltaic power prediction value is multiplied by 0.6 to obtain the corrected power prediction value. The severe convective weather correction model corrects the power fluctuation based on the dynamic change of cloud cover, for example, the slope of the power prediction curve is adjusted according to the cloud cover change rate. The typhoon weather correction model corrects the wind power based on the wind speed cutoff characteristic. For example, when the wind speed exceeds the cut-out wind speed of the wind turbine, the wind power prediction value is set to 0. The icing weather correction model corrects the power loss based on the ice thickness. For example, the power loss ratio of the wind turbine blade is estimated according to the ice thickness, and then the original wind power prediction value is multiplied by (1-power loss ratio) to obtain the corrected power prediction value.
[0123] Then, according to the weather type label output by the decision tree model, the corresponding correction model is selected from the correction model library. For example, if the weather type label is "sandstorm weather", the sandstorm weather correction model is selected.
[0124] Finally, the original power forecast data is input into the selected correction model to obtain the corrected power forecast data. For example, assuming that the original photovoltaic power forecast value is 1000kW and the attenuation coefficient of the sandstorm weather correction model is 0.6, the corrected photovoltaic power forecast value is 600kW.
[0125] The method of the present invention can identify extreme weather according to real-time meteorological conditions, and adopt corresponding correction models to correct power prediction data, which effectively improves the accuracy of power prediction, especially in extreme weather conditions; reduces power grid accidents caused by power prediction errors; accurate power prediction helps to optimize energy management strategies.
[0126] In an optional embodiment,
[0127] The training methods for the revised model include:
[0128] Based on the historical data collected by the meteorological monitoring system, a training sample set is constructed according to the labeling rules of different extreme weathers, wherein the labeling rules include the PM10 concentration and visibility combined threshold judgment rule for sandstorm weather, the radar echo intensity and precipitation intensity combined threshold judgment rule for severe convective weather, the wind speed and pressure gradient combined threshold judgment rule for typhoon weather, and the temperature and relative humidity combined threshold judgment rule for icy weather. The historical data that meets the labeling rules are marked as extreme weather samples of the corresponding type, and a training sample set containing meteorological characteristic data, power prediction data, and actual power data is established;
[0129] Performing data enhancement processing on the training sample set, constructing continuous time series samples using a sliding time window method, generating data missing scenarios using a random masking strategy, and simulating sensor errors by adding Gaussian noise to form an enhanced training sample set;
[0130] The modified model is trained using a phased training strategy. In the pre-training phase, a contrastive learning method is used to construct positive and negative sample pairs. The feature extraction capability of the model is trained by maximizing the feature similarity of similar samples and minimizing the feature similarity of heterogeneous samples.
[0131] In the fine-tuning training stage, the enhanced training sample set is used for supervised training, and a hierarchical learning rate strategy is adopted to calculate the loss function for different types of extreme weather samples, and the model parameters of the correction model are updated through gradient accumulation.
[0132] In the optimization training stage, knowledge distillation technology is used to transfer the knowledge of multiple expert models to a single model. Bootstrapping random sampling is used to construct multiple training subsets. The modified model is trained on different subsets to obtain integrated results. The optimal model parameter combination is selected through cross-validation method.
[0133] For example, in order to improve the power prediction accuracy of the power system under extreme weather conditions, a correction model training method based on a multi-stage training strategy is proposed. This method uses historical data collected by the meteorological monitoring system, combined with data enhancement and phased training strategies, to construct a robust correction model, effectively improving the accuracy of power prediction under extreme weather conditions.
[0134] First, construct a training sample set. Obtain historical data from the meteorological monitoring system, including meteorological characteristic data (such as temperature, humidity, wind speed, air pressure, radar echo intensity, etc.), power prediction data (for example, power prediction results obtained based on conventional methods) and actual power data. Label the historical data according to the labeling rules of different extreme weather. For example, sandstorm weather can be judged based on the combined threshold of PM10 concentration and visibility. For example, if the PM10 concentration is greater than 300 micrograms / cubic meter and the visibility is less than 1 km, it is marked as a sandstorm weather sample. Severe convective weather can be judged based on the combined threshold of radar echo intensity and precipitation intensity. For example, if the radar echo intensity is greater than 50dBZ and the precipitation intensity is greater than 20 mm / hour, it is marked as a severe convective weather sample. Typhoon weather can be judged based on the combined threshold of wind speed and pressure gradient. For example, if the wind speed is greater than 17 meters / second and the pressure gradient is greater than 3 hPa / hundred kilometers, it is marked as a typhoon weather sample. Freezing weather can be determined based on the combined threshold of temperature and relative humidity. For example, if the temperature is below 0 degrees Celsius and the relative humidity is greater than 90%, it is marked as a freezing weather sample. The historical data that meets the labeling rules are marked as extreme weather samples of the corresponding type, and finally a training sample set containing meteorological characteristic data, power prediction data, and actual power data is established. For example, a piece of sample data may include date, time, temperature, humidity, wind speed, air pressure, radar echo intensity, precipitation intensity, PM10 concentration, visibility, power prediction value, actual power value, and weather type label (for example, sandstorm, severe convection, typhoon, ice, or normal weather).
[0135] Next, the training sample set is subjected to data enhancement. A sliding time window method is used to construct continuous time series samples. For example, a time window of 24 hours is used, which slides once every hour to generate a series of continuous time series samples. A random masking strategy is used to generate data missing scenarios. For example, certain feature data at certain time points are randomly selected and their values are set to missing values to simulate sensor failures or data loss that may occur during actual data collection. Sensor errors are simulated by adding Gaussian noise. For example, a random noise that follows a normal distribution is added to each feature data. The mean of the noise is 0, and the standard deviation can be set according to the actual situation, for example, 1% of the mean value of the feature data. Through these data enhancement methods, an enhanced training sample set is formed to improve the robustness and generalization ability of the model.
[0136] Then, the correction model is trained using a phased training strategy. In the pre-training stage, the contrastive learning method is used to train the model's feature extraction ability. Specifically, extreme weather samples of the same type are regarded as positive sample pairs, and extreme weather samples of different types are regarded as negative sample pairs. For example, two dust weather samples constitute a positive sample pair, and a dust weather sample and a severe convective weather sample constitute a negative sample pair. The model is trained by maximizing the feature similarity of samples of the same type and minimizing the feature similarity of samples of different types, so that it can effectively extract the features of different types of extreme weather. In the fine-tuning training stage, the enhanced training sample set is used for supervised training. A hierarchical learning rate strategy is used to calculate the loss function for different types of extreme weather samples separately, for example, the loss function of dust, severe convection, typhoon, ice and normal weather samples is calculated separately. The model parameters of the correction model are updated by gradient accumulation, for example, after processing a certain number of samples, the accumulated gradient is used to update the model parameters. In the optimization training stage, the knowledge distillation technology is used to transfer the knowledge of multiple expert models to a single model, for example, the knowledge of multiple expert models trained for different types of extreme weather is transferred to a unified correction model. Use bootstrap random sampling to construct multiple training subsets, and train the modified model on different subsets to obtain integrated results. Select the optimal model parameter combination through cross-validation. For example, use k-fold cross-validation to divide the data set into k parts, select k-1 parts for training each time, and the remaining 1 part for validation. Finally, select the model parameter combination with the best performance on the validation set.
[0137] By combining meteorological data with a multi-stage training strategy, the present invention can effectively capture the impact of extreme weather on the power system, thereby improving the accuracy of power forecasting; the combination of data enhancement and phased training strategy enables the model to better cope with problems such as data missing and noise interference, thereby improving the robustness and generalization ability of the model; through the knowledge distillation technology, the knowledge of multiple expert models is transferred to a single model, which simplifies the deployment and maintenance of the model and reduces the operating cost of the model.
[0138] In an optional embodiment,
[0139] The steps of constructing an error compensation model based on historical prediction errors, inputting the corrected power prediction data into the error compensation model to obtain an error compensation value, and obtaining a final power prediction result according to the corrected power prediction data and the error compensation value; and comparing the final power prediction result with actual power data to obtain an error correction amount, wherein the error correction amount is used to update compensation parameters of the error compensation model include:
[0140] Perform time series analysis and power interval analysis on the historical errors of power forecasting to obtain the error distribution characteristics of different power levels and the error change pattern in time series;
[0141] Based on the error distribution characteristics and error change patterns, an error compensation model is constructed, wherein the error compensation model includes a deterministic compensation layer and an adaptive compensation layer, wherein the deterministic compensation layer is used to correct power interval deviation and time periodic error, and the adaptive compensation layer uses a sliding time window mechanism to dynamically update the error sample set, and a recursive neural network is trained based on the error sample set to predict short-term error trends;
[0142] Receive the corrected power prediction data, extract the compensation feature vector at the current moment, the compensation feature vector includes the historical error sequence feature and the current power interval feature, input the compensation feature vector into the deterministic compensation layer and the adaptive compensation layer respectively, adopt an adaptive weight fusion strategy to combine the outputs of the deterministic compensation layer and the adaptive compensation layer to obtain an error compensation value, and the weight allocation ratio of the adaptive weight fusion strategy is dynamically adjusted based on the historical prediction accuracy of the deterministic compensation layer and the adaptive compensation layer;
[0143] Combining the corrected power prediction data with the error compensation value to obtain a final power prediction result;
[0144] The final power prediction result is compared with the actual power data, and the residual error after compensation is calculated. Based on the residual error, the deviation correction coefficient of the deterministic compensation layer is updated, the hidden layer connection weights of the recursive neural network are adjusted, and the weight allocation ratio of the adaptive weight fusion strategy is updated.
[0145] Exemplarily, first, collect historical power data and corresponding forecast data. For example, collect hourly power data and corresponding forecast values for the past year. Analyze historical errors, including time series analysis and power interval analysis. Time series analysis aims to identify how errors change over time, for example, whether the error is larger during the peak period of each day than in other periods. Power interval analysis aims to identify the error distribution characteristics at different power levels, for example, whether the forecast error is larger at high power levels than at low power levels. By analyzing the data from the past year, it was found that there were significant differences in the error patterns between weekdays and weekends, and the forecast error was higher when the power was higher.
[0146] Next, an error compensation model is constructed based on the error analysis results. The model consists of a deterministic compensation layer and an adaptive compensation layer. The deterministic compensation layer is used to correct power interval deviations and time periodic errors. For example, based on historical data analysis results, it is found that the forecast error on weekends is usually 10% higher than on weekdays, so the deterministic compensation layer adjusts the forecast value downward by 10% on weekends. The adaptive compensation layer uses a sliding time window mechanism to dynamically update the error sample set, and trains a recursive neural network based on the sample set to predict short-term error trends. For example, using the error data of the past 24 hours as a sample set, a recursive neural network is trained to predict the error in the next few hours.
[0147] Then, receive the power forecast data that needs to be corrected. Assume that the initial power forecast value at a certain moment is 100MW. Extract the compensation feature vector at the current moment, including the historical error sequence features (for example, the error value in the past 24 hours) and the current power interval features (for example, the current power belongs to the high power interval). Input these feature vectors into the deterministic compensation layer and the adaptive compensation layer respectively. Assume that the compensation value output by the deterministic compensation layer is -5MW, and the compensation value output by the adaptive compensation layer is -2MW. Adopt an adaptive weight fusion strategy to combine the outputs of the two. Assume that according to the historical prediction accuracy, the weight of the deterministic compensation layer is 0.7, and the weight of the adaptive compensation layer is 0.3. Then the final error compensation value is -5MW*0.7+(-2MW)*0.3=-4.1MW.
[0148] The corrected power prediction data is combined with the error compensation value to obtain the final power prediction result. In this example, the final power prediction result is 100MW-4.1MW=95.9MW.
[0149] Finally, the final power prediction result is compared with the actual power data to calculate the residual error after compensation. Assuming that the actual power value is 97MW, the residual error is 97MW-95.9MW=1.1MW. Based on the residual error, the deviation correction coefficient of the deterministic compensation layer is updated, the hidden layer connection weights of the recursive neural network are adjusted, and the weight allocation ratio of the adaptive weight fusion strategy is updated. For example, if the residual error is found to be continuously positive, the downward correction amplitude of the deterministic compensation layer can be appropriately increased.
[0150] The present invention effectively compensates for the systematic deviations and random fluctuations in the initial prediction results by analyzing and modeling historical errors, thereby improving the accuracy of the final power prediction; the adaptive compensation layer and the adaptive weight fusion strategy can dynamically adjust the compensation parameters according to actual conditions, so that the model can adapt to the prediction requirements in different time periods and different power levels; the model update process of this method is based on actual operating data and does not require human intervention, thereby simplifying the maintenance of the model.
[0151] Figure 2 FIG. 1 is a schematic diagram of a system for improving the power prediction accuracy of a wind-solar station according to an embodiment of the present invention. Figure 2 As shown, the system comprises:
[0152] The first unit is used to obtain historical power data, meteorological data and equipment operation data of the wind and solar power station through a data preprocessing module, perform time series decomposition on the historical power data to obtain multiple frequency components, perform spatial interpolation processing on the meteorological data to obtain continuous meteorological features, perform outlier detection and correction on the equipment operation data to obtain equipment features, and perform feature fusion on the multiple frequency components, continuous meteorological features and equipment features to obtain fused feature data;
[0153] The second unit is used to construct a deep learning prediction model based on the fused feature data, wherein the deep learning prediction model includes a feature extraction layer and a prediction layer, wherein the feature extraction layer uses a convolutional neural network to extract spatial features of the fused feature data, and the prediction layer uses a long short-term memory network to process the spatial features to obtain an initial prediction result; an attention mechanism is introduced to perform weight assignment on the spatial features to obtain weighted features, and the weighted features are combined with the initial prediction results to obtain power prediction data;
[0154] The third unit is used to judge the weather type according to the real-time meteorological conditions of the wind and solar power stations. When extreme weather is identified, the power forecast data is corrected by using a correction model matching the extreme weather to obtain corrected power forecast data; an error compensation model is constructed based on historical prediction errors, the corrected power forecast data is input into the error compensation model to obtain an error compensation value, and a final power prediction result is obtained according to the corrected power prediction data and the error compensation value; the final power prediction result is compared with the actual power data to obtain an error correction amount, and the error correction amount is used to update the compensation parameters of the error compensation model.
[0155] According to a third aspect of the embodiments of the present invention,
[0156] An electronic device is provided, comprising:
[0157] processor;
[0158] a memory for storing processor-executable instructions;
[0159] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0160] According to a fourth aspect of the embodiments of the present invention,
[0161] 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.
[0162] 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.
[0163] 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 method for improving the power prediction accuracy for wind and solar power stations, characterized in that: include: The historical power data, meteorological data and equipment operation data of the wind and solar power stations are obtained through the data preprocessing module, the historical power data is time-series decomposed to obtain multiple frequency components, the meteorological data is spatially interpolated to obtain continuous meteorological features, the equipment operation data is detected and corrected for abnormal values to obtain equipment features, and the multiple frequency components, continuous meteorological features and equipment features are feature-fused to obtain fused feature data; A deep learning prediction model is constructed based on the fused feature data, wherein the deep learning prediction model includes a feature extraction layer and a prediction layer, wherein the feature extraction layer uses a convolutional neural network to extract spatial features of the fused feature data, and the prediction layer uses a long short-term memory network to process the spatial features to obtain an initial prediction result; an attention mechanism is introduced to perform weight assignment on the spatial features to obtain weighted features, and the weighted features are combined with the initial prediction results to obtain power prediction data; The weather type is determined according to the real-time meteorological conditions of the wind and solar power stations. When extreme weather is identified, the power forecast data is corrected using a correction model that matches the extreme weather to obtain corrected power forecast data. An error compensation model is constructed based on historical prediction errors, and the corrected power forecast data is input into the error compensation model to obtain an error compensation value. A final power forecast result is obtained according to the corrected power forecast data and the error compensation value. The final power prediction result is compared with the actual power data to obtain an error correction amount, and the error correction amount is used to update the compensation parameters of the error compensation model.
2. The method according to claim 1, characterized in that A deep learning prediction model is constructed based on the fused feature data, the deep learning prediction model includes a feature extraction layer and a prediction layer, wherein the feature extraction layer uses a convolutional neural network to extract the spatial features of the fused feature data, and the prediction layer uses a long short-term memory network to process the spatial features to obtain an initial prediction result; an attention mechanism is introduced to perform weight assignment on the spatial features to obtain weighted features, and the weighted features are combined with the initial prediction results to obtain power prediction data, the steps include: Constructing a two-layer cascaded deep learning prediction model, wherein the deep learning prediction model includes a feature extraction layer and a prediction layer, and a feature transmission channel is set between the feature extraction layer and the prediction layer; The feature extraction layer adopts a convolutional neural network structure, including a multi-scale convolution module and a dilated convolution module. The multi-scale convolution module sets a plurality of convolution kernels of different scales to extract the spatial features of the fused feature data. The dilated convolution module uses convolution layers with different dilation rates to construct a feature pyramid structure, and extracts long-range dependency features based on the feature pyramid structure. The prediction layer adopts a bidirectional long short-term memory network, including a forward network unit and a backward network unit, wherein the forward network unit and the backward network unit both include a forget gate, an input gate, and an output gate, and the spatial features and the long-range dependency features are processed based on the forget gate, the input gate, and the output gate to obtain an initial prediction result; Constructing a multi-head self-attention mechanism, mapping the spatial features and the long-range dependency features into a query vector, a key vector and a value vector, calculating an attention weight based on the query vector and the key vector, combining the attention weight with the value vector to obtain a weighted feature; splicing multiple groups of the weighted features to obtain an attention output feature; The initial prediction result is adaptively fused with the attention output feature to obtain a fused prediction result, and the fused prediction result is mapped through a fully connected layer to obtain power prediction data.
3. The method according to claim 2, characterized in that Constructing a multi-head self-attention mechanism, mapping the spatial features and the long-range dependency features into a query vector, a key vector and a value vector, calculating an attention weight based on the query vector and the key vector, and combining the attention weight with the value vector to obtain a weighted feature; The step of concatenating multiple groups of weighted features to obtain attention output features includes: Construct multiple parallel attention heads, where each attention head performs three-way linear mapping on spatial features and long-range dependency features, maps the spatial features and long-range dependency features into query vectors through a first mapping matrix, maps the spatial features and long-range dependency features into key vectors through a second mapping matrix, and maps the spatial features and long-range dependency features into value vectors through a third mapping matrix; Performing a matrix multiplication operation on the query vector and the transposed matrix of the key vector to obtain an original attention score, dividing the original attention score by the square root of the feature dimension of the query vector to obtain a scaled attention score, and normalizing the scaled attention score to obtain an attention weight matrix; multiplying the attention weight matrix by the value vector to obtain a weighted feature representation of the attention head; The weighted feature representations obtained by all attention heads are sequentially connected in the feature dimension to form a spliced feature, and the feature dimension of the spliced feature is the product of the output dimension of a single attention head and the number of attention heads; the spliced feature is linearly transformed through the output mapping matrix, and the dimension of the spliced feature is reduced to the same as the original dimension of the spatial feature and the long-range dependency feature, so as to obtain the attention output feature.
4. The method according to claim 2, characterized in that: The step of adaptively fusing the initial prediction result with the attention output feature to obtain a fused prediction result comprises: Perform global average pooling operations on the initial prediction results and the attention output features respectively to obtain the channel statistics of the initial prediction results and the channel statistics of the attention output features; The channel statistics of the initial prediction result and the channel statistics of the attention output feature are respectively input into a multi-layer perceptron with shared weights, wherein the multi-layer perceptron includes two fully connected layers, and the output of the first fully connected layer is input into the second fully connected layer after passing through a ReLU activation function, so as to obtain a feature interaction representation of the initial prediction result and a feature interaction representation of the attention output feature; the feature interaction representation of the initial prediction result and the feature interaction representation of the attention output feature are respectively sigmoid activated to obtain corresponding channel attention weights; The channel attention weight of the initial prediction result is multiplied element by element with the initial prediction result in the channel dimension to obtain a weighted initial prediction result, and the channel attention weight of the attention output feature is multiplied element by element with the attention output feature in the channel dimension to obtain a weighted attention output feature; the weighted initial prediction result and the weighted attention output feature are element-wise added and fused to obtain a fused feature; The fused feature is residually connected with the initial prediction result to obtain a fused prediction result.
5. The method according to claim 1, characterized in that The weather type is determined according to the real-time meteorological conditions of the wind and solar power stations. When extreme weather is identified, the power forecast data is corrected using a correction model that matches the extreme weather. The steps of obtaining the corrected power forecast data include: Collecting real-time data from the meteorological monitoring system of the wind and solar power stations, the real-time data from the meteorological monitoring system includes solar irradiance, ambient temperature, cloud cover, visibility of the photovoltaic power station, and wind speed, wind direction, air pressure, and humidity of the wind power station; standardizing the real-time data from the meteorological monitoring system to obtain meteorological feature vectors; Determine an extreme weather determination threshold based on historical data, wherein the extreme weather determination threshold includes a sandstorm weather threshold and a severe convective weather threshold for a photovoltaic power station, and a typhoon weather threshold and an icing weather threshold for a wind farm; construct a decision tree classification model based on the extreme weather determination threshold, map the input meteorological feature vector to a predefined weather type space, and obtain a corresponding weather type label; According to the weather type label, a corresponding correction model is selected from a pre-trained correction model library, the correction model library including a sandstorm weather correction model, a severe convective weather correction model, a typhoon weather correction model, and an icing weather correction model. The sandstorm weather correction model performs photovoltaic power correction based on the attenuation coefficient, the severe convective weather correction model performs power fluctuation correction based on the dynamic change of cloud cover, the typhoon weather correction model performs wind power correction based on the wind speed cutoff characteristic, and the icing weather correction model performs power loss correction based on ice thickness. The power prediction data is input into the selected correction model to obtain the corrected power prediction data.
6. The method according to claim 5, characterized in that The training methods for the revised model include: Based on the historical data collected by the meteorological monitoring system, a training sample set is constructed according to the labeling rules of different extreme weathers, wherein the labeling rules include the PM10 concentration and visibility combined threshold judgment rule for sandstorm weather, the radar echo intensity and precipitation intensity combined threshold judgment rule for severe convective weather, the wind speed and pressure gradient combined threshold judgment rule for typhoon weather, and the temperature and relative humidity combined threshold judgment rule for icy weather. The historical data that meets the labeling rules are marked as extreme weather samples of the corresponding type, and a training sample set containing meteorological characteristic data, power prediction data, and actual power data is established; Performing data enhancement processing on the training sample set, constructing continuous time series samples using a sliding time window method, generating data missing scenarios using a random masking strategy, and simulating sensor errors by adding Gaussian noise to form an enhanced training sample set; The modified model is trained using a phased training strategy. In the pre-training phase, a contrastive learning method is used to construct positive and negative sample pairs. The feature extraction capability of the model is trained by maximizing the feature similarity of similar samples and minimizing the feature similarity of heterogeneous samples. In the fine-tuning training stage, the enhanced training sample set is used for supervised training, and a hierarchical learning rate strategy is adopted to calculate the loss function for different types of extreme weather samples, and the model parameters of the correction model are updated through gradient accumulation. In the optimization training stage, knowledge distillation technology is used to transfer the knowledge of multiple expert models to a single model. Bootstrapping random sampling is used to construct multiple training subsets. The modified model is trained on different subsets to obtain integrated results. The optimal model parameter combination is selected through cross-validation method.
7. The method according to claim 1, characterized in that Building an error compensation model based on historical prediction errors, inputting the corrected power prediction data into the error compensation model to obtain an error compensation value, and obtaining a final power prediction result according to the corrected power prediction data and the error compensation value; The step of comparing the final power prediction result with the actual power data to obtain an error correction amount, wherein the error correction amount is used to update the compensation parameters of the error compensation model comprises: Perform time series analysis and power interval analysis on the historical errors of power forecasting to obtain the error distribution characteristics of different power levels and the error change pattern in time series; Based on the error distribution characteristics and error change patterns, an error compensation model is constructed, wherein the error compensation model includes a deterministic compensation layer and an adaptive compensation layer, wherein the deterministic compensation layer is used to correct power interval deviation and time periodic error, and the adaptive compensation layer uses a sliding time window mechanism to dynamically update the error sample set, and a recursive neural network is trained based on the error sample set to predict short-term error trends; Receive the corrected power prediction data, extract the compensation feature vector at the current moment, the compensation feature vector includes the historical error sequence feature and the current power interval feature, input the compensation feature vector into the deterministic compensation layer and the adaptive compensation layer respectively, adopt an adaptive weight fusion strategy to combine the outputs of the deterministic compensation layer and the adaptive compensation layer to obtain an error compensation value, and the weight allocation ratio of the adaptive weight fusion strategy is dynamically adjusted based on the historical prediction accuracy of the deterministic compensation layer and the adaptive compensation layer; Combining the corrected power prediction data with the error compensation value to obtain a final power prediction result; The final power prediction result is compared with the actual power data, and the residual error after compensation is calculated. Based on the residual error, the deviation correction coefficient of the deterministic compensation layer is updated, the hidden layer connection weights of the recursive neural network are adjusted, and the weight allocation ratio of the adaptive weight fusion strategy is updated.
8. A power prediction accuracy improvement system for wind and solar power stations, used to implement the method described in any one of claims 1 to 7, characterized in that: include: The first unit is used to obtain historical power data, meteorological data and equipment operation data of the wind and solar power station through a data preprocessing module, perform time series decomposition on the historical power data to obtain multiple frequency components, perform spatial interpolation processing on the meteorological data to obtain continuous meteorological features, perform outlier detection and correction on the equipment operation data to obtain equipment features, and perform feature fusion on the multiple frequency components, continuous meteorological features and equipment features to obtain fused feature data; The second unit is used to construct a deep learning prediction model based on the fused feature data, wherein the deep learning prediction model includes a feature extraction layer and a prediction layer, wherein the feature extraction layer uses a convolutional neural network to extract spatial features of the fused feature data, and the prediction layer uses a long short-term memory network to process the spatial features to obtain an initial prediction result; an attention mechanism is introduced to perform weight assignment on the spatial features to obtain weighted features, and the weighted features are combined with the initial prediction results to obtain power prediction data; The third unit is used to determine the weather type according to the real-time meteorological conditions of the wind and solar power stations. When extreme weather is identified, the power forecast data is corrected by using a correction model that matches the extreme weather to obtain corrected power forecast data; an error compensation model is constructed based on historical prediction errors, the corrected power forecast data is input into the error compensation model to obtain an error compensation value, and a final power forecast result is obtained according to the corrected power forecast data and the error compensation value; The final power prediction result is compared with the actual power data to obtain an error correction amount, and the error correction amount is used to update the compensation parameters of the error compensation model.
9. 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 7.
10. 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 7 is implemented.
Citation Information
Cited By
Medium and long term wind power probabilistic prediction method and system based on time sequence attention
CN120069231A
Offshore wind power prediction method and system based on high-frequency update weather forecast
CN120106618A
Power prediction method, system and equipment based on wind power plant super-capacity energy storage and medium
CN120150133A
Gas concentration prediction model establishment method and system based on big data
CN120316421A
New energy power generation prediction model optimization method and system based on artificial intelligence
CN120497920A