Wind power prediction method
By dividing historical wind power sequences into power segments at different time scales and generating power labels, and combining this with numerical weather prediction data to extract meteorological information, the problem of insufficient information utilization in existing wind power forecasting is solved, thereby improving the accuracy and stability of forecasts.
Patent Information
- Application Number
- CN202611546840.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-08
- Publication Date
- 2026-11-03
AI Technical Summary
Existing wind power forecasting methods struggle to fully coordinate and utilize changes in power information across different time spans, and their selective use of meteorological variables is insufficient, leading to inadequate accuracy and stability in the forecast results.
The historical wind power sequence is divided into power segments at different time scales, corresponding power labels are generated, and power context representations are injected in descending order of time span. Variable-level meteorological labels are generated by combining numerical weather prediction data, meteorological information is extracted through correlation, and the target-scale power representation is updated to output the wind power prediction sequence.
It improves the accuracy and stability of wind power forecasting across multiple time domains, ensuring that power change information across different time spans is effectively preserved and meteorological information is selectively utilized.
Smart Images

Figure CN123034370A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to wind power generation technology; and more particularly to a method for predicting wind power output. Background Technology
[0002] Wind power forecasting is a fundamental aspect of wind farm operation, grid dispatching, reserve capacity allocation, electricity market application, and renewable energy grid integration and consumption. As wind power installed capacity continues to increase, wind power forecasting errors will further affect power generation planning, spinning reserve allocation, market transaction arrangements, and real-time power balance. Therefore, it is necessary to continuously improve the accuracy and stability of wind power forecasting across different forecasting time domains.
[0003] Wind power output varies with atmospheric processes and turbine operating conditions, and its historical power series simultaneously contains information on changes over different time spans. Power changes over longer time spans can reflect trends resulting from the evolution of weather systems and overall wind field changes, while power changes over shorter time spans can reflect fluctuations caused by gusts, turbulence, and local wind conditions. When encoding historical wind power series using a single time scale, the same set of model parameters needs to handle both trends and fluctuations simultaneously. This can easily lead to changes over longer time spans being weakened by local fluctuations, or changes over shorter time spans being lost during long-sequence compression.
[0004] To preserve information across different time spans, some existing prediction methods process historical sequences separately across multiple time scales. However, when features from different time scales are extracted independently and then concatenated, added, or weighted, a clear order of information interaction between the different time scales is lacking. Power information from longer time spans cannot consistently constrain power representations from shorter time spans, and features from multiple scales may interfere with each other due to differences in time location and the number of labels, resulting in an insufficient combination between long-term trends and local fluctuations.
[0005] Besides historical power data, numerical weather prediction (NMR) data is a crucial exogenous input for wind power forecasting. NMR data typically includes variables such as wind speed, wind direction, temperature, air pressure, and humidity, and covers both historical and forecast periods. Historical meteorological data helps establish the correlation between meteorological conditions and past power changes, while forecast data provides prior information about future wind conditions. Different meteorological variables have different physical meanings and temporal variations, and their impact on wind power forecasting results changes depending on historical power conditions and the forecast time domain.
[0006] Some existing methods directly concatenate multiple meteorological variables into a unified vector during the input stage, and then process it together with historical power features. This process easily mixes the semantics of different meteorological variables, making it difficult for the model to determine which meteorological information should be extracted first under the current power state. Some highly fluctuating exogenous variables may also interfere with the relatively stable historical power change information, resulting in a lack of selectivity in the effect of meteorological data on the prediction results.
[0007] Therefore, existing wind power forecasting methods still need to further improve the coordinated use of power information across different time spans and enhance the selective use of multiple meteorological variables under different historical power conditions. Summary of the Invention
[0008] The embodiments of this application aim to at least address the problems in existing wind power forecasting processes, such as insufficient utilization of historical wind power variation information over different time spans and difficulty in extracting relevant information from multiple meteorological variables in conjunction with the current power status.
[0009] Embodiments of this application provide a wind power prediction method, including: The historical wind power sequence is divided into power segments, and multiple corresponding power tags are generated based on the power segments. The multiple power tags include power tags at multiple time scales. Following a scale order with decreasing time span, the power context representation is determined based on the power tag of the current time scale, and the power context representation is injected into the power tag of the next time scale, until the power tag of the target time scale is obtained, where the target time scale is the last time scale in the scale order. Determine the target-scale power representation, including the global power context label, based on the power label of the target time scale; Based on numerical weather forecast data covering historical and forecast periods, variable-level meteorological labels corresponding to different meteorological variables are generated. Based on the correlation between the global power context label and the variable-level meteorological label, meteorological information is extracted from the variable-level meteorological label to obtain a meteorological enhancement representation; The target-scale power representation is updated based on the meteorological enhancement representation, and the wind power prediction sequence for the prediction period is output based on the updated target-scale power representation.
[0010] In some embodiments, dividing the historical wind power sequence into power segments and generating multiple corresponding power tags based on the power segments includes: continuously truncating the historical wind power sequence along the time dimension according to multiple preset sequence lengths and corresponding division step sizes to obtain power segments corresponding to multiple time scales; and generating corresponding power tags based on the power segments at each time scale.
[0011] In some embodiments, generating corresponding power tags based on power segments at each time scale includes: performing linear projection on each power segment at each time scale to obtain a corresponding vector tag; and adding position encoding to the corresponding vector tag based on the position of each power segment in the historical wind power sequence to obtain the power tag.
[0012] In some embodiments, the step of determining a power context representation based on the power tag of the current time scale in descending order of time span, and injecting the power context representation into the power tag of the next time scale until the power tag of the target time scale is obtained, includes: performing temporal encoding on the power tag of the current time scale to obtain the power context representation; performing alignment processing on the power context representation to obtain an aligned power context representation that is consistent with the power tag of the next time scale in terms of tag number and feature dimension; adding the aligned power context representation into the power tag of the next time scale through an injection process to obtain the fused power tag of the next time scale; and using the next time scale as the current time scale, repeating the temporal encoding, alignment processing, and injection processing until the power tag of the target time scale is obtained.
[0013] In some embodiments, the timing encoding, the alignment process, and the injection process include: timing encoding the power markers of the current time scale using a Transformer encoder; projecting the power context representation and linearly interpolating the projected power context representation according to the number of power markers in the next time scale to obtain the aligned power context representation; weighting the aligned power context representation according to learnable coefficients and adding the weighted aligned power context representation to the power markers of the next time scale.
[0014] In some embodiments, determining the target-scale power representation including the global power context marker based on the power markers of the target time scale includes: setting an initial global power marker in the marker sequence composed of the power markers of the target time scale; when injecting the power context representation of the previous time scale into the power markers of the target time scale, the power context representation is only injected into the power markers of the target time scale and not into the initial global power marker; performing time-series encoding on the power markers of the target time scale after injection and the initial global power marker to obtain the target-scale power representation, and determining the time-series encoded initial global power marker as the global power context marker.
[0015] In some embodiments, generating variable-level meteorological tags corresponding to different meteorological variables based on numerical weather forecast data covering historical and forecast periods includes: splitting the numerical weather forecast data according to the meteorological variable dimension to obtain meteorological variable channels that respectively contain time series data of the corresponding meteorological variables in the historical and forecast periods; mapping each meteorological variable channel along the time dimension to obtain variable-level meteorological tags corresponding one-to-one with each meteorological variable channel; wherein the meteorological variables include at least two of wind speed, wind direction, temperature, air pressure, and humidity.
[0016] In some embodiments, the step of extracting meteorological information from the variable-level meteorological tags based on the correlation between the global power context tag and the variable-level meteorological tags to obtain a meteorological enhancement representation includes: mapping the global power context tag to a query vector, and mapping the variable-level meteorological tags to key vectors and value vectors respectively; determining the interaction weights corresponding to each variable-level meteorological tag based on the correlation between the query vector and each of the key vectors; and weighting each of the value vectors according to the interaction weights to obtain the meteorological enhancement representation.
[0017] In some embodiments, updating the target-scale power representation according to the meteorological enhancement representation and outputting the wind power prediction sequence for the prediction period according to the updated target-scale power representation includes: writing the meteorological enhancement representation into the position of the global power context marker in the target-scale power representation to obtain the updated target-scale power representation; performing feedforward processing on the updated target-scale power representation and outputting the wind power prediction values for multiple time steps within the prediction period according to the feedforward processing result.
[0018] In some embodiments, before dividing the historical wind power sequence into power segments and generating variable-level meteorological labels corresponding to different meteorological variables based on numerical weather forecast data covering historical and forecast periods, the method further includes: performing at least one of time alignment, missing value imputation, outlier processing, and normalization on the historical wind power sequence and the numerical weather forecast data; and when the numerical weather forecast data includes a wind direction variable, converting the wind direction variable into sine and cosine components.
[0019] By employing the above technical solution, the embodiments of this application divide the historical wind power sequence into power segments corresponding to different time scales and generate corresponding power tags, so that power changes under different time spans are preserved; according to the scale order of decreasing time span, the power context representation of the current time scale is injected into the power tag of the next time scale, so that the power tag of the target time scale contains power information of the previous time scale while preserving local power changes; a global power context tag is determined based on the power tag of the target time scale, and meteorological information is extracted from the variable-level meteorological tags corresponding to different meteorological variables using the global power context tag, so that the extracted meteorological information matches the current historical power state; then the meteorological enhancement representation is used to update the target scale power representation and output the wind power prediction sequence for the prediction period, thereby improving the accuracy and stability of wind power prediction in multiple prediction time domains. Attached Figure Description
[0020] Figure 1 This is a flowchart of a wind power prediction method according to an embodiment of this application; Figure 2 This is a flowchart illustrating the power segmentation and power tag generation process according to one embodiment of this application. Figure 3 A flowchart illustrating the inter-scale injection of power context representation according to one embodiment of this application; Figure 4 This is a flowchart illustrating the determination of target-scale power representation and global power context labeling according to an embodiment of this application. Figure 5 This is a flowchart illustrating the generation of variable-level meteorological markers according to one embodiment of this application; Figure 6 This is a flowchart illustrating the selective interaction of meteorological information according to one embodiment of this application. Figure 7 This is a flowchart illustrating the weather enhancement representation update and forecast output of one embodiment of this application.
[0021] Figure 8 A schematic diagram of the overall architecture of the selective multi-scale Transformer model used in one embodiment of this application; Figure 9 This is a schematic diagram of continuous wind power prediction results according to an embodiment of this application. Detailed Implementation
[0022] The embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. These embodiments are used to illustrate the complete technical solution and its technical principles. Technical contents that are compatible with each other in different embodiments can be combined and implemented. The model dimensions, number of layers, training rounds, and data processing parameters, which are not specifically limited, can be determined based on the wind farm data sampling interval, prediction time domain, computing resources, and application accuracy requirements.
[0023] In the first embodiment, as Figure 1 As shown, this embodiment provides a wind power prediction method, including the following steps: S1. Divide the historical wind power sequence into power segments, and generate multiple corresponding power tags based on the power segments. The multiple power tags include power tags at multiple time scales. S2. According to the scale order of decreasing time span, determine the power context representation based on the power tag of the current time scale, and inject the power context representation into the power tag of the next time scale, until the power tag of the target time scale is obtained, where the target time scale is the last time scale in the scale order; S3. Determine the target-scale power representation, including the global power context label, based on the power label of the target time scale; S4. Based on numerical weather forecast data covering historical and forecast periods, generate variable-level meteorological labels corresponding to different meteorological variables; S5. Based on the correlation between the global power context marker and the variable-level meteorological marker, extract meteorological information from the variable-level meteorological marker to obtain a meteorological enhancement representation; S6. Update the target-scale power representation according to the meteorological enhancement representation, and output the wind power prediction sequence for the prediction period according to the updated target-scale power representation.
[0024] Numerical Weather Prediction (NWP) data consists of weather forecasts obtained at the time of prediction. Data covering the prediction period originates from the future weather forecasts output by the NWP model at that time, distinct from actual meteorological data collected after the prediction period has ended. Historical wind power sequences are mapped to NWP data using a unified timestamp to ensure that model training and prediction applications utilize data available at the prediction time.
[0025] When performing the above steps, let the current prediction time be... The historical window length is The forecast period includes At each time step, the historical wind power sequence is denoted as... Numerical weather forecast data is denoted as The method learns the mapping relationship from historical wind power series and numerical weather prediction data to future wind power prediction series, which can be expressed as: (1) In equation (1), This is a wind power forecast sequence for the forecast period; For parameters Predictive models; Historical wind power output sequence; Numerical weather forecast data covering both historical and forecast periods.
[0026] Historical wind power series can be represented as: (2) In equation (2), For the current prediction time The corresponding historical wind power output; This represents the number of sampling points included in the historical window. Numerical weather forecast data includes... A meteorological variable can be expressed as ,in, For the number of meteorological variables, This refers to the total length of the historical and forecast periods covered by numerical weather prediction data.
[0027] In some embodiments, data preprocessing is performed before steps S1 and S4. The data preprocessing includes at least one of time alignment, missing value imputation, outlier handling, and normalization. Time alignment ensures that historical wind power sequences and numerical weather forecast data have consistent sampling intervals and corresponding timestamps; missing value imputation fills in null values caused by equipment acquisition interruptions or missing forecast data; outlier handling corrects or deletes power or meteorological values exceeding a preset effective range; and normalization reduces the impact of different units and numerical ranges on model training.
[0028] When numerical weather prediction data includes wind direction variables, the wind direction variable is converted into sine and cosine components. This process preserves the periodic relationship of the wind direction angle and avoids the model judging wind directions close to zero degrees and close to 360 degrees as far apart due to large numerical differences. After conversion, the wind direction variable forms two meteorological variable channels, which, together with other meteorological variable channels, generate variable-level meteorological labels.
[0029] like Figure 2 As shown, in one embodiment of this example, step S1 includes: S11. According to multiple preset sequence lengths and corresponding division step sizes, the historical wind power sequence is continuously truncated along the time dimension to obtain power segments corresponding to multiple time scales respectively; S12. Generate corresponding power tags based on the power segments at each time scale.
[0030] A power segment is a subsequence of power continuously extracted from a historical wind power sequence. The preset sequence length determines the number of consecutive sampling points included in a power segment, and the step size determines the time interval between the starting positions of adjacent power segments. When the preset sequence length is large, a power segment covers a longer time span and can preserve power changes over a longer period of time; when the preset sequence length is small, a power segment covers a shorter time span and can preserve local power fluctuations.
[0031] Let the number of time scales be , No. The preset sequence length for each time scale is The corresponding partitioning step size is For lengths of When continuously extracting historical wind power sequences, the first... Number of power segments obtained at each time scale It can be represented as: (3) In equation (3), This is the time scale number. ; For the first Number of power segments at each time scale; For the first The preset sequence length for each time scale; For the first The step size for dividing each time scale; This is for floor function. Multiple time scales are arranged in descending order of the time span of their corresponding power segments, with the target time scale being the last time scale in this arrangement.
[0032] In some embodiments, step S12 includes: S121. Perform linear projection on each power segment at each time scale to obtain the corresponding vector label; S122. Based on the position of each power segment in the historical wind power sequence, add position encoding to the corresponding vector marker to obtain the power marker.
[0033] For the A time scale, and power segments of that time scale are arranged as follows Each power segment is composed of It consists of continuous power values. Power segments of different lengths are mapped to a unified [value] through linear projection. The feature space is divided into 3D, and corresponding positional encoding is added. Power label sequence at each time scale It can be represented as: (4) In equation (4), For the first A power label sequence at several time scales; For the first A power segment matrix with multiple time scales; For the first Linear projection matrices at multiple time scales; To be consistent with this time scale The position code corresponding to each power segment; The feature dimension labeled for power.
[0034] Position encoding enables the model to distinguish the sequential positions of different power segments within the history window. Different time scales use corresponding projection matrices and position encodings to accommodate varying power segment lengths and tag counts. After step S1, the following is obtained: The power tag sequences reflect the changes in historical wind power over different time spans.
[0035] like Figure 3 As shown, in one embodiment of this example, step S2 includes: S21. Perform time-series encoding on the power marker of the current time scale to obtain the power context representation; S22. Align the power context representation to obtain an aligned power context representation that is consistent with the power label of the next time scale in terms of the number of labels and feature dimensions; S23. The aligned power context representation is added to the power tag of the next time scale through injection processing to obtain the fused power tag of the next time scale; S24. Using the next time scale as the current time scale, repeat the timing encoding, alignment processing, and injection processing until the power label of the target time scale is obtained.
[0036] Processing begins from the timescale with the longest time span. The fusion power at the current timescale is denoted as... For the first time scale, the initial fused power label is the power label obtained in step S1 for that time scale, i.e. The timing coding of the fused power marker at the current time scale can be represented as: (5) In equation (5), For the current time scale, it is the timing encoder; For the first A power context representation at each time scale. A time-series encoder is used to handle the temporal dependencies between different power markers within the same time scale. In one embodiment of this example, the time-series encoder employs a Transformer encoder, extracting the time-series features at that time scale through self-attention and a feedforward network.
[0037] Because the power segment lengths and partitioning step sizes differ between adjacent time scales, the corresponding number of power tags may also differ. When the power context representation of the current time scale is directly added to the power tags of the next time scale, the two may be inconsistent in terms of the number of tags or feature dimensions. Therefore, the power context representation of the current time scale is first projected, and then linearly interpolated according to the number of power tags in the next time scale to obtain an aligned power context representation. (6) In equation (6), For the first The time scale is aligned to the first Power context representation after each time scale; The feature space projection matrix; Linear interpolation performed along the time position; This represents the number of power tags for the next time scale. In one embodiment, It is initialized as an identity matrix to maintain the feature space of adjacent time scales being basically consistent in the early stage of model training, and updated according to the prediction loss during training.
[0038] Injecting the aligned power context representation into the power tag of the next time scale can be represented as: (7) In equation (7), For the injection of the first The power context after the first time scale Fusion power markers across time scales; For the first Original power labels for each time scale; These are learnable coefficients. In one embodiment, The initial value is set to This allows the model to retain the original power information of the next time scale in the early stages of training and gradually learn the injection strength of the power context of the previous time scale.
[0039] Subsequently, the first Using one time scale as the current time scale, The processing shown in equations (5) to (7) is performed until the sequential injection between adjacent time scales is completed. This processing allows the power context with a large time span to be summarized within the corresponding time scale first, then aligned according to the marker position of the next time scale, and added to the next time scale as a context bias. Thus, the power marker of the target time scale retains local fluctuations while containing power change information injected step by step from the previous time scale.
[0040] When there are two time scales, the power context representation of the first time scale is directly injected into the power tag of the target time scale after projection and linear interpolation; when there are more than two time scales, the fused power tag of the intermediate time scale continues to be time-coded and aligned, so that the information of the previous time scale is continuously transmitted to the target time scale in scale order.
[0041] like Figure 4 As shown, in one embodiment of this example, step S3 includes: S31. Set an initial global power flag in the flag sequence composed of power flags at the target time scale; S32. When injecting the power context representation of the previous time scale into the power tag of the target time scale, the power context representation is injected only into the power tag of the target time scale, and not into the initial global power tag; S33. The power tag of the target time scale after injection and the initial global power tag are jointly time-coded to obtain the target scale power representation, and the time-coded initial global power tag is determined as the global power context tag.
[0042] Set a learnable initial global power label at the target time scale. And appending it to the power label sequence at the target time scale can be represented as: (8) In equation (8), The index of the target time scale; Power labels for the target time scale; Initial global power flag; This is the tag sequence after appending the initial global power tag; This is a sequence concatenation operation for tags.
[0043] The power context representation of the previous time scale, after interpolation, is compared with that of the target time scale. Each power marker has a one-to-one temporal position relationship. The aligned power context means that only power markers of the target time scale are injected, and the initial global power marker is not directly injected. The initial global power marker does not correspond to a specific time segment in the history window, avoiding the direct writing of the context that has undergone time position interpolation into the global marker that does not have a specific time position.
[0044] After inter-scale injection, the power markers for the target timescale and the initial global power marker are input into the temporal encoder. The power markers for the target timescale already contain the power context injected from previous timescales. The initial global power markers undergo self-attention processing with these power markers to obtain the overall power state of the current historical samples. The initial global power markers after temporal encoding are determined as the global power context markers. The global power context markers change with the input samples, and their values are jointly determined by the power markers for the current target timescale.
[0045] The target-scale power representation includes a time-coded target time-scale power tag and a global power context tag. The target time-scale power tag is used to retain local power information with temporal location, and the global power context tag is used to summarize multiple time-scale information of historical power and serve as a query source for selective interaction of meteorological information in step S5.
[0046] like Figure 5 As shown, in one embodiment of this example, step S4 includes: S41. Split the numerical weather forecast data according to the meteorological variable dimension to obtain meteorological variable channels that respectively contain time series data of the corresponding meteorological variables in the historical period and the forecast period; S42. Map each meteorological variable channel along the time dimension to obtain variable-level meteorological labels that correspond one-to-one with each meteorological variable channel.
[0047] Numerical weather forecast data may include at least two of the following: wind speed, wind direction, temperature, air pressure, and humidity. Each meteorological variable channel contains continuous data for that variable within historical windows and forecast periods. Historical data reflects the correlation between meteorological changes and past wind power output, while forecast data provides information on future meteorological changes.
[0048] Will Each meteorological variable channel is projected along the time dimension to... From the dimensional feature space, we can obtain the variable-level meteorological label matrix: (9) In equation (9), A variable-level meteorological label matrix; This is numerical weather prediction data; This is the projection matrix that maps along the time dimension. In this embodiment, different meteorological variables use the same projection matrix but maintain different variable rows; in another embodiment, different meteorological variables can use separately trained mapping functions to adapt to the numerical distribution of different meteorological variables.
[0049] Meteorological labels are generated separately for each variable channel, so that each meteorological label corresponds to a specific meteorological variable. Compared with concatenating multiple meteorological variables into a unified feature at the input stage, this process preserves the semantic boundaries of variables such as wind speed, wind direction, temperature, air pressure, and humidity, enabling subsequent correlation calculations to assign different interaction weights among meteorological variables.
[0050] like Figure 6 As shown, in one embodiment of this example, step S5 includes: S51. Map the global power context marker to a query vector, and map the variable-level meteorological marker to a key vector and a value vector respectively; S52. Determine the interaction weights corresponding to each variable-level meteorological marker based on the correlation between the query vector and each of the key vectors; S53. The value vectors are weighted according to the interaction weights to obtain the meteorological enhancement representation.
[0051] The global power context label contains the historical power state after inter-scale injection, while the variable-level meteorological labels contain information on the changes of the corresponding meteorological variables in the historical and forecast periods, respectively. Using the global power context label as the query source allows the interaction weights of meteorological variables to be determined by the current historical power state.
[0052] Let the global power context be labeled as The variable-level meteorological label matrix is Query vector Key vector matrix Sum value vector matrix It can be represented as: (10) In equation (10), To query the mapping weight, Map weights to keys. Values are mapped to weights; Reflects the current multi-scale power state; Used to calculate the correlation between different meteorological variables and the query vector; Used to extract meteorological information based on interaction weights.
[0053] In one embodiment of this example, cross-attention is used to compute the weather enhancement representation. : (11) In equation (11), This is the transpose of the key vector matrix; The feature dimension of the key vector; Used to convert correlation results into interaction weights corresponding to meteorological labels at each variable level; This is the meteorological enhancement representation obtained by weighting the value vector according to the interaction weights.
[0054] The interaction weights shown in Equation (11) vary with the global power context label and the variable-level meteorological label. The same meteorological variable can obtain different weights under different historical power states, and different meteorological variables can also obtain different weights in the same prediction sample. Therefore, meteorological variables such as wind speed, wind direction, temperature, air pressure, or humidity will not participate in each prediction in a fixed proportion.
[0055] like Figure 7 As shown, in one embodiment of this example, step S6 includes: S61. Write the meteorological enhancement representation into the position of the global power context marker in the target-scale power representation to obtain the updated target-scale power representation; S62. Perform feedforward processing on the updated target-scale power representation, and output the wind power prediction values for multiple time steps within the prediction period based on the feedforward processing results.
[0056] In step S61, the meteorological enhancement representation is used to replace or update the position of the original global power context marker in the target-scale power representation. Other power markers at the target time scale continue to retain multi-scale power information with temporal location. After writing, the target-scale power representation simultaneously includes the power marker injected across scales and the global marker fused with meteorological variable information.
[0057] In step S62, the updated target-scale power representation is input into the feedforward network and the prediction head. The feedforward network performs a nonlinear transformation on each label, and the prediction head maps the processed target-scale power representation to multiple power values for the prediction period. The prediction result can be expressed as: (12) In equation (12), For the prediction period, the first Wind power forecast at each time step ; This represents the number of time steps within the predicted time period.
[0058] like Figure 8As shown, in one embodiment of this example, the wind power prediction model adopts the Selective Multi-Scale Transformer (SMST) model. Figure 8 The blue area on the left is the selective meteorological interaction module, which corresponds to the variable-level meteorological tag generation and selective meteorological information interaction process described in steps S4 and S5. Figure 8 The green areas in the middle and right show the multi-scale power processing process, corresponding to the multi-timescale power tag generation, inter-scale injection of power context, and global power context tag determination processes described in steps S1 to S3. Figure 8 The Patch represents a power segment, the Token represents a marker, the NWP represents a numerical weather forecast, φ represents a projection operation, and the circular symbol represents a stitching operation.
[0059] Figure 8 The middle section, from bottom to top, illustrates the overall processing relationship after the convergence of historical wind power and meteorological information. Historical wind power input first undergoes multi-scale patch partitioning, generating power tags for multiple time scales. Subsequently, a coarse-to-fine cross-scale information injection mechanism is implemented, allowing power contexts from different time scales to sequentially participate in determining the target time scale power tag, resulting in a global power context tag. The NWP meteorological input on the left undergoes NWP variable-level segmentation to obtain NWP tokens, which correspond to the variable-level meteorological tags in this embodiment. The global power context tag and the variable-level meteorological tag in the target-scale power representation selectively interact through cross-attention, and the interaction result is used to update the target-scale power representation. The updated representation is then processed sequentially through layer normalization, a feedforward layer, and another layer normalization, before the prediction head outputs the wind power prediction sequence for the prediction period.
[0060] Specifically, Figure 8 The multi-scale patch partitioning in the lower middle section corresponds to step S1. The historical wind power input corresponds to the historical wind power sequence used in step S1; normalization and patch partitioning mean that the historical wind power sequence is normalized and divided into power segments along the time dimension according to multiple preset sequence lengths; patch projection and position embedding mean that the power segments at each time scale are projected and position codes are added to generate power tags for the corresponding time scale. Figure 8 In this context, K× indicates that the above power segmentation and power tag generation processes are executed at K time scales, and K corresponds to the number of time scales in this embodiment.
[0061] Specifically, Figure 8The coarse-to-fine cross-scale information injection mechanism on the right corresponds to the power context injection described in step S2, which is performed in descending order of time span. This part sets up multiple cross-scale injection processing units, and cross-scale injection is performed sequentially between adjacent time scales; after the processing of each time scale is completed, the resulting power context continues to participate in the processing of the next time scale, until the target time scale. Figure 8 The rightmost enlarged cross-scale injection illustrates the processing relationship between single scales: the upsampled coarse-scale token from the previous time scale, which has already undergone alignment, is weighted by learnable coefficients α and then combined with the power token of the current time scale at the injection point; the combined power token enters the encoder for temporal encoding, where Q, K, and V represent the query, key, and value used in the attention processing, respectively; the encoding result is then upsampled to adjust the number of tokens and output along the next scale direction as the upsampled coarse-scale token used in the next cross-scale injection. The above processing corresponds to steps S21 to S24 and the temporal encoding, alignment, and injection processes described in equations (5) to (7).
[0062] Figure 8 The global token in this embodiment corresponds to the initial global power tag or the global power context tag obtained after time-series encoding, and is only set at the target time scale in the scale order. When performing cross-scale injection at the target time scale, the upsampled coarse-scale token acts on the target time scale power tag with a time position correspondence at the injection point, and is not directly written into the initial global power tag; after the inter-scale injection is completed, the power tag of the target time scale and the initial global power tag form a tag sequence through the splicing relationship shown in the figure and enter the encoder together, so that the initial global power tag obtains the overall power state from the target time scale power tag that already contains power information of multiple time scales. The time-series encoded global token corresponds to the global power context tag described in step S33, and together with the time-series encoded target time scale power tag, constitutes the target scale power representation.
[0063] Specifically, Figure 8The selective meteorological interaction module on the left corresponds to steps S4 and S5. The NWP meteorological input corresponds to numerical weather prediction (NWP) data covering historical and forecast periods. NWP variable-level tokenization represents processing the numerical weather prediction data according to the meteorological variable dimension and projecting each meteorological variable channel along the time dimension to obtain the NWP tokens in the figure; where tokenization in the figure represents the variable-level tag generation process, and NWP tokens correspond to the variable-level meteorological tags described in this embodiment. Thus, each NWP token corresponds to the time series information of a specific meteorological variable within the historical and forecast periods. This processing corresponds to the meteorological variable channel determination and variable-level meteorological tag generation described in steps S41 and S42, respectively.
[0064] In the selective meteorological interaction module, the global token serves as the source of query information for the current historical power state, and NWP tokens serve as the source of meteorological information to be selected. The two enter into cross-attention calculation. The global power context label is mapped to obtain the query vector Q in step S51, and the meteorological labels at each variable level are mapped to obtain the key vector K and the value vector V, respectively. The interaction weights corresponding to different meteorological variables are determined according to the correlation between Q and each K, and then the interaction weights are used to weight V to obtain the meteorological enhancement representation described in step S53, corresponding to the query, key, value and weighting calculation process shown in equations (10) and (11). The meteorological enhancement representation is used to update the target-scale power representation, and the updated target-scale power representation enters the target-scale power representation. Figure 8 The middle layer is normalized, the feedforward layer is processed, and the layer is normalized, and then mapped by the prediction head to the wind power prediction sequence for the prediction period. Figure 8 In this context, L× indicates that the corresponding model processing unit can be executed L times according to the model settings, where L represents the number of corresponding model layers. The above processing corresponds to the meteorological enhancement representation update and forecast output process described in step S6.
[0065] During the model training phase, a sliding time window is used to construct training samples. Each training sample includes the wind power sequence within the historical window, numerical weather prediction data covering the historical window and the prediction period, and the actual wind power sequence for the prediction period. When the mean squared error (MSE) is used as the training loss, the training objective can be expressed as: (13) In equation (13), The training loss for the model; For the first Predicted power at each time step; This represents the actual power at the corresponding time step; To predict the duration of the time period. Model parameters. Update based on the training loss. During training, the Mean Absolute Error (MAE) or a weighted combination of MSE and MAE can also be used as the loss function.
[0066] After the model completes training, during the prediction application phase, it receives the latest historical wind power data and the latest numerical weather forecast data at preset time intervals, updates the inputs corresponding to the historical window and prediction period, and executes steps S1 to S6 in sequence to output the wind power prediction sequence for multiple future time steps.
[0067] In the second embodiment, based on the method described in the first embodiment, the experimental setup and prediction results of the method are explained. The experiment uses real data from a wind farm in northern China, covering the period from January 1, 2021 to December 31, 2021, with a sampling interval of 15 minutes, comprising approximately 35,000 time steps. Each time step includes wind power data and numerical weather prediction variables, including predicted wind speed, wind direction, temperature, and other atmospheric variables. The dataset is divided into training, validation, and test sets according to time sequence to avoid using data from periods after the test phase during the training phase.
[0068] The historical window length for all models was set to 336 time steps, corresponding to 84 hours. Prediction period lengths were set to 24, 48, 96, and 144 time steps, corresponding to 6 hours, 12 hours, 24 hours, and 36 hours, respectively. For the power segment-based baseline model, the power segment length was set to 16, and the partition step size was set to 8; for SMST, the power segment length lists were set to 48 and 8, corresponding to partition step size lists of 24 and 4. The models employed the Adam optimizer, using MSE as the training objective, and performed early stopping based on the validation set results.
[0069] Table 1 lists the experimental setup.
[0070]
[0071] Table 2 lists the MSE and MAE of the baseline model using only historical power data for different forecast periods. The smaller the value, the lower the forecast error.
[0072]
[0073] Table 3 lists the model performance using both historical power data and numerical weather prediction data covering the forecast period.
[0074]
[0075] According to Table 3, the MSE and MAE of SMST were lower than those of the baseline models using future numerical weather prediction data in all four forecast periods. Compared with the suboptimal results for the corresponding forecast periods, the MSE of SMST decreased by 27.49% and the MAE decreased by 15.13% at 24 forecast steps; the MSE decreased by 21.18% and the MAE decreased by 12.40% at 48 forecast steps; the MSE decreased by 32.55% and the MAE decreased by 18.62% at 96 forecast steps; and the MSE decreased by 25.65% and the MAE decreased by 14.51% at 144 forecast steps.
[0076] Figure 9 The diagram illustrates a continuous 1000-step prediction trajectory formed by connecting 24 non-overlapping prediction results. The horizontal axis represents the time step corresponding to the continuous test data, the left vertical axis represents the target value after processing the experimental data, and the right vertical axis represents the wind speed variable in the numerical weather forecast data. In the legend, the actual value represents the actual wind power at the corresponding time step, the predicted value represents the wind power prediction result output in this embodiment, and the wind speed represents the numerical weather forecast wind speed at the corresponding time step. The predicted values generally follow the main changes in the actual values and can reflect the main power fluctuations within the continuous test interval. In sections where the correlation between the change information provided by the numerical weather forecast wind speed and the actual power change is low, the deviation between the predicted and actual values increases accordingly, indicating that the quality of the numerical weather forecast data affects the prediction results.
[0077] To verify the effectiveness of multi-scale power modeling and selective meteorological interaction, ablation experiments were conducted using a complete model, a model without multi-scale power modeling, and a model without cross-attention. When removing multi-scale power modeling, a single time-scale encoder replaced the multi-scale power processing; when removing cross-attention, a multilayer perceptron replaced the cross-attention in selective meteorological interaction. Table 4 lists the ablation experiment results.
[0078]
[0079] After removing cross-attention, the MSE predicted at 24, 48, 96, and 144 steps increased by 49.2%, 23.1%, 15.9%, and 31.3% respectively compared to the complete model, indicating that selecting variable-level meteorological information based on global power context labeling has a significant effect on multiple forecast periods. After removing multi-scale power modeling, the MSE predicted at 24 steps increased by 26.9%, while the MSE predicted at 48, 96, and 144 steps increased by 3.9%, 3.9%, and 3.3% respectively, indicating that multi-timescale power information has a more significant effect on short-term forecasts and can still reduce forecast errors over longer forecast periods.
[0080] The experimental results support the following technical relationships: processing historical power at multiple time scales can improve prediction results; selective interaction between variable-level meteorological labels and global power context labels can further reduce prediction errors; when the complete model simultaneously employs inter-scale power context injection and selective interaction of meteorological information, it achieves lower prediction errors across multiple prediction periods.
[0081] It should be noted that the number of time scales, power segment length, partition step size, historical window, and prediction period used in the experiment are intended to illustrate a feasible parameter setting. In practical applications, other parameters can be selected based on the sampling interval of the wind farm, the type of prediction task, and the frequency of historical data changes. Without altering the processing relationship of "injecting power context representations in descending order of time span and selecting variable-level meteorological information based on the obtained global power context," the corresponding parameter adjustments can still serve as embodiments of this application.
[0082] The above embodiments illustrate the processes of power segment generation, inter-scale injection, global power context determination, variable-level meteorological information selection, and prediction output. Those skilled in the art can set model parameters such as the number of encoder layers, feature dimensions, number of attention heads, and training batches based on the content disclosed in this specification. These settings are used to implement the processing procedures already disclosed in this specification without altering the data relationships between the various processing objects.
Claims
1. A wind power prediction method, characterized in that, include: The historical wind power sequence is divided into power segments, and multiple corresponding power tags are generated based on the power segments. The multiple power tags include power tags at multiple time scales. Following a scale order with decreasing time span, the power context representation is determined based on the power tag of the current time scale, and the power context representation is injected into the power tag of the next time scale, until the power tag of the target time scale is obtained, where the target time scale is the last time scale in the scale order. Determine the target-scale power representation, including the global power context label, based on the power label of the target time scale; Based on numerical weather forecast data covering historical and forecast periods, variable-level meteorological labels corresponding to different meteorological variables are generated. Based on the correlation between the global power context label and the variable-level meteorological label, meteorological information is extracted from the variable-level meteorological label to obtain a meteorological enhancement representation; The target-scale power representation is updated based on the meteorological enhancement representation, and the wind power prediction sequence for the prediction period is output based on the updated target-scale power representation.
2. The wind power prediction method according to claim 1, characterized in that, The process of dividing historical wind power sequences into power segments and generating multiple corresponding power tags based on these power segments includes: According to multiple preset sequence lengths and corresponding division step sizes, the historical wind power sequence is continuously truncated along the time dimension to obtain power segments corresponding to multiple time scales. Power tags are generated based on power segments at each time scale.
3. The wind power prediction method according to claim 2, characterized in that, The generation of corresponding power tags based on power segments at each time scale includes: Linear projection is performed on each power segment at each time scale to obtain the corresponding vector label; Based on the position of each power segment in the historical wind power sequence, a position code is added to the corresponding vector label to obtain the power label.
4. The wind power prediction method according to claim 1, characterized in that, The process of determining a power context representation based on the power tag of the current time scale, following a decreasing scale order, and then injecting the power context representation into the power tag of the next time scale, until the power tag of the target time scale is obtained, includes: The power marker at the current time scale is time-series encoded to obtain the power context representation; The power context representation is aligned to obtain an aligned power context representation that is consistent with the power label of the next time scale in terms of the number of labels and feature dimensions. The aligned power context representation is added to the power tag of the next time scale through injection processing to obtain the fused power tag of the next time scale; Using the next time scale as the current time scale, repeat the timing encoding, alignment, and injection processes until the power label of the target time scale is obtained.
5. The wind power prediction method according to claim 4, characterized in that, The timing encoding, the alignment process, and the injection process include: The power markers at the current time scale are time-coded using a Transformer encoder; The power context representation is projected, and the projected power context representation is linearly interpolated according to the number of power tags in the next time scale to obtain the aligned power context representation; The aligned power context representation is weighted according to learnable coefficients, and the weighted aligned power context representation is added to the power label of the next time scale.
6. The wind power prediction method according to claim 1, characterized in that, Determining the target-scale power representation including the global power context label based on the power label of the target time scale includes: An initial global power flag is set in the flag sequence composed of power flags at the target time scale; When injecting the power context representation of the previous time scale into the power tag of the target time scale, the power context representation is injected only into the power tag of the target time scale, and not into the initial global power tag; The power tag of the target time scale after injection and the initial global power tag are jointly time-coded to obtain the target scale power representation, and the time-coded initial global power tag is determined as the global power context tag.
7. The wind power prediction method according to claim 1, characterized in that, The process of generating variable-level meteorological labels corresponding to different meteorological variables based on numerical weather forecast data covering historical and forecast periods includes: The numerical weather forecast data is split according to the meteorological variable dimension to obtain meteorological variable channels that respectively contain time series data of the corresponding meteorological variables in the historical period and the forecast period. Mapping each meteorological variable channel along the time dimension yields variable-level meteorological labels that correspond one-to-one with each meteorological variable channel. The meteorological variables include at least two of the following: wind speed, wind direction, temperature, air pressure, and humidity.
8. The wind power prediction method according to claim 1, characterized in that, The step of extracting meteorological information from the variable-level meteorological labels based on the correlation between the global power context label and the variable-level meteorological labels to obtain a meteorological enhancement representation includes: The global power context marker is mapped to a query vector, and the variable-level meteorological marker is mapped to a key vector and a value vector, respectively. Based on the correlation between the query vector and each of the key vectors, determine the interaction weights corresponding to each variable-level meteorological label; The value vectors are weighted according to the interaction weights to obtain the meteorological enhancement representation.
9. The wind power prediction method according to claim 1, characterized in that, The step of updating the target-scale power representation based on the meteorological enhancement representation, and outputting the wind power prediction sequence for the prediction period based on the updated target-scale power representation, includes: The meteorological enhancement representation is written into the location of the global power context marker in the target-scale power representation to obtain the updated target-scale power representation; The updated target-scale power representation is subjected to feedforward processing, and the wind power prediction values for multiple time steps within the prediction period are output based on the feedforward processing results.
10. The wind power prediction method according to claim 1, characterized in that, Before dividing the historical wind power sequence into power segments and generating variable-level meteorological labels corresponding to different meteorological variables based on numerical weather forecast data covering historical and forecast periods, the process also includes: At least one of the following processes is performed on the historical wind power sequence and the numerical weather forecast data: time alignment, missing value imputation, outlier processing, and normalization. When the numerical weather forecast data includes wind direction variables, the wind direction variables are converted into sine and cosine components.
