A wind farm cluster power prediction method and system
Patent Information
- Application Number
- CN202611391240.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-09
- Publication Date
- 2026-10-09
AI Technical Summary
[0004]本发明针对现有海上风电场功率预测方法中尾流空间耦合考虑不足、在线更新效率低下、时序大模型本地部署门槛高、预测结果难以直接支撑调度决策以及长期滚动运行稳定性不足的问题,提供一种风电场集群功率预测方法及系统,通过数据驱动方式构建动态尾流邻接矩阵,充分挖掘风机间空间耦合信息,提升集群功率预测精度;结合簇级特征聚合和轻量化PatchTST时序大模型,在本地电子设备上实现人工智能预测推理;引入离线基座预训练、在线热启动微调和周期强化校准,保障长期滚动运行的稳定性,形成面向电网调度、有功控制和场站运维的智能决策支撑
(1)本发明方法针对现有风电功率预测方法多侧重时间序列拟合、对风机间尾流空间耦合关系刻画不足的问题,本发明提出基于真实运行数据拟合尾流衰减规律的动态尾流建模方法,构建随风向变化的尾流邻接矩阵,并结合风机聚类实现空间特征高效聚合,从而提高人工智能模型对复杂海上风况和集群功率耦合机理的表征能力,为后续功率预测和调度决策提供更可靠的数据基础。
Smart Images

Figure CN122890367A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence prediction and intelligent decision-making technology for power systems, and specifically relates to a method and system for predicting the power of wind farm clusters. Background Technology
[0002] With the continuous expansion of wind power grid connection, ultra-short-term power forecasting for offshore wind farms has become a crucial technical foundation for grid dispatch planning, active power control of wind farms, power trading, site operation safety assessment, and intelligent decision-making for new energy. Offshore wind farms are typically characterized by large turbine scale, complex array layout, rapid wind condition changes, significant wake effects, and high data security requirements. Therefore, the forecasting model not only needs to learn the pattern of total power change over time, but also needs to express the wake coupling relationship between different wind turbines due to the prevailing wind direction and spatial location, and provide interpretable and rapidly updatable artificial intelligence forecasting and decision-making results for grid dispatch and site operation.
[0003] Existing wind power prediction methods mainly include physical model methods, traditional machine learning methods, and deep learning methods. Most methods typically model individual wind turbines independently or use simplified wake models like Jensen's to describe the inter-turbine relationships. These methods rely on manually setting wake expansion coefficients, turbulence parameters, and wind field geometry assumptions, making it difficult to accurately fit the complex wake attenuation, multi-turbine superposition effects, and dynamic changes of real offshore wind fields. This results in significant prediction errors for downstream turbines and limited overall prediction accuracy. While traditional machine learning and recurrent neural network methods can learn power variation patterns from historical data, they often treat the power of individual turbines or the entire field as independent time series, underutilizing wake spatial coupling information. Furthermore, they require daily retraining based on the latest data, leading to lengthy updates and difficulty in quickly tracking sudden wind changes. Over long-term rolling operation, they are prone to parameter accumulation drift and exacerbated overfitting. While existing Transformer-based time-series models offer advantages in modeling long sequences, they suffer from large parameter counts and high computational complexity, typically relying on GPU computing power and making stable deployment on low-computing-power devices at wind farms difficult. Furthermore, uploading offshore wind farm operational data to cloud platforms for training and inference can introduce data security, communication latency, and operational cost issues. If the model continues training by sampling the previous fine-tuned model for an extended period, it is prone to parameter cumulative drift, catastrophic forgetting, and exacerbated overfitting. Therefore, there is an urgent need for an offshore wind farm power prediction method that can simultaneously consider wake spatial coupling, adapt to low-computing-power local deployment, and support rapid online updates. Summary of the Invention
[0004] This invention addresses the shortcomings of existing offshore wind farm power prediction methods, such as insufficient consideration of wake spatial coupling, low online update efficiency, high barriers to local deployment of large-scale time-series models, difficulty in directly supporting scheduling decisions with prediction results, and insufficient stability in long-term rolling operation. It provides a wind farm cluster power prediction method and system. This method constructs a dynamic wake adjacency matrix through a data-driven approach, fully mining the spatial coupling information between wind turbines to improve cluster power prediction accuracy. It combines cluster-level feature aggregation and a lightweight PatchTST large-scale time-series model to achieve artificial intelligence prediction and inference on local electronic devices. The invention introduces offline base pre-training, online hot-start fine-tuning, and periodic reinforcement calibration to ensure the stability of long-term rolling operation, forming intelligent decision support for grid scheduling, active power control, and wind farm operation and maintenance. This invention is applicable to scenarios involving local AI deployment in offshore wind farms, ultra-short-term power prediction for grid scheduling, and intelligent operation and maintenance decision-making for wind farms.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: A method for predicting the power of a wind farm cluster includes the following steps: Acquire spatial coordinates, power generation capacity, and meteorological environment data of each wind turbine within the offshore wind farm; Calculate the distance matrix and azimuth matrix between wind turbines based on spatial coordinates; A dynamic wake mask matrix is generated based on the azimuth matrix and the prevailing wind direction across the field. A wake adjacency matrix is constructed based on the distance matrix, meteorological environmental data, and dynamic wake mask matrix; Calculate global time-series basic characteristics based on power generation and meteorological environment data; Based on the wake adjacency matrix, calculate the wake space derived features; Wind turbines are clustered based on the wake adjacency matrix to calculate cluster-level spatial coupling characteristics; Multi-source features are spliced and standardized, and multi-source spatiotemporal fusion feature input samples and power output labels are generated through a sliding window; Constructing a large-scale PatchTST time series model; PatchTST time series large model is trained and updated online before deployment using multi-source spatiotemporal fusion input samples and power output labels; Predict future power using the updated PatchTST time series large model.
[0006] To optimize the above technical solution, the specific measures also include: Furthermore, the calculation of the distance matrix and azimuth matrix between wind turbines based on spatial coordinates specifically involves: The wind farm includes N Typhoon machine, number i The plane coordinates of the typhoon are The distance between the fans is expressed as: ; In the formula, For the first Typhoon machine and the first The distance between typhoon generators The first The horizontal and vertical axes of the typhoon generator The first The x and y coordinates of the typhoon turbines; the distances between all the turbines form a distance matrix; The azimuth angle between the fans can be calculated using the following formula: ; In the formula, For the first Typhoon machine to the The azimuth angle of the typhoon generator. It is the arctangent function in the fourth quadrant. The first The horizontal and vertical axes of the typhoon generator The first The horizontal and vertical coordinates of the typhoon generators; the azimuth angles between all the generators form an azimuth matrix; The specific steps for generating a dynamic wake mask matrix based on the azimuth matrix and the prevailing wind direction are as follows: The average wind direction from all wind direction sensors or the wind direction value representing a specific wind turbine is used as the basis for determining the wind direction. Dominant wind direction at all times Calculate the minimum angle between the wind turbine and the prevailing wind direction of the entire field: ; In the formula, for Time of the first Typhoon machine points to the first The minimum angle between the azimuth of the typhoon generator and the prevailing wind direction. For the first Typhoon machine to the The azimuth angle of the typhoon generator; Set wake angle threshold And generate a dynamic wake mask matrix. Specifically: ; In the formula, for Elements in the time-varying dynamic wake mask matrix Used to exclude the self-connection wake of the fan; a mask of 1 indicates the first... The typhoon machine is in the first Within the wake influence range of a typhoon, a mask of 0 indicates no wake influence.
[0007] Furthermore, the specific steps for constructing the wake adjacency matrix based on the distance matrix, meteorological environmental data, and dynamic wake mask matrix are as follows: For all satisfied The wake effect affects the fan, extracting the first Wind speed of typhoon , No. Wind speed of typhoon and spatial distance , No. Typhoon machines relative to the first The typhoon turbine is the upstream turbine, the first Typhoon machines relative to the first The typhoon turbine is a downstream turbine and is retained. and Valid samples; for Elements in the time-varying dynamic wake mask matrix; Calculate wind speed attenuation rate Specifically: ; In the formula, For the first Typhoon machine to the first Typhoon machine The wind speed attenuation rate at any given time: when the wind speed of the downstream fan is higher than that of the upstream fan, the original wind speed attenuation rate is negative and is set to 0. spatial distance With wind speed attenuation rate Composition of wake attenuation fitting samples By iterating through all sampling times and wind turbine pairs that meet the conditions, a full set of wake attenuation samples is obtained. , is represented as: ; When the wake attenuation is a full sample set The number of valid samples is greater than the number of minimum fitted samples. At that time, the exponential decay function was used to fit the variation of wind speed decay rate with the distance between wind turbines, specifically: ; In the formula, It is the fitted wind speed attenuation rate. The initial wake intensity coefficient, The wake attenuation velocity coefficient is calculated using the least squares method on the full sample set of wake attenuation. Fitting and Wind turbine distance matrix ; Construct the distance decay matrix Specifically: ; In the formula, The initial wake intensity coefficient, The wake attenuation velocity coefficient, For the first Typhoon machine and the first The distance between typhoon generators; generate Timing Wake Adjacency Matrix Specifically: ; In the formula, , for Time of the first Typhoon machine to the first The intensity of the wake effect of a typhoon, where N represents the number of typhoon turbines. For dynamic wake mask matrix, This is the Hadamard product of corresponding element-wise multiplication. This is the distance decay matrix.
[0008] Furthermore, the calculation of global time-series basic features based on power generation and meteorological environment data specifically includes: global time-series basic features. Represented as: ; In the formula, The average wind speed for the entire venue. and These are the sine and cosine components of the average wind direction across the entire field, respectively. The total power of the entire field, The average ambient temperature across the entire venue. For turbulence intensity, and These are the sine and cosine codes for the hourly cycle, respectively. and These are the sine and cosine codes for the daily cycle, respectively.
[0009] Furthermore, the calculation of wake space-derived features based on the wake adjacency matrix specifically involves: The characteristics of the wake effect of a single machine are calculated as follows: ; In the formula, for Time of the first The total wake intensity of the typhoon affected by the upstream wind turbines. for Time of the first Typhoon machine to the first The wake of a typhoon affects its intensity. Number of wind turbines; The cluster-level wake structure characteristics are calculated as follows: ; In the formula, for Time of the first The impact of typhoon turbines on the output wake of downstream wind turbines. for Time of the first Typhoon machine to the first The wake of a typhoon affects its intensity; The calculation of the upstream and downstream wind speed difference is as follows: ; In the formula, Due to the difference in wind speed between upstream and downstream, For the first The wind speed of the typhoon generator. For the first The wind speed of the typhoon machine, the first Typhoon machines relative to the first The typhoon turbine is the upstream turbine, the first Typhoon machines relative to the first The typhoon turbine is a downstream turbine; For the The typhoon generator calculates its weighted average upstream wind speed difference. , is represented as: ; In the formula, for Time of the first Typhoon machine to the first The wake of a typhoon affects its intensity. To prevent extremely small positive numbers with a denominator of zero; The weighting of the wake effect is calculated as follows: For each downstream wind turbine Normalize its upstream wake effect, and express it as: ; In the formula, For wind turbine For the fan The relative wake contribution; Calculate the first Combined wake impact of typhoons Specifically: ; This results in the wake space characteristics generated by each wind turbine. , is represented as: ; The characteristics of the wake space generated by the entire wind turbine are represented as follows: ; In the formula, It is a characteristic derived from the wake space of the entire wind turbine.
[0010] Furthermore, the method of clustering wind turbines based on the wake adjacency matrix to calculate cluster-level spatial coupling features specifically involves: Calculate the average wake adjacency matrix over the entire time period And construct a symmetric wake similarity matrix. Specifically: ; In the formula, For the wake adjacency matrix The matrix obtained by averaging along the time dimension for transpose, This is the normalized symmetric wake similarity matrix; Set the number of wind turbine clusters to The k-means algorithm using cosine distance is used to... Clustering is performed, repeated 10 times. Obtain the cluster label for each wind turbine; record the first cluster label. Clusters are: ; In the formula, For the first A cluster of wind turbines, For the first The cluster number to which the typhoon generator belongs; The cluster-level average wind speed is calculated as follows: ; In the formula, The average wind speed at the cluster level. For the first The number of wind turbines contained in a cluster. For the first A cluster of wind turbines, For the first The wind speed of the typhoon generator; The cluster-level average power is calculated as follows: ; In the formula, The average power at the cluster level, For the first A cluster of wind turbines, It is a power statistic; The cluster-level average temperature is calculated as follows: ; In the formula, The average temperature at the cluster level. This refers to statistics on ambient temperature. The calculation of cluster-level power fluctuations is as follows: ; In the formula, For cluster-level power fluctuations, It is a power statistic; This represents the function for calculating standard deviation. Construct the wake intensity matrix as follows: ; In the formula, For the first The wind turbine cluster to the first The average wake influence intensity of each wind turbine cluster For any two wind turbine clusters, for Time of the first Typhoon machine to the first The wake intensity of typhoon generators; the wake intensity matrix is composed of the average wake intensity across all clusters. Expand it row by row into a one-dimensional feature vector , , This refers to the number of wind turbine clusters; This yields the cluster-level spatial coupling characteristics, expressed as: ; In the formula, It is a cluster-level spatial coupling feature.
[0011] Furthermore, the construction of the PatchTST time series large model specifically involves: The PatchTST temporal large-scale model consists of an input layer, a Patch attention encoder, a temporal dimension mapping layer, and a gated residual output head; the input layer is used to slice the input sample tensor to obtain... Each patch is converted into a patch embedding. The patch attention encoder is used to perform attention encoding on the patch embedding to obtain the feature representation of each patch. The time-dimensional mapping layer is used to represent the feature dimensions of a patch from the number of patches. Mapping to prediction step size The gated residual output head generates future features based on the feature representation of the patch after dimension mapping. Total power prediction.
[0012] Furthermore, the input layer specifically comprises: For input sample tensors According to length and step length By slicing the input sample tensor along the time dimension, we obtain... Number of patches Determined by the following formula: ; In the formula, The number of patches generated for each input sample tensor Patch length The sliding step size for the patch. For batch size, For the length of the history window, For multi-source spatiotemporal fusion feature dimensions; Flatten each patch to its length. The vector is mapped to the hidden dimension through the Patch projection layer. And superimposed with learnable positional encoding Get Patch embedding ; The Patch attention encoder includes a multi-head self-attention layer and a feedforward network, employing a residual connection and layer normalization structure. The multi-head self-attention layer is represented as follows: ; ; In the formula, This represents multi-head self-attention, where r is the index of the attention head. , To focus on the number of heads, For querying the matrix, The key matrix, For value matrices, This indicates a splicing operation. Indicates the first r Attention score of each attention head To output the projection matrix, express function, Let r be the query matrix of the attention head. For the first r The key matrix of each attention head. For the first r The value matrix of each attention head, The dimension of the key vector; The gated residual output head includes a first linear layer, an ELU activation function, a Dropout layer, a second linear layer, a gated linear layer, a jump-connection projection layer, and a layer normalization layer. The output of the gated residual output head... Represented as: ; In the formula, As input features, It is a normalization layer. This represents the activation function. For the parameters of the gated linear layer, and These are nonlinear transformation path parameters. For Dropout layer, It is the ELU activation function. These are the parameters for jump connection projection.
[0013] Furthermore, the pre-deployment training and online update of the PatchTST time series large model specifically involves: Before selection The multi-source spatiotemporal fusion input samples and power output labels at each time step were used as the offline base training set. A PatchTST time-series large-scale model was trained based on the offline base training set and the AdamW optimizer, with a base learning rate of [missing information]. The weight decay coefficient is The number of training rounds is Batch size is During training, cosine annealing learning rate scheduling is used, with a minimum learning rate set. and adopt the maximum range as Gradient clipping is performed, and the pre-trained weights of the base are saved after training. The mean of the input samples is calculated based on the offline base training set. and standard deviation and the average power output label and standard deviation This is used to standardize the offline base training set; random sampling is performed from the standardized base training set. Group samples are used to construct a replay pool; During online hot-start fine-tuning, according to the update cycle Get the latest Using one sample as a fine-tuning window, , The fine-tuning window samples are standardized, and then concatenated with the replay pool samples to form a hybrid fine-tuning set. Pre-trained weights from the pedestal are loaded for each round of online updates. As the initial weights for the PatchTST time-series large model, the learning rate is fine-tuned. Fine-tuning the number of rounds Weight decay coefficient Training the hybrid fine-tuning set; Each interval A reinforcement calibration is performed once every update cycle. The reinforcement calibration includes: recalculating the mean of the input samples based on the current fine-tuning window. and standard deviation and the average power output label and standard deviation Randomly select from the current fine-tuning window Group samples replace some of the old samples in the replay pool, and training is performed using stratified learning rates. wheel, To enhance the additional training rounds during the calibration phase, the parameters of the PatchTST time series large model remain fixed after the daily update.
[0014] This invention also proposes a wind farm cluster power prediction system, comprising: The data acquisition module is used to acquire the spatial coordinates, power generation, and meteorological environment data of each wind turbine in the offshore wind farm. The wake spatial coupling modeling module is used to calculate the distance matrix and azimuth matrix between wind turbines based on spatial coordinates; generate a dynamic wake mask matrix based on the azimuth matrix and the prevailing wind direction; and construct a wake adjacency matrix based on the distance matrix, meteorological environmental data, and the dynamic wake mask matrix. The multi-source spatiotemporal feature construction module is used to calculate global time-series basic features based on power generation and meteorological environment data. Based on the wake adjacency matrix, calculate the wake spatial derivation features; based on the wake adjacency matrix, cluster the wind turbines to calculate the cluster-level spatial coupling features. The sample set construction module is used to stitch together and standardize multi-source features, and generate multi-source spatiotemporal fusion feature input samples and power output labels through a sliding window; The network building module is used to build large-scale PatchTST time series models; The rolling update module uses multi-source spatiotemporal fusion input samples and power output labels to perform pre-deployment training and online updates of the PatchTST time series large model; The decision output module is used to predict future power using the updated PatchTST time series large model.
[0015] The beneficial effects of this invention are: (1) In view of the problem that existing wind power prediction methods focus on time series fitting and do not adequately characterize the spatial coupling relationship of wake between wind turbines, this invention proposes a dynamic wake modeling method based on fitting the wake attenuation law of real operating data, constructs a wake adjacency matrix that changes with wind direction, and combines wind turbine clustering to achieve efficient aggregation of spatial features, thereby improving the ability of artificial intelligence models to represent complex offshore wind conditions and cluster power coupling mechanisms, and providing a more reliable data foundation for subsequent power prediction and scheduling decisions.
[0016] (2) In view of the problem that the existing methods have insufficient input feature information density and are difficult to support cluster-level intelligent prediction, this invention proposes a high information density three-dimensional time series feature construction method composed of global time series basic features, wake space derived features and cluster-level spatial coupling features. This enables the artificial intelligence prediction model to simultaneously integrate meteorological changes, power changes, wake effects, inter-cluster coupling relationship of wind turbines and daily periodic information, avoiding the spatial information loss caused by a single time series input, thereby improving the accuracy and stability of wind farm cluster total power prediction.
[0017] (3) In view of the problems that traditional time series large models have a large number of parameters, rely on GPUs, and are difficult to deploy locally on the wind farm side and serve real-time decision-making, this invention adopts the Patch block attention mechanism to reduce computational complexity and combines a lightweight design with a small number of parameters, so that the model can run on ordinary industrial CPU equipment or edge computing terminals; the running data does not need to be uploaded to the cloud, which not only ensures the data security of the wind farm, but also reduces communication latency and operating costs, and is suitable for the deployment conditions of local artificial intelligence decision-making systems in wind farms.
[0018] (4) In view of the problems that existing models are prone to distribution drift, catastrophic forgetting and prediction performance degradation during long-term rolling operation, this invention constructs an intelligent rolling update mechanism that combines offline base pre-training, replay pool hybrid fine-tuning and periodic reinforcement calibration, so that the model can quickly track sudden changes in wind conditions and maintain the memory of historical typical operating conditions, thereby improving the ability of ultra-short-term prediction results to continuously support power grid dispatching plans, active power control and operation and maintenance decisions. Attached Figure Description
[0019] Figure 1 This is a flowchart of the wind farm cluster power prediction method proposed in this invention.
[0020] Figure 2 This is a diagram showing the spatial layout of a wind farm and its wake effect network.
[0021] Figure 3 This is a heat map of the average wake influence intensity matrix between wind turbines in a wind farm.
[0022] Figure 4A comparison chart showing the rolling prediction performance of the PatchTST model and the traditional LSTM-Transformer model.
[0023] Figure 5 A comparison chart of rolling prediction full-cycle power curves. Detailed Implementation
[0024] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0025] Example 1 This invention proposes a method for predicting the power of a wind farm cluster. The process of this method is as follows: Figure 1 As shown, it includes the following steps: S1: Acquire the spatial coordinates, power generation, and meteorological environment data of each wind turbine in the offshore wind farm; used to generate multi-source spatiotemporal fusion feature input samples and power output labels; meteorological environment data includes wind speed, wind direction, and ambient temperature.
[0026] S1.1: Calculate the distance matrix and azimuth matrix between wind turbines based on spatial coordinates; specifically: The wind farm includes N Typhoon machine, number i The plane coordinates of the typhoon are The distance between the fans is expressed as: ; In the formula, For the first Typhoon machine and the first The distance between typhoon generators The first The horizontal and vertical axes of the typhoon generator The first The x and y coordinates of the typhoon turbines; the distances between all the turbines form a distance matrix; The azimuth angle between the fans can be calculated using the following formula: ; In the formula, For the first Typhoon machine to the The azimuth angle of the typhoon generator. It is the arctangent function in the fourth quadrant. The first The horizontal and vertical axes of the typhoon generator The first The horizontal and vertical coordinates of the typhoon generators; the azimuth angles between all the generators form an azimuth matrix.
[0027] S1.2: Generate a dynamic wake mask matrix based on the azimuth matrix and the prevailing wind direction across the entire field; specifically: The average wind direction from all wind direction sensors or the wind direction value representing a specific wind turbine is used as the basis for determining the wind direction. Dominant wind direction at all times Calculate the minimum angle between the wind turbine and the prevailing wind direction of the entire field: ; In the formula, for Time of the first Typhoon machine points to the first The minimum angle between the azimuth of the typhoon generator and the prevailing wind direction. For the first Typhoon machine to the The azimuth angle of the typhoon generator; Set wake angle threshold And generate a dynamic wake mask matrix. Specifically: ; In the formula, for Elements in the time-varying dynamic wake mask matrix Used to exclude the self-connection wake of the fan; a mask of 1 indicates the first... The typhoon machine is in the first Within the wake influence range of a typhoon, a mask of 0 indicates no wake influence. Wake angle threshold. Used to determine whether two wind turbines form an upstream and downstream wake relationship under the current wind direction. If the value is too small, it may miss the actual wake effects caused by wind direction fluctuations, measurement errors, or wake diffusion; if... If the value is too large, a large number of wind turbines in directions other than the wake will be misidentified as wake-related objects, resulting in an overly dense dynamic adjacency matrix and weakening the physical directionality of the wake features. Therefore, the value range is set between 15° and 45° to balance the completeness of wake identification and the sparsity of adjacency relationships. In this embodiment, 30° is preferred, which can better adapt to the working conditions of strong wind direction fluctuations and wide wake diffusion range in offshore wind farms. Adjustments can be made based on wind direction measurement error, wind direction standard deviation, turbine spacing, prevailing wind direction stability at the site, and validation set prediction error. When wind direction fluctuations are large, turbine spacing is small, or wake diffusion is significant, adjustments can be made appropriately. When the wind direction is relatively stable, the wind turbines are arranged regularly, and the dynamic adjacency matrix is relatively dense, the speed can be appropriately reduced. Preferably, the threshold that minimizes the MAE, RMSE, or NRMSE of the validation set is selected from the candidate range.
[0028] S1.3: Construct a wake adjacency matrix based on the distance matrix, meteorological environmental data, and dynamic wake mask matrix; specifically: For all satisfied The wake effect affects the fan, extracting the first Wind speed of typhoon , No. Wind speed of typhoon and spatial distance , No. Typhoon machines relative to the first The typhoon turbine is the upstream turbine, the first Typhoon machines relative to the first The typhoon turbine is a downstream turbine and is retained. and Valid samples; for Elements in the time-varying dynamic wake mask matrix; Calculate wind speed attenuation rate Specifically: ; In the formula, For the first Typhoon machine to the first Typhoon machine The wind speed attenuation rate at any given time is set to 0 when the wind speed of the downstream wind turbine is higher than that of the upstream wind turbine. This is to avoid reverse interference to the wake attenuation fitting when the local wind speed in the downstream is higher than that in the upstream. spatial distance With wind speed attenuation rate Composition of wake attenuation fitting samples By iterating through all sampling times and wind turbine pairs that meet the conditions, a full set of wake attenuation samples is obtained. , is represented as: ; When the wake attenuation is a full sample set The number of valid samples is greater than the number of minimum fitted samples. At that time, the exponential decay function was used to fit the variation of wind speed decay rate with the distance between wind turbines, specifically: ; In the formula, It is the fitted wind speed attenuation rate. This is the initial wake intensity coefficient, reflecting the intensity of the wake's influence at close range. The wake attenuation velocity coefficient is calculated using the least squares method on the full sample set of wake attenuation. Fitting and Wind turbine distance matrix ; Construct the distance decay matrix Specifically: ; In the formula, The initial wake intensity coefficient, The wake attenuation velocity coefficient, For the first Typhoon machine and the first The distance between typhoon generators; generate Timing Wake Adjacency Matrix Specifically: ; In the formula, , for Time of the first Typhoon machine to the first The intensity of the wake effect of a typhoon, where N represents the number of typhoon turbines. For dynamic wake mask matrix, This is the Hadamard product of corresponding element-wise multiplication. This is the distance decay matrix.
[0029] S1.4: Calculate the global time-series basic characteristics based on power generation and meteorological environment data; specifically: Calculate the average wind speed across the entire field. : ; In the formula, N is the number of wind turbines. It is the first The wind speed of the typhoon fan at time t; Because wind direction is periodic, the average wind direction for the entire field is represented by sine and cosine components: ; ; In the formula, The wind direction angle is determined by the radius. and These are the sine and cosine components of the average wind direction across the entire field, respectively. Total power of the field Represented as: ; In the formula, It is a power statistic; Average ambient temperature Represented as: ; In the formula, This refers to statistics on ambient temperature. Turbulence intensity Represented as: ; In the formula, It is the first The wind speed of the typhoon at time t. The standard deviation of wind speed for a single unit. To prevent extremely small positive numbers with a denominator of zero; The sine and cosine encoding for hourly and daily cycles is performed as follows: ; ; ; ; In the formula, for Time corresponds to hour. It represents the day number in a year. and These are the sine and cosine codes for the hourly cycle, respectively. and These are the sine and cosine codes for the daily cycle, respectively. Global time series basic characteristics Represented as: ; In the formula, The average wind speed for the entire venue. and These are the sine and cosine components of the average wind direction across the entire field, respectively. The total power of the entire field, The average ambient temperature across the entire venue. For turbulence intensity, and These are the sine and cosine codes for the hourly cycle, respectively. and These are the sine and cosine codes for the daily cycle, respectively.
[0030] S1.5: Calculate the spatial derivative features of the wake based on the wake adjacency matrix; specifically: The characteristics of the wake effect of a single machine are calculated as follows: ; In the formula, for Time of the first The total wake intensity of the typhoon affected by the upstream wind turbines. for Time of the first Typhoon machine to the first The wake of a typhoon affects its intensity. Number of wind turbines; The cluster-level wake structure characteristics are calculated as follows: ; In the formula, for Time of the first The impact of typhoon turbines on the output wake of downstream wind turbines. for Time of the first Typhoon machine to the first The wake of a typhoon affects its intensity; The calculation of the upstream and downstream wind speed difference is as follows: ; In the formula, Due to the difference in wind speed between upstream and downstream, For the first The wind speed of the typhoon generator. For the first The wind speed of the typhoon machine, the first Typhoon machines relative to the first The typhoon turbine is the upstream turbine, the first Typhoon machines relative to the first The typhoon turbine is a downstream turbine; For the The typhoon generator calculates its weighted average upstream wind speed difference. , is represented as: ; In the formula, for Time of the first Typhoon machine to the first The wake of a typhoon affects its intensity. To prevent extremely small positive numbers with a denominator of zero; The weighting of the wake effect is calculated as follows: For each downstream wind turbine Normalize its upstream wake effect, and express it as: ; In the formula, For wind turbine For the fan The relative wake contribution; Calculate the first Combined wake impact of typhoons Specifically: ; This results in the wake space characteristics generated by each wind turbine. , is represented as: ; The characteristics of the wake space generated by the entire wind turbine are represented as follows: ; In the formula, It is a characteristic derived from the wake space of the entire wind turbine.
[0031] S1.6: Clustering of wind turbines based on the wake adjacency matrix to calculate cluster-level spatial coupling characteristics; specifically: Calculate the average wake adjacency matrix over the entire time period And construct a symmetric wake similarity matrix. Specifically: ; In the formula, For the wake adjacency matrix The matrix obtained by averaging along the time dimension for transpose, This is the normalized symmetric wake similarity matrix; Set the number of wind turbine clusters to The k-means algorithm using cosine distance is used to... Clustering is performed, repeated 10 times. Obtain the cluster label for each wind turbine; record the first cluster label. Clusters are: ; In the formula, For the first A cluster of wind turbines, For the first The cluster number to which the typhoon generator belongs; The cluster-level average wind speed is calculated as follows: ; In the formula, The average wind speed at the cluster level. For the first The number of wind turbines contained in a cluster. For the first A cluster of wind turbines, For the first The wind speed of the typhoon generator; The cluster-level average power is calculated as follows: ; In the formula, The average power at the cluster level, For the first A cluster of wind turbines, It is a power statistic; The cluster-level average temperature is calculated as follows: ; In the formula, The average temperature at the cluster level. This refers to statistics on ambient temperature. The calculation of cluster-level power fluctuations is as follows: ; In the formula, For cluster-level power fluctuations, It is a power statistic; This represents the function for calculating standard deviation. Construct the wake intensity matrix as follows: ; In the formula, For the first The wind turbine cluster to the first The average wake influence intensity of each wind turbine cluster For any two wind turbine clusters, for Time of the first Typhoon machine to the first The wake intensity of typhoon generators; the wake intensity matrix is composed of the average wake intensity across all clusters. Expand it row by row into a one-dimensional feature vector : ; In the formula, This is the wake intensity matrix for all clusters. Let m be the average wake influence intensity of the m-th wind turbine cluster on the n-th wind turbine cluster. , This refers to the number of wind turbine clusters; This yields the cluster-level spatial coupling characteristics, expressed as: ; In the formula, It is a cluster-level spatial coupling feature.
[0032] S1.7: Concatenate and standardize multi-source features, and generate multi-source spatiotemporal fusion feature input samples and power output labels through a sliding window; specifically: By concatenating the global temporal basic features, single-machine wake-derived features, and cluster-level spatial coupling features, we obtain the first... The high information density feature vector at each time step is as follows: ; In the formula, As a global fundamental feature, The wake characteristics of a single unit throughout the entire field, Cluster-level features; The total feature dimension can be expressed as: ; In the formula, As the global basic feature dimension, For single-machine wake feature dimensions, Cluster-level feature dimension; Therefore, the features at all times are arranged in chronological order to form a two-dimensional feature matrix, represented as follows: ; First, calculate the mean and standard deviation for each feature dimension in the training set, specifically: ; ; In the formula, For the training set dimensional features, The mean of the features in the training set dimension. The standard deviation of the training set dimension features. For feature dimension, ; All samples were standardized, specifically as follows: ; In the formula, The training set after standardization. The mean of the features in the training set dimension. The standard deviation of the training set dimension features. To prevent extremely small positive numbers with a denominator of zero; Constructing the sliding window sample is as follows: History window length , is represented as: ; In the formula, As a window to history, The sampling period; Predicted step size , is represented as: ; In the formula, For the prediction window, The sampling period; For the standardized feature matrix Samples are constructed using a sliding window, the first... The input of a sample can be represented as: ; In the formula, For the first Input of each sample, , The standardized feature matrix, The length of the history window; Correspondingly, the output label is future. The total power of the entire field in step can be expressed as: ; In the formula, The total output power of the entire field. If one training sample is generated for each sampling time step forward, then the total number of samples is: ; In the formula, For the sample size, This represents the total length of the time series. The model input tensor is formed as follows: ; In the formula, For the sample size, For the length of the history window, Feature dimensions for each time step; The model output tensor is: ; In the formula, Predict the number of steps for the future.
[0033] S2. Construct the PatchTST temporal model; the PatchTST temporal model includes an input layer, a Patch attention encoder, a temporal dimension mapping layer, and a gated residual output head; the input layer is used to slice the input sample tensor to obtain... Each patch is converted into a patch embedding. The patch attention encoder is used to perform attention encoding on the patch embedding to obtain the feature representation of each patch. The time-dimensional mapping layer is used to represent the feature dimensions of a patch from the number of patches. Mapping to prediction step size The gated residual output head generates future features based on the feature representation of the patch after dimension mapping. Total power prediction.
[0034] The input layer is specifically as follows: For input sample tensors According to length and step length By slicing the input sample tensor along the time dimension, we obtain... Number of patches Determined by the following formula: ; In the formula, The number of patches generated for each input sample tensor Patch length The sliding step size for the patch. For batch size, For the length of the history window, For multi-source spatiotemporal fusion feature dimensions; Flatten each patch to its length. The vector is mapped to the hidden dimension through the Patch projection layer. And superimposed with learnable positional encoding Get Patch embedding .
[0035] The Patch attention encoder consists of a multi-head self-attention layer and a feedforward network, employing a residual connection and layer normalization structure. The multi-head self-attention layer is represented as follows: ; ; In the formula, This represents multi-head self-attention, where r is the index of the attention head. , To focus on the number of heads, For querying the matrix, The key matrix, For value matrices, This indicates a splicing operation. Indicates the first r Attention score of each attention head To output the projection matrix, express function, Let r be the query matrix of the attention head. For the first r The key matrix of each attention head. For the first r The value matrix of each attention head, The dimension of the key vector.
[0036] The feedforward network uses the GELU activation function and Dropout.
[0037] The gated residual output head includes a first linear layer, an ELU activation function, a Dropout layer, a second linear layer, a gated linear layer, a jump-connected projection layer, and a layer normalization layer. The output of the gated residual output head... Represented as: ; In the formula, For input features, It is a normalization layer. This represents the activation function. For the parameters of the gated linear layer, and These are nonlinear transformation path parameters. For Dropout layer, It is the ELU activation function. These are the parameters for jump connection projection.
[0038] S3. Utilize multi-source spatiotemporal fusion input samples and power output labels to perform pre-deployment training and online updates of the PatchTST time-series large-scale model; specifically: Before selection The multi-source spatiotemporal fusion input samples and power output labels at each time step are used as the offline base training set. The length of historical data during the offline base pre-training stage is [missing information]. It needs to cover different wind speed ranges, wind direction ranges, power ramp-up processes, wake coupling states, and daily cycle variations. Models that are too small are unlikely to learn stable spatiotemporal correlations and are prone to overfitting to short-term conditions; if If the value is too large, it will increase the training cost, and the historical data from too early may have different distributions from the current equipment status or seasonal wind conditions. Therefore, the value range is set to 5,000-15,000 sampling steps. In this embodiment, it is preferred to use historical data of no less than 8,000 sampling steps as the base training set, which can cover a more comprehensive range of operating states. The sampling period can be adjusted based on the sampling period, seasonal span, wind condition variation, and model convergence. The adjustment can be appropriately increased when the sampling period is short, wind condition variations are complex, or the site size is large. When the station's operating conditions are stable, the historical data distribution differs significantly from the current distribution, or computing resources are limited, the speed can be appropriately reduced. Preferably, the selection criteria are based on the premise that the error of the validation set tends to stabilize and the error decrease due to further increasing the number of samples is not significant.
[0039] The PatchTST temporal large model was trained using an offline pedestal training set and the AdamW optimizer, with a base learning rate of [missing information]. The weight decay coefficient is The number of training rounds is Batch size is During training, cosine annealing learning rate scheduling is used, with a minimum learning rate set. and adopt the maximum range as Gradient clipping is performed, and the pre-trained weights of the base are saved after training. The mean of the input samples is calculated based on the offline base training set. and standard deviation and the average power output label and standard deviation This is used to standardize the offline base training set; random sampling is performed from the standardized base training set. Group samples are used to construct a replay pool; A set of samples is used to retain historical typical operating conditions during online fine-tuning, preventing the model from forgetting the general rules learned in the base stage by updating only based on the latest samples. If the size is too small, it will be difficult to cover typical wind conditions and wake states, and its ability to resist forgetting is insufficient. If the length is too large, it will weaken the weight of new samples in the fine-tuning process and increase the computational cost of online training. Therefore, the length of historical data in the offline base pre-training stage should be adjusted according to the settings. The value range is set to 50-300, and this embodiment prefers 100 samples to balance historical memory preservation and online update efficiency, which is suitable for the rapid fine-tuning scenario of lightweight PatchTST. The adjustment can be made based on the number of online samples, the size of the fine-tuning batch, the number of model parameters, and the degree of distribution drift. The size can be increased when there is significant fluctuation in the online samples or when forgetting is obvious. When there is a need to improve the model's response speed to the latest operating conditions or when computational resources are limited, the size can be reduced. Preferably, the playback pool samples cover different wind speeds, wind directions, power levels, and wake intensities.
[0040] Model training uses smoothing The loss function is expressed as: ; In the formula, This is the training loss value for the current batch. This is the sample index in the current batch. , For batch size, The predicted power value output by the model. This is the actual power value.
[0041] smooth loss function Specifically: ; In the formula, To calculate the difference between the predicted power and the actual power, This represents the absolute value of the prediction error. Smoothing threshold. This is used to control the transformation of the loss function from a quadratic penalty form in the small error interval to a linear penalty form in the large error interval; A smaller loss function is closer to MAE and has a stronger ability to resist outliers, but it reduces the ability to fit small errors to normal samples. A larger loss function is closer to MSE, which is beneficial to improve the prediction accuracy under normal operating conditions, but it is easily affected by outlier samples. Therefore, its value range is set between 0.01 and 0.10. In this embodiment, 0.05 is preferred, which takes into account both the accuracy of MSE and the ability of MAE to resist outliers. The RMSE can be adjusted based on the distribution of the absolute value of the training set residuals, the proportion of outliers, the intensity of wind fluctuations, and the validation set error index. When the proportion of outliers is high or a small number of large errors significantly increase the RMSE, the RMSE can be appropriately reduced. Value; when the data quality is good and it is necessary to improve the fitting accuracy of the normal power range, the value can be appropriately increased. value.
[0042] During online hot-start fine-tuning, according to the update cycle Get the latest Using one sample as a fine-tuning window, , The fine-tuning window samples are standardized, and then concatenated with the replay pool samples to form a hybrid fine-tuning set. Pre-trained weights from the pedestal are loaded for each round of online updates. As the initial weights for the PatchTST time-series large model, the learning rate is fine-tuned. Fine-tuning the number of rounds Weight decay coefficient The hybrid fine-tuning set is trained; the purpose of this stage is to adapt to the latest wind conditions without compromising the generality of the base model. Too few fine-tuning rounds will result in insufficient model adaptation, while too many rounds will easily lead to overfitting to short-term samples and increase online computation time. Therefore, the number of fine-tuning rounds is limited. The training duration is set to 3-10 rounds, with 5 rounds being the preferred option in this embodiment. The training time can be adjusted based on the online validation error, the degree of recent sample distribution drift, and the training time. When the latest data differs significantly from the base training data and the validation set error continues to decrease, the number of training rounds can be increased. When the prediction curve oscillates, the validation error rebounds, or the training time exceeds the limit, the number of training rounds can be reduced.
[0043] Each interval A reinforcement calibration is performed once every update cycle. The reinforcement calibration includes: recalculating the mean of the input samples based on the current fine-tuning window. and standard deviation and the average power output label and standard deviation Randomly select from the current fine-tuning window Group samples replace some of the old samples in the replay pool, and training is performed using stratified learning rates. wheel, The additional training rounds added during the calibration phase have a value range of [1, 5]. When the current data differs significantly from the base training data distribution and the verification error continues to decrease, the number of training rounds can be appropriately increased. When the model exhibits overfitting, oscillating prediction curves, or excessive online update time, the time limit can be appropriately reduced. The learning rate of the Patch projection layer, position encoding, and gated residual output head is... The learning rate of the multi-head self-attention layer and the time dimension mapping layer is .
[0044] The replay pool is dynamically refreshed to balance long-term historical memory and recent operational adaptation, replacing the number of old samples each time. If the size is too small, the replay pool will update slowly and it will be difficult to reflect the latest weather conditions in a timely manner; if the replacement ratio is too large, it will result in insufficient retention of historical typical samples and reduce the ability to resist forgetting. Therefore, its value range is set to 50%-80% of the replay pool capacity. In this embodiment, 72 samples are preferred, which can achieve a balance between historical preservation and dynamic adaptation. The replacement ratio can be adjusted based on the playback pool capacity, the number of the latest samples, the intensity of distribution drift, and the degree of model forgetting. When the latest wind conditions differ significantly from historical wind conditions or when the continuous prediction error increases, the replacement ratio can be increased. When the model shows a degradation in its prediction of typical historical conditions, the replacement ratio can be decreased. Strengthen calibration cycle The periodic calibration cycle is used to correct error accumulation and distribution drift in the long-term operation of the model. A cycle that is too short results in frequent model updates, high computational costs, and may overreact to short-term noise; a cycle that is too long makes it difficult for the model to adapt to seasonal wind conditions, equipment status, or wake structure changes in a timely manner. Therefore, the cycle is set to a range of 1-7 rolling update cycles. This embodiment preferably uses 3 rolling cycles, corresponding to 3 days in ultra-short-term forecasts, which can better balance model stability and long-term adaptability. The calibration cycle is strengthened. The calibration cycle can be adjusted based on the cumulative trend of prediction error, the rate of change of wind conditions, the operating status of equipment, and computing resources. When the error increases in multiple consecutive prediction windows, or when the wind direction and wind speed distributions drift significantly, the calibration cycle can be shortened. When the error indicators are stable and computing resources are limited, the calibration cycle can be extended.
[0045] After the PatchTST time series large model is updated on the same day, the parameters remain fixed.
[0046] S4. Utilize the updated PatchTST time-series large-scale model to predict future power, outputting the final continuous prediction results and power decision support information for grid dispatch. (According to prediction intervals) Execute intraday rolling forecasts, with each forecast using the latest version. Using multi-source spatiotemporal fusion features as input, the output is the future. Step power value, number of predictions per step Multiple prediction results are spliced together in chronological order to form a continuous prediction sequence for the day; The length of a day.
[0047] Example 2 This invention proposes a wind farm cluster power prediction system corresponding to the method in Embodiment 1, comprising: The data acquisition module is used to acquire the spatial coordinates, power generation, and meteorological environment data of each wind turbine in the offshore wind farm. The wake spatial coupling modeling module is used to calculate the distance matrix and azimuth matrix between wind turbines based on spatial coordinates; generate a dynamic wake mask matrix based on the azimuth matrix and the prevailing wind direction; and construct a wake adjacency matrix based on the distance matrix, meteorological environmental data, and the dynamic wake mask matrix. The multi-source spatiotemporal feature construction module is used to calculate global time-series basic features based on power generation and meteorological environment data. Based on the wake adjacency matrix, calculate the wake spatial derivation features; based on the wake adjacency matrix, cluster the wind turbines to calculate the cluster-level spatial coupling features. The sample set construction module is used to stitch together and standardize multi-source features, and generate multi-source spatiotemporal fusion feature input samples and power output labels through a sliding window; The network building module is used to build large-scale PatchTST time series models; The rolling update module uses multi-source spatiotemporal fusion input samples and power output labels to perform pre-deployment training and online updates of the PatchTST time series large model; The decision output module is used to predict future power using the updated PatchTST time series large model.
[0048] The implementation methods of each module and its function in the system are completely consistent with the steps of the method in Implementation Example 1, so they will not be repeated here.
[0049] Example 3 This invention proposes an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the wind farm cluster power prediction method as described in Embodiment 1.
[0050] Example 4 This invention proposes a computer-readable storage medium storing a computer program that causes a computer to execute the wind farm cluster power prediction method as described in Embodiment 1.
[0051] To further illustrate the superiority of the method of this invention, examples are introduced for demonstration: (1) Basic data and local operating environment This embodiment uses a 200MW offshore wind farm as an example for testing and illustration. The wind farm has 134 wind turbines, each with a rated power of approximately 1.5MW. Experimental data includes wind speed, wind direction, active power, and other operational data for each turbine at continuous sampling times, as well as the spatial coordinates of each turbine. Time steps 1 to 8000 are selected as the offline training dataset, and time steps 8001 to 12000 are used for rolling training and prediction validation. The data sampling interval is 10 minutes, the historical window length is 144 (corresponding to the past 24 hours of data), the prediction step size is 24 (corresponding to predictions for the next 4 hours), the online update cycle is 144 (corresponding to daily updates), and the intraday prediction interval is 24 (corresponding to predictions every 4 hours). A traditional LSTM-Transformer model is used for comparison.
[0052] In this embodiment, model training and rolling prediction are performed on a local, ordinary CPU computing environment. The device configuration is as follows: a 13th Gen Intel(R) Core(TM) i5-13400 processor with a clock speed of 2.50 GHz, 16.0 GB of RAM, a memory speed of 2667 MT / s, and an Intel(R) UHD Graphics 730 graphics card. This configuration does not rely on a dedicated GPU or cloud training platform and can be used to verify the feasibility of this invention for local edge intelligent deployment in wind farms, rapid updates of artificial intelligence predictive inference and scheduling decisions.
[0053] (2) Results of wake space coupling modeling Before performing power prediction, it is necessary to first determine whether there are wake effects between wind turbines. Since offshore wind farms have a large number of turbines, using only the total power of the entire farm or the historical power of a single turbine as model input is insufficient to reflect the effects of upstream turbines on downstream turbines, such as obstruction, deceleration, and disturbance. Therefore, this embodiment first constructs a dynamic wake relationship between turbines based on their spatial coordinates, real-time wind direction, and wake angle threshold, and then further calculates the wake influence intensity. The spatial layout of the wind farm and the wake influence are as follows: Figure 2As shown in the figure, this is a top view of the wind farm's spatial layout. The horizontal and vertical axes represent the lateral and longitudinal geographic coordinates of the wind turbines, respectively. Colored dots represent wind turbine locations; different colors correspond to clustering results based on wake similarity, with turbines of the same color belonging to the same cluster. The lines connecting the dots represent the wake influence between turbines, with thicker lines indicating higher wake intensity. The 0° prevailing wind direction is marked to indicate the dominant direction of wake propagation. The figure shows that the wake influence lines are not randomly connected between turbines but exhibit a clear lateral extension along the prevailing wind direction, indicating that the wake influence relationship constructed in this invention can reflect the upstream and downstream propagation patterns under actual wind conditions. Furthermore, turbines within the same cluster exhibit strong spatial clustering, demonstrating consistency between the wake similarity-based clustering results and the actual spatial layout of the wind farm. This result demonstrates that this invention can incorporate both the wind turbine spatial layout and the physical propagation patterns of wakes into the prediction features, which is beneficial for improving the ability of subsequent prediction models to express spatial coupling relationships.
[0054] To further determine whether the wake effect has a stable statistical regularity, this embodiment plots the following: Figure 3 This figure is a heatmap of the average wake influence intensity of a wind farm over the entire time period. The horizontal and vertical axes correspond to the wind turbine numbers, and the color bars on the right represent the wake influence intensity. The closer the color is to red, the stronger the average wake influence between the corresponding wind turbine pairs; the closer the color is to blue, the weaker or virtually non-existent the wake influence. The figure shows several clear, diagonally highlighted bands, indicating that the wake effect has a clear direction and structure. The diagonally highlighted areas correspond to the continuous wake deceleration effect of the front-row wind turbines on the rear-row turbines in the same or adjacent rows; in contrast, the wake influence between turbines in the same row or those not in the prevailing wind direction is weaker. This distribution characteristic is consistent with... Figure 2 The spatial arrangement of wind turbines and the prevailing wind direction shown in the diagram corroborate each other, demonstrating that the dynamic wake adjacency matrix constructed in this invention can effectively extract key spatial dependencies within a wind farm.
[0055] In summary, the impact of wake effects on the overall power output of wind farms is significant. If the prediction model ignores this type of spatial coupling, it may easily misjudge the power decline of downstream turbines as ordinary time fluctuations, leading to insufficient prediction accuracy for power ramp-up, decline, and local disturbance processes. Therefore, this invention incorporates features such as wake effect intensity, upstream and downstream wind speed difference, and cluster-level wake statistics into the three-dimensional time-series input sample, enabling the model to learn the temporal variation patterns while simultaneously using the upstream turbine status to anticipate downstream power changes.
[0056] (3) Comparison of prediction results After constructing the wake space features, this embodiment compares the lightweight PatchTST model with the traditional LSTM-Transformer model in rolling prediction. Both are trained and predicted based on data points 8001-12000, and the model update efficiency and prediction error are evaluated. The comparison results are as follows: Figure 4 As shown.
[0057] Figure 4 The graph includes two subgraphs, left and right. The left subgraph compares model update efficiency, with the vertical axis representing the daily model update time in seconds. Under the aforementioned local operating environment with a standard CPU and integrated graphics card, the method described in this invention takes approximately 1.6 seconds per day for updates, while the traditional prediction model takes approximately 9.8 seconds per day, about six times faster. This result demonstrates that this invention, through patch-based time-segment modeling, lightweight attention encoding, and a low-learning-rate online fine-tuning mechanism, reduces the computational cost of the online update phase, enabling the model to meet the requirements of local edge intelligent prediction and rapid scheduling decision updates for offshore wind farms.
[0058] The right-hand subplot compares the accuracy of rolling forecasts, with the vertical axis representing the average normalized root mean square error (NRMSE). As can be seen from the figure, the average error level of the method described in this invention is approximately 6.2%, significantly lower than the 31.8% error level of traditional forecast models. This result demonstrates that this invention, by fusing global wind condition features and wake spatial coupling features at the input end, employing PatchTST to capture long-term dependencies at the model end, and introducing replay pool fine-tuning and periodic calibration mechanisms, suppresses error accumulation during long-term rolling forecasts. This not only improves the model update speed but also enhances the support capability of the forecast results for scheduling plans and operational decisions.
[0059] To further explain Figure 4 The manifestation of error index differences on the actual power curve is illustrated in this embodiment by visualizing the prediction results of data sets 8001-8144. Figure 5 As shown.
[0060] Figure 5This is a comparison chart of the rolling prediction of the entire power curve over its lifecycle. The horizontal axis represents the prediction time step, with a sampling interval of 10 minutes; the vertical axis represents the total power of the wind farm. In the chart, the black solid line represents the actual power curve, the blue solid line represents the prediction curve using the method described in this invention, and the red curve represents the prediction curve using the traditional method. As can be seen from the chart, the actual power curve exhibits complex trends such as rapid rises, rapid falls, and fluctuations in low-power ranges at multiple periods. The prediction curve of the method described in this invention generally matches the actual power curve well, maintaining good consistency at peak positions, troughs, and during power ramp-up phases. In contrast, the prediction curve of the traditional method shows significant high-frequency oscillations and spike deviations, and its trend differs from the actual power change trend in some time periods.
[0061] This further demonstrates that the method of the present invention, by incorporating wake spatial coupling characteristics and a time-series large model prediction mechanism, reduces abnormal oscillations in the prediction curve and can output more stable cluster power prediction results. This result makes the present invention more suitable for application scenarios with high requirements for real-time performance, stability, and trend tracking capabilities, such as ultra-short-term power prediction for offshore wind farms, grid dispatch plan generation, active power control, and intelligent operation and maintenance decision-making.
[0062] In the embodiments disclosed in this application, a computer storage medium may be a tangible medium that may contain or store programs for use by or in conjunction with an instruction execution system, apparatus, or device. The computer storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of computer storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, and portable compact disc read-only memory (CD). ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0063] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0064] The above are merely preferred embodiments of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should be considered within the scope of protection of the present invention.
Claims
1. A method for predicting the power of a wind farm cluster, characterized in that, Includes the following steps: Acquire spatial coordinates, power generation capacity, and meteorological environment data of each wind turbine within the offshore wind farm; Calculate the distance matrix and azimuth matrix between wind turbines based on spatial coordinates; A dynamic wake mask matrix is generated based on the azimuth matrix and the prevailing wind direction across the field. A wake adjacency matrix is constructed based on the distance matrix, meteorological environmental data, and dynamic wake mask matrix; Calculate global time-series basic characteristics based on power generation and meteorological environment data; Based on the wake adjacency matrix, calculate the wake space derived features; Wind turbines are clustered based on the wake adjacency matrix to calculate cluster-level spatial coupling characteristics; Multi-source features are spliced and standardized, and multi-source spatiotemporal fusion feature input samples and power output labels are generated through a sliding window; Constructing a large-scale PatchTST time series model; PatchTST time series large model is trained and updated online before deployment using multi-source spatiotemporal fusion input samples and power output labels; Predict future power using the updated PatchTST time series large model.
2. The wind farm cluster power prediction method as described in claim 1, characterized in that, The calculation of the distance matrix and azimuth matrix between wind turbines based on spatial coordinates is specifically as follows: The wind farm includes N Typhoon machine, number i The plane coordinates of the typhoon are The distance between the fans is expressed as: ; In the formula, For the first Typhoon machine and the first The distance between typhoon generators The first The horizontal and vertical axes of the typhoon generator The first The x and y coordinates of the typhoon turbines; the distances between all the turbines form a distance matrix; The azimuth angle between the fans can be calculated using the following formula: ; In the formula, For the first Typhoon machine to the The azimuth angle of the typhoon generator. It is the arctangent function in the fourth quadrant. The first The horizontal and vertical axes of the typhoon generator The first The horizontal and vertical coordinates of the typhoon generators; the azimuth angles between all the generators form an azimuth matrix; The specific steps for generating a dynamic wake mask matrix based on the azimuth matrix and the prevailing wind direction are as follows: The average wind direction from all wind direction sensors or the wind direction value representing a specific wind turbine is used as the basis for determining the wind direction. Dominant wind direction at all times Calculate the minimum angle between the wind turbine and the prevailing wind direction of the entire field: ; In the formula, for Time of the first Typhoon machine points to the first The minimum angle between the azimuth of the typhoon generator and the prevailing wind direction. For the first Typhoon machine to the The azimuth angle of the typhoon generator; Set wake angle threshold And generate a dynamic wake mask matrix. Specifically: ; In the formula, for Elements in the time-varying dynamic wake mask matrix Used to exclude the self-connection wake of the fan; a mask of 1 indicates the first... The typhoon machine is in the first Within the wake influence range of a typhoon, a mask of 0 indicates no wake influence.
3. The wind farm cluster power prediction method as described in claim 1, characterized in that, The specific steps for constructing the wake adjacency matrix based on the distance matrix, meteorological environmental data, and dynamic wake mask matrix are as follows: For all satisfied The wake effect affects the fan, extracting the first Wind speed of typhoon , No. Wind speed of typhoon and spatial distance , No. Typhoon machines relative to the first The typhoon turbine is the upstream turbine, the first Typhoon machines relative to the first The typhoon turbine is a downstream turbine and is retained. and Valid samples; for Elements in the time-varying dynamic wake mask matrix; Calculate wind speed attenuation rate Specifically: ; In the formula, For the first Typhoon machine to the first Typhoon machine The wind speed attenuation rate at any given time: when the wind speed of the downstream fan is higher than that of the upstream fan, the original wind speed attenuation rate is negative and is set to 0. spatial distance With wind speed attenuation rate Composition of wake attenuation fitting samples By iterating through all sampling times and wind turbine pairs that meet the conditions, a full set of wake attenuation samples is obtained. , is represented as: ; When the wake attenuation is a full sample set The number of valid samples is greater than the number of minimum fitted samples. At that time, the exponential decay function was used to fit the variation of wind speed decay rate with the distance between wind turbines, specifically: ; In the formula, It is the fitted wind speed attenuation rate. The initial wake intensity coefficient, The wake attenuation velocity coefficient is calculated using the least squares method on the full sample set of wake attenuation. Fitting and Wind turbine distance matrix ; Construct the distance decay matrix Specifically: ; In the formula, The initial wake intensity coefficient, The wake attenuation velocity coefficient, For the first Typhoon machine and the first The distance between typhoon generators; generate Timing Wake Adjacency Matrix Specifically: ; In the formula, , for Time of the first Typhoon machine to the first The intensity of the wake effect of a typhoon, where N represents the number of typhoon turbines. For dynamic wake mask matrix, This is the Hadamard product of corresponding element-wise multiplication. This is the distance decay matrix.
4. The wind farm cluster power prediction method as described in claim 1, characterized in that, The calculation of global time-series basic features based on power generation and meteorological environment data specifically includes: Global time series basic characteristics Represented as: ; In the formula, The average wind speed for the entire venue. and These are the sine and cosine components of the average wind direction across the entire field, respectively. The total power of the entire field, The average ambient temperature across the entire venue. For turbulence intensity, and These are the sine and cosine codes for the hourly cycle, respectively. and These are the sine and cosine codes for the daily cycle, respectively.
5. The wind farm cluster power prediction method as described in claim 1, characterized in that, The calculation of wake space-derived features based on the wake adjacency matrix specifically involves: The characteristics of the wake effect of a single machine are calculated as follows: ; In the formula, for Time of the first The total wake intensity of the typhoon affected by the upstream wind turbines. for Time of the first Typhoon machine to the first The wake of a typhoon affects its intensity. Number of wind turbines; The cluster-level wake structure characteristics are calculated as follows: ; In the formula, for Time of the first The impact of typhoon turbines on the output wake of downstream wind turbines. for Time of the first Typhoon machine to the first The wake of a typhoon affects its intensity; The calculation of the upstream and downstream wind speed difference is as follows: ; In the formula, Due to the difference in wind speed between upstream and downstream, For the first The wind speed of the typhoon generator. For the first The wind speed of the typhoon machine, the first Typhoon machines relative to the first The typhoon turbine is the upstream turbine, the first Typhoon machines relative to the first The typhoon turbine is a downstream turbine; For the The typhoon generator calculates its weighted average upstream wind speed difference. , is represented as: ; In the formula, for Time of the first Typhoon machine to the first The wake of a typhoon affects its intensity. To prevent extremely small positive numbers with a denominator of zero; The weighting of the wake effect is calculated as follows: For each downstream wind turbine Normalize its upstream wake effect, and express it as: ; In the formula, For wind turbine For the fan The relative wake contribution; Calculate the first Combined wake impact of typhoons Specifically: ; This results in the wake space characteristics generated by each wind turbine. , is represented as: ; The characteristics of the wake space generated by the entire wind turbine are represented as follows: ; In the formula, It is a characteristic derived from the wake space of the entire wind turbine.
6. The wind farm cluster power prediction method as described in claim 1, characterized in that, The specific steps for clustering wind turbines based on the wake adjacency matrix to calculate cluster-level spatial coupling features are as follows: Calculate the average wake adjacency matrix over the entire time period And construct a symmetric wake similarity matrix. Specifically: ; In the formula, For the wake adjacency matrix The matrix obtained by averaging along the time dimension for transpose, This is the normalized symmetric wake similarity matrix; Set the number of wind turbine clusters to The k-means algorithm using cosine distance is used to... Clustering is performed, repeated 10 times. Obtain the cluster label for each wind turbine; record the first cluster label. Clusters are: ; In the formula, For the first A cluster of wind turbines, For the first The cluster number to which the typhoon generator belongs; The cluster-level average wind speed is calculated as follows: ; In the formula, The average wind speed at the cluster level. For the first The number of wind turbines contained in a cluster. For the first A cluster of wind turbines, For the first The wind speed of the typhoon generator; The cluster-level average power is calculated as follows: ; In the formula, The average power at the cluster level, For the first A cluster of wind turbines, It is a power statistic; The cluster-level average temperature is calculated as follows: ; In the formula, The average temperature at the cluster level. This refers to statistics on ambient temperature. The calculation of cluster-level power fluctuations is as follows: ; In the formula, For cluster-level power fluctuations, It is a power statistic; This represents the function for calculating standard deviation. Construct the wake intensity matrix as follows: ; In the formula, For the first The wind turbine cluster to the first The average wake influence intensity of each wind turbine cluster For any two wind turbine clusters, for Time of the first Typhoon machine to the first The wake intensity of typhoon generators; the wake intensity matrix is composed of the average wake intensity across all clusters. Expand it row by row into a one-dimensional feature vector , , This refers to the number of wind turbine clusters; This yields the cluster-level spatial coupling characteristics, expressed as: ; In the formula, It is a cluster-level spatial coupling feature.
7. The wind farm cluster power prediction method as described in claim 1, characterized in that, The specific steps for constructing the PatchTST time series large model are as follows: The PatchTST temporal large-scale model consists of an input layer, a Patch attention encoder, a temporal dimension mapping layer, and a gated residual output head; the input layer is used to slice the input sample tensor to obtain... Each patch is converted into a patch embedding. The patch attention encoder is used to perform attention encoding on the patch embedding to obtain the feature representation of each patch. The time-dimensional mapping layer is used to represent the feature dimensions of a patch from the number of patches. Mapping to prediction step size The gated residual output head generates future features based on the feature representation of the patch after dimension mapping. Total power prediction.
8. The wind farm cluster power prediction method as described in claim 7, characterized in that, The input layer is specifically: For input sample tensors According to length and step length By slicing the input sample tensor along the time dimension, we obtain... Number of patches Determined by the following formula: ; In the formula, The number of patches generated for each input sample tensor Patch length The sliding step size for the patch. For batch size, For the length of the history window, For multi-source spatiotemporal fusion feature dimensions; Flatten each patch to its length. The vector is mapped to the hidden dimension through the Patch projection layer. And superimposed with learnable positional encoding Get Patch embedding ; The Patch attention encoder includes a multi-head self-attention layer and a feedforward network, employing a residual connection and layer normalization structure. The multi-head self-attention layer is represented as follows: ; ; In the formula, This represents multi-head self-attention, where r is the index of the attention head. , To focus on the number of heads, For querying the matrix, The key matrix, For value matrices, This indicates a splicing operation. Indicates the first r Attention score of each attention head To output the projection matrix, express function, Let r be the query matrix of the attention head. For the first r The key matrix of each attention head. For the first r The value matrix of each attention head, The dimension of the key vector; The gated residual output head includes a first linear layer, an ELU activation function, a Dropout layer, a second linear layer, a gated linear layer, a jump-connection projection layer, and a layer normalization layer. The output of the gated residual output head... Represented as: ; In the formula, As input features, It is a normalization layer. This represents the activation function. For the parameters of the gated linear layer, and These are nonlinear transformation path parameters. For Dropout layer, It is the ELU activation function. These are the parameters for jump connection projection.
9. The wind farm cluster power prediction method as described in claim 1, characterized in that, The specific steps for pre-deployment training and online updating of the PatchTST time series large model are as follows: Before selection The multi-source spatiotemporal fusion input samples and power output labels at each time step were used as the offline base training set. A PatchTST time-series large-scale model was trained based on the offline base training set and the AdamW optimizer, with a base learning rate of [missing information]. The weight decay coefficient is The number of training rounds is Batch size is During training, cosine annealing learning rate scheduling is used, with a minimum learning rate set. and adopt the maximum range as Gradient clipping is performed, and the pre-trained weights of the base are saved after training. The mean of the input samples is calculated based on the offline base training set. and standard deviation and the average power output label and standard deviation This is used to standardize the offline base training set; random sampling is performed from the standardized base training set. Group samples are used to construct a replay pool; During online hot-start fine-tuning, according to the update cycle Get the latest Using one sample as a fine-tuning window, , The fine-tuning window samples are standardized, and then concatenated with the replay pool samples to form a hybrid fine-tuning set. Pre-trained weights from the pedestal are loaded for each round of online updates. As the initial weights for the PatchTST time-series large model, the learning rate is fine-tuned. Fine-tuning the number of rounds Weight decay coefficient Training the hybrid fine-tuning set; Each interval A reinforcement calibration is performed once every update cycle. The reinforcement calibration includes: recalculating the mean of the input samples based on the current fine-tuning window. and standard deviation and the average power output label and standard deviation Randomly select from the current fine-tuning window Group samples replace some of the old samples in the replay pool, and training is performed using stratified learning rates. wheel, To enhance the additional training rounds during the calibration phase, the parameters of the PatchTST time series large model remain fixed after the daily update.
10. A wind farm cluster power prediction system, characterized in that, include: The data acquisition module is used to acquire the spatial coordinates, power generation, and meteorological environment data of each wind turbine in the offshore wind farm. The wake space coupling modeling module is used to calculate the distance matrix and azimuth matrix between wind turbines based on spatial coordinates; A dynamic wake mask matrix is generated based on the azimuth matrix and the prevailing wind direction across the field. A wake adjacency matrix is constructed based on the distance matrix, meteorological environmental data, and dynamic wake mask matrix; The multi-source spatiotemporal feature construction module is used to calculate global time-series basic features based on power generation and meteorological environment data. ; Based on the wake adjacency matrix, calculate the wake spatial derivation features; based on the wake adjacency matrix, cluster the wind turbines to calculate the cluster-level spatial coupling features; The sample set construction module is used to stitch together and standardize multi-source features, and generate multi-source spatiotemporal fusion feature input samples and power output labels through a sliding window; The network building module is used to build large-scale PatchTST time series models; The rolling update module uses multi-source spatiotemporal fusion input samples and power output labels to perform pre-deployment training and online updates of the PatchTST time series large model; The decision output module is used to predict future power using the updated PatchTST time series large model.