WO2023070960A1 - Wind power prediction method based on convolutional transformer architecture, and system and device - Google Patents

Wind power prediction method based on convolutional transformer architecture, and system and device Download PDF

Info

Publication number
WO2023070960A1
WO2023070960A1 PCT/CN2022/072596 CN2022072596W WO2023070960A1 WO 2023070960 A1 WO2023070960 A1 WO 2023070960A1 CN 2022072596 W CN2022072596 W CN 2022072596W WO 2023070960 A1 WO2023070960 A1 WO 2023070960A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
power prediction
computer program
power
generate
Prior art date
Application number
PCT/CN2022/072596
Other languages
French (fr)
Chinese (zh)
Inventor
卢泽华
李小翔
任鑫
曾谁飞
杨永前
王�华
陈沐新
张燧
王青天
冯帆
王振荣
Original Assignee
中国华能集团清洁能源技术研究院有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中国华能集团清洁能源技术研究院有限公司 filed Critical 中国华能集团清洁能源技术研究院有限公司
Publication of WO2023070960A1 publication Critical patent/WO2023070960A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/047Probabilistic or stochastic networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Definitions

  • This application relates to new energy power technology, and in particular to a wind power prediction method, system and equipment based on convolution transformer architecture.
  • Wind power technology is becoming a major source of future electricity demand.
  • a higher share of renewable energy technologies is critical to carbon-neutrally meeting the needs of future new power system grids, but also brings new grid operation challenges.
  • Electric power companies need to predict the power generated by wind power in order to carry out power generation dispatching operations. Forecasting is a major enabler to ensure safe and economical integration of wind power, while creating links between many flexibility innovations at different levels of the power system to achieve synergies.
  • Accurate wind power forecasting is an important and cost-effective element of energy management, which also facilitates effective and direct participation of wind power plants and aggregation systems in the electricity market and increases plant profitability through optimized supply planning.
  • the wind power generation power is predicted according to the recurrent neural network model, but the recurrent neural network has gradient disappearance and gradient explosion when the network is deepened, and the accuracy of power prediction is low.
  • the present application provides a wind power prediction method, system, and device based on a convolution transformer architecture.
  • a method for predicting wind power based on a convolutional transformer architecture including:
  • the embedding vector is input into a power prediction network, which includes an encoder and a decoder.
  • a feature map corresponding to the embedding vector is obtained according to the encoder.
  • the feature maps are fed into a decoder to generate predicted powers.
  • the time step of the weather data is t
  • the weather data includes:
  • the time step of the operation data is t
  • the operation data includes:
  • the name of the plant and station The name of the plant and station, the starting time of the report, and the forecast time.
  • the collection of meteorological data and operational data includes:
  • the collected meteorological data and operating data are normalized, and invalid data is cleaned.
  • the obtaining the embedding vector includes:
  • the encoder includes a self-attention layer and a feed-forward neural network, and obtaining the feature map corresponding to the embedding vector according to the encoder includes:
  • the embedding vectors are fed into the self-attention layer to generate query vector q, key vector k and value vector v.
  • the final score is normalized to generate a normalized score.
  • the sum of the weighted scoring vectors is input into the feedforward neural network, and the feature map is generated.
  • the decoder includes a self-attention layer, an encoding-decoding attention layer, and a feed-forward neural network.
  • a power prediction network training method including:
  • the training data set is input into the power prediction network, and the training is carried out with the goal of minimizing the loss function.
  • the labeling the data set to generate a training data set includes:
  • a wind power prediction device based on a convolution transformer architecture including:
  • the collection module is used to collect meteorological data and operational data, and obtain embedding vectors.
  • the input module is used to input the embedding vector into the power prediction network, and the power prediction network includes an encoder and a decoder.
  • a feature extraction module configured to obtain a feature map corresponding to the embedding vector according to the encoder.
  • a prediction module configured to input the feature map into a decoder to generate prediction power.
  • the time step of the weather data is t
  • the weather data includes:
  • the time step of the operation data is t
  • the operation data includes:
  • the name of the plant and station The name of the plant and station, the starting time of the report, and the forecast time.
  • the collection module includes:
  • the data cleaning sub-module is used for normalizing the collected meteorological data and operating data, and cleaning invalid data.
  • the collection module includes:
  • the first vector generation sub-module is used to make the sliding window slide on the data, select the meteorological data and operating data in the sliding window, and generate an embedding vector.
  • the encoder includes a self-attention layer and a feed-forward neural network
  • the feature extraction module includes:
  • the second vector generation sub-module is used to input the embedding vector into the self-attention layer to generate query vector q, key vector k and value vector v.
  • the first scoring submodule is configured to generate a vector scoring score according to the q and the k.
  • the second scoring submodule generates a final score according to the score and normalization parameters.
  • a third scoring submodule normalizing the final score to generate a normalized score.
  • the fourth scoring submodule calculates a weighted scoring vector according to v and the normalized scoring and calculates the sum of the weighted scoring vectors.
  • the feature extraction submodule is used to input the sum of the weighted scoring vectors into the feedforward neural network and generate the feature map.
  • the decoder includes a self-attention layer, an encoding-decoding attention layer, and a feed-forward neural network.
  • a power prediction network training device including:
  • the data acquisition module is used to generate data sets based on meteorological data and operational data.
  • the labeling module is used for labeling the data set to generate a training data set.
  • the training module is used to input the training data set into the power prediction network, and train with the goal of minimizing the loss function.
  • the labeling module includes:
  • the marking sub-module is used to mark the actual power corresponding to the meteorological data and operating data at each time point.
  • a wind power prediction device based on a convolution transformer architecture including:
  • the processor is configured to execute the instructions, so as to realize the wind power prediction method based on the convolution transformer architecture as described in any one of the above first aspects.
  • a non-transitory computer-readable storage medium When the instructions in the storage medium are executed by the processor of the wind power prediction device based on the convolution transformer architecture, the volume based The wind power prediction device of the convolutional transformer architecture can implement the wind power prediction method based on the convolutional transformer architecture as described in any one of the above first aspects.
  • a power prediction network training device including:
  • the processor is configured to execute the instructions, so as to implement the power prediction network training method as described in the second aspect above.
  • a non-transitory computer-readable storage medium when the instructions in the storage medium are executed by the processor of the power prediction network training device, the power prediction network training device can execute The power prediction network training method as described in the second aspect above.
  • a computer program product includes computer program code, when the computer program code is run on a computer, to execute the above-mentioned first aspect method.
  • a computer program product includes computer program code, when the computer program code is run on a computer, to execute the above-mentioned second aspect method.
  • a computer program includes computer program code, and when the computer program code is run on a computer, the computer executes the above-mentioned first aspect. method.
  • a computer program includes computer program code, and when the computer program code is run on a computer, the computer executes the above-mentioned second aspect. method.
  • the convolution kernel is used to perform the convolution operation, so as to focus attention on the local context, so that more relevant features can be matched.
  • the improved power prediction network can fit faster, improve the prediction accuracy of the model in complex data sets, and achieve lower training loss.
  • Fig. 1 is a flow chart of a wind power prediction method based on a convolutional transformer architecture according to an exemplary embodiment.
  • Fig. 2 is a flow chart of a wind power prediction method based on a convolution transformer architecture according to an exemplary embodiment.
  • Fig. 3 is a flowchart showing a method for training a power prediction network according to an exemplary embodiment.
  • Fig. 4 is a block diagram of a wind power prediction device based on a convolution transformer architecture according to an exemplary embodiment.
  • Fig. 5 is a block diagram of a wind power prediction device based on a convolution transformer architecture according to an exemplary embodiment.
  • Fig. 6 is a block diagram showing a power prediction network training device according to an exemplary embodiment.
  • Fig. 7 is a schematic diagram of a power prediction network prediction process according to an exemplary embodiment.
  • Fig. 8 is a schematic structural diagram of an encoder according to an exemplary embodiment.
  • Fig. 9 is a schematic structural diagram of a decoder according to an exemplary embodiment.
  • Fig. 10 is a block diagram of a wind power prediction device based on a convolution transformer architecture according to an exemplary embodiment.
  • Wind power technology is becoming a major source of future electricity demand.
  • a higher share of renewable energy technologies is critical to carbon-neutrally meeting the needs of future new power system grids, but also brings new grid operation challenges.
  • Electric power companies need to predict the power generated by wind power in order to carry out power generation dispatching operations. Forecasting is a major enabler to ensure safe and economical integration of wind power, while creating links between many flexibility innovations at different levels of the power system to achieve synergies.
  • Accurate wind power forecasting is an important, cost-effective element of energy management, which also helps wind power plants and aggregation systems to participate effectively and directly in the electricity market, and to increase plant profitability through optimized supply planning.
  • This application proposes a method, device and storage medium for wind power prediction based on convolutional transformer architecture.
  • Fig. 1 is a flow chart of a method for predicting wind power based on a convolution transformer architecture according to an exemplary embodiment. As shown in Fig. 1 , the method includes the following steps:
  • Step 101 collect meteorological data and operating data, and obtain embedding vectors.
  • data needs to be collected to be input into the power prediction network.
  • the power of wind power generation has two major factors: the operating state of the wind power generating set and the meteorological conditions around the wind power generating set.
  • the meteorological data and operating data are collected to predict the power of the wind energy generating set.
  • the meteorological data includes: the name of the wind power plant, the rated capacity, the model of the power generation unit, the quantity of the power generation unit, and capacity expansion information.
  • the station output table in the station includes time and actual power.
  • the meteorological data includes wind data, and the wind data includes: wind speed, wind direction, air temperature, air pressure and relative humidity at a specified altitude.
  • the specified height can be adjusted by the implementer according to the actual situation, and this application does not limit the specified height.
  • the designated height is 10 meters, 30 meters, 50 meters, 70 meters and the height of the hub of the wind turbine.
  • the running record includes the start time, end time and corresponding maximum output upper limit.
  • the operation data includes: the name of the factory station, the start time, the forecast time, the wind speed, wind direction, temperature, and relative humidity at the designated height.
  • the designated height is 10 meters, 30 meters meters, 70 meters, 100 meters.
  • the meteorological data and the operating data are collected periodically, and the meteorological data and the operating data are collected once every time step t.
  • the specific value of t can be determined by the implementer according to the actual situation. The situation is adjusted, and this application does not limit t.
  • the time step t is 15 minutes.
  • this application implements the data collected at multiple time points to predict the wind power generation power at the next time point, and uses the sliding window to slide on the time series data to select several consecutive time points In order for the power prediction network to identify the time series sequence smoothly, the corresponding embedding vector is generated according to the data selected by the sliding window.
  • Step 102 input the embedding vector into a power prediction network, and the power prediction network includes an encoder and a decoder.
  • the power prediction network is a neural network of a convolutional migration transformer architecture, and the power prediction network includes an encoder and a decoder.
  • Step 103 obtain the feature map corresponding to the embedding vector according to the encoder.
  • the encoder includes a self-attention layer and a feed-forward neural network
  • the embedding vector is input into the self-attention layer and converted into a query vector q, a key vector k and a value vector v, and then the q, k, and v are input into the feedforward neural network to extract features to generate the feature map.
  • Step 104 input the feature map into a decoder to generate prediction power.
  • the decoder includes a self-attention layer, an encoding-decoding attention layer and a feed-forward neural network, configured to reduce the dimensionality of the feature map to generate the prediction power.
  • the time step of the weather data is t
  • the weather data includes:
  • the meteorological data includes: the name of the wind power plant, the rated capacity, the model of the power generation unit, the number of the power generation unit, and capacity expansion information.
  • the station output table in the station includes time and actual power.
  • the meteorological data includes wind data, and the wind data includes: wind speed, wind direction, air temperature, air pressure and relative humidity at a specified height.
  • the specified height can be adjusted by the implementer according to the actual situation, and this application does not limit the specified height.
  • the designated height is 10 meters, 30 meters, 50 meters, 70 meters and the height of the hub of the wind turbine.
  • the running record includes the start time, end time and corresponding maximum output upper limit.
  • the time step of the operation data is t
  • the operation data includes:
  • the name of the plant and station The name of the plant and station, the starting time of the report, and the forecast time.
  • the operation data includes: the name of the plant station, the start time, the forecast time, the wind speed, wind direction, temperature, and relative humidity at the specified altitude.
  • the specified The height is 10 meters, 30 meters, 70 meters, 100 meters.
  • the collection of meteorological data and operational data includes:
  • the collected meteorological data and operating data are normalized, and invalid data is cleaned.
  • a threshold range is set to detect data that is significantly different from normal instances, or missing data and repeated measurements are detected by searching for null values. All detected errors and missing data are discarded from the initial dataset.
  • the cleaned data needs to be normalized.
  • the normalized formula is: Among them, x norm is the normalized value, x is the original value, x min is the minimum value in the original value, and x max is the maximum value in the original value.
  • the obtaining the embedding vector includes:
  • the meteorological data and operating data are combined into time-series data.
  • This application implements the data collected at multiple time points to predict the wind power generation power at the next time point, and uses a sliding window to slide on the time-series data The data at several consecutive time points are selected, and the corresponding embedding vector is generated according to the data selected by the sliding window in order for the power prediction network to successfully identify the time series.
  • Fig. 2 is a flow chart of a wind power prediction method based on a convolutional transformer architecture shown according to an exemplary embodiment, the encoder includes a self-attention layer and a feed-forward neural network, as shown in Fig. 2 , the method Include the following steps:
  • Step 201 input the embedding vector into the self-attention layer to generate query vector q, key vector k and value vector v.
  • the query vector q, key vector k, and value vector v corresponding to the embedding vector are obtained from the attention layer to perform subsequent score calculation and obtain the attention score.
  • Step 202 generating a vector score score according to the q and the k.
  • Step 203 generate a final score according to the score and normalization parameters.
  • the d k is the number of dimensions of the key vector k.
  • Step 204 normalize the final score to generate a normalized score.
  • a normalization function is used to normalize the final score.
  • the normalization function is a softmax function, and the final score is input into the softmax function to generate the normalization score.
  • the normalized score indicates the contribution of the embedded vector corresponding to the current time point to the predicted power. The higher the normalized score, the closer the relationship between the data corresponding to the embedded vector and the predicted power, and the greater the contribution to the predicted power .
  • the final score is 12, and a normalized score of 0.88 is output after being normalized by the softmax function, and the normalized score is used for subsequent z-weighting.
  • Step 205 calculate a weighted score vector according to v and the normalized score and calculate the sum of the weighted score vectors.
  • the normalized score is multiplied by the v to obtain a weighted score vector, and each weighted score vector is added to a set to obtain the sum of the weighted score vectors.
  • Step 206 input the sum of the weighted scoring vectors into the feedforward neural network, and generate the feature map.
  • the sum of the weighted scoring vectors is input into the feedforward neural network, and features are extracted to generate the feature map.
  • the decoder includes a self-attention layer, an encoding-decoding attention layer, and a feed-forward neural network.
  • Fig. 8 is a schematic structural diagram of an encoder according to an exemplary embodiment. As shown in Figure 8, the encoder includes a self-attention layer and a feed-forward neural network.
  • FIG. 9 is a schematic structural diagram of a decoder according to an exemplary embodiment.
  • the decoder also has a self-attention layer and a feed-forward neural network of the encoder.
  • an encoder-decoder layer i.e., encoder-decoder attention layer
  • the encoding-decoding attention layer is a fully connected network, wherein there are two layers of networks, the activation function of the first layer is ReLU, and the formulation of the ReLU activation function is expressed as The sparse model achieved through ReLU can better mine relevant features and fit the training data; the second layer is a linear activation function.
  • Fig. 7 is a schematic diagram of a power prediction network prediction process according to an exemplary embodiment.
  • the meteorological data and operating data at four time points are selected through the sliding window, and the corresponding query vector q, key vector k, and value vector v are generated according to the convolution kernel, and input to the self-attention layer in the encoder. Computes the correlation score for attention and outputs the sum of weighted score vectors.
  • Fig. 3 is a flowchart of a method for training a power prediction network according to an exemplary embodiment. As shown in Fig. 3, the method includes the following steps:
  • Step 301 generating a data set according to meteorological data and operating data.
  • a data set can be constructed to train the power prediction network.
  • different data segmentation methods are used to divide the data set, and the data set recorded within 2 years is divided into a training set and a test set. Extract 10 different training sets from the original time series, sequentially or randomly split the first-year evaluation dataset into 10% train, 30% train, 50% train, and 70% train set.
  • Step 302 label the data set to generate a training data set.
  • the data in the data set are marked, and the meteorological data and operation data collected at each time point correspond to the actual power of wind power generation, so as to train the power prediction network.
  • Step 303 input the training data set into the power prediction network, and train with the goal of minimizing the loss function.
  • the training data set is input into the power prediction network for iterative training, and the data at several consecutive time points are selected by sliding on the training data set with a sliding window and input into the power prediction network,
  • the predicted power is output, and the predicted power is compared with the actual power to calculate a loss function.
  • the parameters in the power prediction network are optimized with the goal of minimizing the loss function.
  • the recommended power prediction network can be obtained.
  • the labeling the data set to generate a training data set includes:
  • Fig. 4 is a block diagram of a wind power prediction device based on a convolution transformer architecture according to an exemplary embodiment.
  • the device 400 includes an acquisition module 410 , an input module 420 , a feature extraction module 430 and a prediction module 440 .
  • the collection module 410 is used to collect meteorological data and operating data, and obtain embedded vectors.
  • the input module 420 is configured to input the embedding vector into a power prediction network, and the power prediction network includes an encoder and a decoder.
  • the feature extraction module 430 is configured to obtain a feature map corresponding to the embedding vector according to the encoder.
  • a prediction module 440 configured to input the feature map into a decoder to generate prediction power.
  • the time step of the weather data is t
  • the weather data includes:
  • the time step of the operation data is t
  • the operation data includes:
  • the name of the plant and station The name of the plant and station, the starting time of the report, and the forecast time.
  • the collection module 410 includes:
  • the data cleaning sub-module 411 is used for normalizing the collected meteorological data and operating data, and cleaning invalid data.
  • the collection module 410 includes:
  • the first vector generation sub-module 412 is used to make the sliding window slide on the data, select the meteorological data and operating data in the sliding window, and generate an embedding vector.
  • Fig. 5 is a block diagram of a wind power prediction device based on a convolution transformer architecture according to an exemplary embodiment.
  • the apparatus 500 includes a second vector generation submodule 510 , a first scoring submodule 520 , a second scoring submodule 530 , a third scoring submodule 540 , a fourth scoring submodule 550 and a feature extraction submodule 560 .
  • the second vector generation sub-module 510 is configured to input the embedding vector into the self-attention layer to generate a query vector q, a key vector k and a value vector v.
  • the first scoring sub-module 520 is configured to generate a vector score score according to the q and the k.
  • the second scoring sub-module 530 generates a final score according to the score and normalization parameters.
  • the third scoring sub-module 540 normalizes the final score to generate a normalized score.
  • the fourth scoring sub-module 550 calculates a weighted scoring vector according to v and the normalized scoring and calculates the sum of the weighted scoring vectors.
  • the feature extraction sub-module 560 is configured to input the sum of the weighted scoring vectors into the feedforward neural network, and generate the feature map.
  • the decoder includes a self-attention layer, an encoding-decoding attention layer, and a feed-forward neural network.
  • Fig. 6 is a block diagram showing a power prediction network training device according to an exemplary embodiment.
  • the device 600 includes a data collection module 610 , a labeling module 620 and a training module 630 .
  • the data acquisition module 610 is configured to generate a data set according to meteorological data and operating data.
  • the labeling module 620 is configured to label the data set to generate a training data set.
  • a training module 630 configured to input the training data set into the power prediction network, and train with the goal of minimizing the loss function.
  • the labeling module 620 includes:
  • the marking sub-module 621 is used to mark the actual power corresponding to the meteorological data and the operating data at each time point.
  • Fig. 10 is a block diagram of an apparatus 1000 for realizing the wind power prediction method based on the convolution transformer architecture according to an exemplary embodiment.
  • a storage medium including instructions such as a memory 1010 including instructions, and an interface 1030 , the instructions can be executed by the processor 1020 of the device 1000 to complete the above method.
  • the storage medium may be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical disk. data storage devices, etc.
  • a computer program product includes computer program code, and when the computer program code is run on a computer, the above method is executed.
  • a computer program the computer program includes computer program code, and when the computer program code is run on a computer, it causes the computer to execute the above method.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Biophysics (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Biomedical Technology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Tourism & Hospitality (AREA)
  • Probability & Statistics with Applications (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Game Theory and Decision Science (AREA)
  • Development Economics (AREA)
  • Public Health (AREA)
  • Water Supply & Treatment (AREA)
  • Primary Health Care (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Supply And Distribution Of Alternating Current (AREA)

Abstract

Disclosed in the present application are a wind power prediction method and apparatus based on a convolutional transformer architecture, and a storage medium. The method comprises: collecting meteorological data and operation data, and acquiring an embedding vector (S101); inputting the embedding vector into a power prediction network, wherein the power prediction network comprises an encoder and a decoder (S102); according to the encoder, acquiring a feature map which corresponds to the embedding vector (S103); and inputting the feature map into the decoder, so as to generate a predicted power (S104).

Description

一种基于卷积transformer架构的风功率预测方法、系统及设备A wind power prediction method, system and device based on convolution transformer architecture
相关申请的交叉引用Cross References to Related Applications
本申请基于申请号为No.202111274987.2、申请日为2021年10月29日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。This application is based on a Chinese patent application with application number No. 202111274987.2 and a filing date of October 29, 2021, and claims the priority of this Chinese patent application. The entire content of this Chinese patent application is hereby incorporated by reference into this application.
技术领域technical field
本申请涉及新能源电力技术,尤其涉及一种基于卷积transformer架构的风功率预测方法、系统及设备。This application relates to new energy power technology, and in particular to a wind power prediction method, system and equipment based on convolution transformer architecture.
背景技术Background technique
风力发电技术正在成为满足未来电力需求的主要来源。更高份额的可再生能源技术对于碳中和满足未来新型电力系统电网的需求至关重要,但也带来了新的电网运行挑战。电力公司需要对风功率发电功率进行预测,以便进行发电调度操作。预测是一个主要的推动因素,可以确保安全和经济的风功率并网,同时在电力系统不同层面的许多灵活性创新之间建立联系,以实现协同效应。准确的风功率预测是一个重要的、具有成本效益的能源管理要素,它还有助于风功率电站和集合系统有效和直接地参与电力市场,并且通过优化供应计划来增加电厂的效益。Wind power technology is becoming a major source of future electricity demand. A higher share of renewable energy technologies is critical to carbon-neutrally meeting the needs of future new power system grids, but also brings new grid operation challenges. Electric power companies need to predict the power generated by wind power in order to carry out power generation dispatching operations. Forecasting is a major enabler to ensure safe and economical integration of wind power, while creating links between many flexibility innovations at different levels of the power system to achieve synergies. Accurate wind power forecasting is an important and cost-effective element of energy management, which also facilitates effective and direct participation of wind power plants and aggregation systems in the electricity market and increases plant profitability through optimized supply planning.
相关技术中,根据递归神经网络类的模型对风能发电功率进行预测,但递归神经网络在网络加深时存在梯度消失和梯度爆炸,功率预测的准确率较低。In related technologies, the wind power generation power is predicted according to the recurrent neural network model, but the recurrent neural network has gradient disappearance and gradient explosion when the network is deepened, and the accuracy of power prediction is low.
发明内容Contents of the invention
本申请提供一种基于卷积transformer架构的风功率预测方法、系统及设备。The present application provides a wind power prediction method, system, and device based on a convolution transformer architecture.
根据本申请实施例的第一方面,提供一种基于卷积transformer架构的风功率预测方法,包括:According to the first aspect of the embodiments of the present application, a method for predicting wind power based on a convolutional transformer architecture is provided, including:
采集气象数据和运行数据,并获取嵌入向量。Collect meteorological data and operational data, and get embedding vectors.
将所述嵌入向量输入功率预测网络,所述功率预测网络包括编码器和解码器。The embedding vector is input into a power prediction network, which includes an encoder and a decoder.
根据所述编码器获取所述嵌入向量对应的特征图。A feature map corresponding to the embedding vector is obtained according to the encoder.
将所述特征图输入解码器,以生成预测功率。The feature maps are fed into a decoder to generate predicted powers.
在一些实施例中,所述气象数据的时间步长为t,所述气象数据包括:In some embodiments, the time step of the weather data is t, and the weather data includes:
厂站额定容量、发电单元型号、发电单元数量和扩容信息。Power plant rated capacity, power generation unit model, number of power generation units and capacity expansion information.
厂站出力表实际功率。The actual power of the factory station output table.
风的高度、风速和风向。The height, speed and direction of the wind.
风机轮毂高度处风速和风机轮毂高度处风向。The wind speed at the height of the wind turbine hub and the wind direction at the height of the wind turbine hub.
气温、气压、相对湿度。Air temperature, air pressure, relative humidity.
在一些实施例中,所述运行数据的时间步长为t,所述运行数据包括:In some embodiments, the time step of the operation data is t, and the operation data includes:
厂站名称、起报时间、预报时间。The name of the plant and station, the starting time of the report, and the forecast time.
各高度的温度、动量通量、风向、风速和相对湿度。Temperature, momentum flux, wind direction, wind speed, and relative humidity at various altitudes.
海平面气压、云量、潜热通量、感热通量、短波辐射通量、长波辐射通量、地表水压、总降水、大尺度降水、对流降水。Sea level pressure, cloud cover, latent heat flux, sensible heat flux, shortwave radiation flux, longwave radiation flux, surface water pressure, total precipitation, large-scale precipitation, convective precipitation.
在一些实施例中,所述采集气象数据和运行数据,包括:In some embodiments, the collection of meteorological data and operational data includes:
将所述采集气象数据和运行数据归一化,并清洗无效数据。The collected meteorological data and operating data are normalized, and invalid data is cleaned.
在一些实施例中,所述获取嵌入向量,包括:In some embodiments, the obtaining the embedding vector includes:
令滑窗在数据上滑动,选取滑窗内的气象数据和运行数据,并生成嵌入向量。Let the sliding window slide on the data, select the meteorological data and operating data in the sliding window, and generate an embedding vector.
在一些实施例中,所述编码器包括自注意层和前馈神经网络,所述根据所述编码器获取所述嵌入向量对应的特征图,包括:In some embodiments, the encoder includes a self-attention layer and a feed-forward neural network, and obtaining the feature map corresponding to the embedding vector according to the encoder includes:
将所述嵌入向量输入自注意层以生成查询向量q、键向量k和值向量v。The embedding vectors are fed into the self-attention layer to generate query vector q, key vector k and value vector v.
根据所述q和所述k生成向量评分score。Generate a vector score score according to the q and the k.
根据所述score和归一化参数生成最终评分。Generate a final score based on the score and normalization parameters.
对所述最终评分进行归一化以生成归一化评分。The final score is normalized to generate a normalized score.
根据v和归一化评分计算加权评分向量并计算所述加权评分向量之和。Calculate a weighted score vector based on v and the normalized score and calculate the sum of the weighted score vectors.
将所述加权评分向量之和输入所述前馈神经网络,并生成所述特征图。The sum of the weighted scoring vectors is input into the feedforward neural network, and the feature map is generated.
在一些实施例中,所述解码器包括自注意层、编码-解码注意力层和前馈神经网络。In some embodiments, the decoder includes a self-attention layer, an encoding-decoding attention layer, and a feed-forward neural network.
根据本申请实施例的第二方面,提供一种功率预测网络训练方法,包括:According to the second aspect of the embodiments of the present application, a power prediction network training method is provided, including:
根据气象数据和运行数据生成数据集。Generate datasets from weather data and operational data.
对所述数据集进行标注以生成训练数据集。Label the data set to generate a training data set.
将所述训练数据集输入所述功率预测网络,并以损失函数最小化为目标进行训练。The training data set is input into the power prediction network, and the training is carried out with the goal of minimizing the loss function.
在一些实施例中,所述对所述数据集进行标注以生成训练数据集,包括:In some embodiments, the labeling the data set to generate a training data set includes:
标注各个时间点上气象数据和运行数据对应的实际功率。Mark the actual power corresponding to the meteorological data and operating data at each time point.
根据本申请实施例的第三方面,提供一种基于卷积transformer架构的风功率预测装置,包括:According to a third aspect of the embodiments of the present application, a wind power prediction device based on a convolution transformer architecture is provided, including:
采集模块,用于采集气象数据和运行数据,并获取嵌入向量。The collection module is used to collect meteorological data and operational data, and obtain embedding vectors.
输入模块,用于将所述嵌入向量输入功率预测网络,所述功率预测网络包括编码器和解码 器。The input module is used to input the embedding vector into the power prediction network, and the power prediction network includes an encoder and a decoder.
特征提取模块,用于根据所述编码器获取所述嵌入向量对应的特征图。A feature extraction module, configured to obtain a feature map corresponding to the embedding vector according to the encoder.
预测模块,用于将所述特征图输入解码器,以生成预测功率。A prediction module, configured to input the feature map into a decoder to generate prediction power.
在一些实施例中,所述气象数据的时间步长为t,所述气象数据包括:In some embodiments, the time step of the weather data is t, and the weather data includes:
厂站额定容量、发电单元型号、发电单元数量和扩容信息。Power plant rated capacity, power generation unit model, number of power generation units and capacity expansion information.
厂站出力表实际功率。The actual power of the factory station output table.
风的高度、风速和风向。The height, speed and direction of the wind.
风机轮毂高度处风速和风机轮毂高度处风向。The wind speed at the height of the wind turbine hub and the wind direction at the height of the wind turbine hub.
气温、气压、相对湿度。Air temperature, air pressure, relative humidity.
在一些实施例中,所述运行数据的时间步长为t,所述运行数据包括:In some embodiments, the time step of the operation data is t, and the operation data includes:
厂站名称、起报时间、预报时间。The name of the plant and station, the starting time of the report, and the forecast time.
各高度的温度、动量通量、风向、风速和相对湿度。Temperature, momentum flux, wind direction, wind speed, and relative humidity at various altitudes.
海平面气压、云量、潜热通量、感热通量、短波辐射通量、长波辐射通量、地表水压、总降水、大尺度降水、对流降水。Sea level pressure, cloud cover, latent heat flux, sensible heat flux, shortwave radiation flux, longwave radiation flux, surface water pressure, total precipitation, large-scale precipitation, convective precipitation.
在一些实施例中,所述采集模块,包括:In some embodiments, the collection module includes:
数据清洗子模块,用于将所述采集气象数据和运行数据归一化,并清洗无效数据。The data cleaning sub-module is used for normalizing the collected meteorological data and operating data, and cleaning invalid data.
在一些实施例中,所述采集模块,包括:In some embodiments, the collection module includes:
第一向量生成子模块,用于令滑窗在数据上滑动,选取滑窗内的气象数据和运行数据,并生成嵌入向量。The first vector generation sub-module is used to make the sliding window slide on the data, select the meteorological data and operating data in the sliding window, and generate an embedding vector.
在一些实施例中,所述编码器包括自注意层和前馈神经网络,所述特征提取模块,包括:In some embodiments, the encoder includes a self-attention layer and a feed-forward neural network, and the feature extraction module includes:
第二向量生成子模块,用于将所述嵌入向量输入自注意层以生成查询向量q、键向量k和值向量v。The second vector generation sub-module is used to input the embedding vector into the self-attention layer to generate query vector q, key vector k and value vector v.
第一评分子模块,用于根据所述q和所述k生成向量评分score。The first scoring submodule is configured to generate a vector scoring score according to the q and the k.
第二评分子模块,根据所述score和归一化参数生成最终评分。The second scoring submodule generates a final score according to the score and normalization parameters.
第三评分子模块,对所述最终评分进行归一化以生成归一化评分。A third scoring submodule, normalizing the final score to generate a normalized score.
第四评分子模块,根据v和归一化评分计算加权评分向量并计算所述加权评分向量之和。The fourth scoring submodule calculates a weighted scoring vector according to v and the normalized scoring and calculates the sum of the weighted scoring vectors.
特征提取子模块,用于将所述加权评分向量之和输入所述前馈神经网络,并生成所述特征图。The feature extraction submodule is used to input the sum of the weighted scoring vectors into the feedforward neural network and generate the feature map.
在一些实施例中,所述解码器包括自注意层、编码-解码注意力层和前馈神经网络。In some embodiments, the decoder includes a self-attention layer, an encoding-decoding attention layer, and a feed-forward neural network.
根据本申请实施例的第四方面,提供一种功率预测网络训练装置,包括:According to a fourth aspect of the embodiments of the present application, a power prediction network training device is provided, including:
数据采集模块,用于根据气象数据和运行数据生成数据集。The data acquisition module is used to generate data sets based on meteorological data and operational data.
标注模块,用于对所述数据集进行标注以生成训练数据集。The labeling module is used for labeling the data set to generate a training data set.
训练模块,用于将所述训练数据集输入所述功率预测网络,并以损失函数最小化为目标进行训练。The training module is used to input the training data set into the power prediction network, and train with the goal of minimizing the loss function.
在一些实施例中,所述标注模块,包括:In some embodiments, the labeling module includes:
标注子模块,用于标注各个时间点上气象数据和运行数据对应的实际功率。The marking sub-module is used to mark the actual power corresponding to the meteorological data and operating data at each time point.
根据本申请实施例的第五方面,提供一种基于卷积transformer架构的风功率预测装置,包括:According to a fifth aspect of the embodiments of the present application, a wind power prediction device based on a convolution transformer architecture is provided, including:
处理器。processor.
用于存储所述处理器可执行指令的存储器;memory for storing said processor-executable instructions;
其中,所述处理器被配置为执行所述指令,以实现如上述第一方面中任一项所述的基于卷积transformer架构的风功率预测方法。Wherein, the processor is configured to execute the instructions, so as to realize the wind power prediction method based on the convolution transformer architecture as described in any one of the above first aspects.
根据本申请实施例的第六方面,提供一种非临时性计算机可读存储介质,当所述存储介质中的指令由基于卷积transformer架构的风功率预测装置的处理器执行时,使得基于卷积transformer架构的风功率预测装置能够执行如上述第一方面中任一项所述的基于卷积transformer架构的风功率预测方法。According to the sixth aspect of the embodiments of the present application, a non-transitory computer-readable storage medium is provided. When the instructions in the storage medium are executed by the processor of the wind power prediction device based on the convolution transformer architecture, the volume based The wind power prediction device of the convolutional transformer architecture can implement the wind power prediction method based on the convolutional transformer architecture as described in any one of the above first aspects.
根据本申请实施例的第七方面,提供一种功率预测网络训练装置,包括:According to the seventh aspect of the embodiments of the present application, a power prediction network training device is provided, including:
处理器。processor.
用于存储所述处理器可执行指令的存储器;memory for storing said processor-executable instructions;
其中,所述处理器被配置为执行所述指令,以实现如上述第二方面所述的功率预测网络训练方法。Wherein, the processor is configured to execute the instructions, so as to implement the power prediction network training method as described in the second aspect above.
根据本申请实施例的第八方面,提供一种非临时性计算机可读存储介质,当所述存储介质中的指令由功率预测网络训练装置的处理器执行时,使得功率预测网络训练装置能够执行如上述第二方面所述的功率预测网络训练方法。According to an eighth aspect of the embodiments of the present application, there is provided a non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the power prediction network training device, the power prediction network training device can execute The power prediction network training method as described in the second aspect above.
根据本申请实施例的第九方面,提供一种计算机程序产品,所述计算机程序产品中包括计算机程序代码,当所述计算机程序代码在计算机上运行时,以执行如上述第一方面所述的方法。According to a ninth aspect of the embodiments of the present application, there is provided a computer program product, the computer program product includes computer program code, when the computer program code is run on a computer, to execute the above-mentioned first aspect method.
根据本申请实施例的第十方面,提供一种计算机程序产品,所述计算机程序产品中包括计算机程序代码,当所述计算机程序代码在计算机上运行时,以执行如上述第二方面所述的方法。According to a tenth aspect of the embodiments of the present application, there is provided a computer program product, the computer program product includes computer program code, when the computer program code is run on a computer, to execute the above-mentioned second aspect method.
根据本申请实施例的第十一方面,提供一种计算机程序,所述计算机程序包括计算机程序代码,当所述计算机程序代码在计算机上运行时,以使得计算机执行如上述第一方面所述的方法。According to an eleventh aspect of the embodiments of the present application, a computer program is provided, the computer program includes computer program code, and when the computer program code is run on a computer, the computer executes the above-mentioned first aspect. method.
根据本申请实施例的第十二方面,提供一种计算机程序,所述计算机程序包括计算机程序 代码,当所述计算机程序代码在计算机上运行时,以使得计算机执行如上述第二方面所述的方法。According to a twelfth aspect of the embodiments of the present application, a computer program is provided, the computer program includes computer program code, and when the computer program code is run on a computer, the computer executes the above-mentioned second aspect. method.
本申请的实施例提供的技术方案至少具有以下优势。The technical solutions provided by the embodiments of the present application have at least the following advantages.
通过对多个时间点数据的关注,增强对局部上下文信息的关注,降低异常数据对预测结果的影响,提高了功率预测的准确度。By focusing on the data at multiple time points, the attention to local context information is enhanced, the influence of abnormal data on the prediction results is reduced, and the accuracy of power prediction is improved.
计算q和k时采用卷积核来进行卷积操作,从而实现使注意力关注局部上下文,使得更相关的特征能够得到匹配。When calculating q and k, the convolution kernel is used to perform the convolution operation, so as to focus attention on the local context, so that more relevant features can be matched.
改进后的功率预测网络能够更快地拟合,在复杂的数据集中可提升了模型的预测准确度,且取得更低的训练损失。The improved power prediction network can fit faster, improve the prediction accuracy of the model in complex data sets, and achieve lower training loss.
附图说明Description of drawings
图1是根据一示例性实施例示出的一种基于卷积transformer架构的风功率预测方法的流程图。Fig. 1 is a flow chart of a wind power prediction method based on a convolutional transformer architecture according to an exemplary embodiment.
图2是根据一示例性实施例示出的一种基于卷积transformer架构的风功率预测方法的流程图。Fig. 2 is a flow chart of a wind power prediction method based on a convolution transformer architecture according to an exemplary embodiment.
图3是根据一示例性实施例示出的一种功率预测网络训练方法的流程图。Fig. 3 is a flowchart showing a method for training a power prediction network according to an exemplary embodiment.
图4是根据一示例性实施例示出的一种基于卷积transformer架构的风功率预测装置的框图。Fig. 4 is a block diagram of a wind power prediction device based on a convolution transformer architecture according to an exemplary embodiment.
图5是根据一示例性实施例示出的一种基于卷积transformer架构的风功率预测装置的框图。Fig. 5 is a block diagram of a wind power prediction device based on a convolution transformer architecture according to an exemplary embodiment.
图6是根据一示例性实施例示出的一种功率预测网络训练装置的框图。Fig. 6 is a block diagram showing a power prediction network training device according to an exemplary embodiment.
图7是根据一示例性实施例示出的功率预测网络预测流程示意图。Fig. 7 is a schematic diagram of a power prediction network prediction process according to an exemplary embodiment.
图8是根据一示例性实施例示出的编码器结构示意图。Fig. 8 is a schematic structural diagram of an encoder according to an exemplary embodiment.
图9是根据一示例性实施例示出的解码器结构示意图。Fig. 9 is a schematic structural diagram of a decoder according to an exemplary embodiment.
图10是根据一示例性实施例示出的一种基于卷积transformer架构的风功率预测装置的框图。Fig. 10 is a block diagram of a wind power prediction device based on a convolution transformer architecture according to an exemplary embodiment.
具体实施方式Detailed ways
为了使本领域普通人员更好地理解本申请的技术方案,下面将结合附图,对本申请实施例中的技术方案进行清楚、完整地描述。In order to enable ordinary persons in the art to better understand the technical solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对 象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。The terms "first", "second" and the like in the specification and claims of the present application and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances such that the embodiments of the application described herein can be practiced in sequences other than those illustrated or described herein. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with aspects of the present application as recited in the appended claims.
风力发电技术正在成为满足未来电力需求的主要来源。更高份额的可再生能源技术对于碳中和满足未来新型电力系统电网的需求至关重要,但也带来了新的电网运行挑战。电力公司需要对风功率发电功率进行预测,以便进行发电调度操作。预测是一个主要的推动因素,可以确保安全和经济的风功率并网,同时在电力系统不同层面的许多灵活性创新之间建立联系,以实现协同效应。准确的风功率预测是一个重要的、具有成本效益的能源管理要素,它还有助于风功率电站和集合系统有效和直接地参与电力市场,并且通过优化供应计划来增加电厂的效益。Wind power technology is becoming a major source of future electricity demand. A higher share of renewable energy technologies is critical to carbon-neutrally meeting the needs of future new power system grids, but also brings new grid operation challenges. Electric power companies need to predict the power generated by wind power in order to carry out power generation dispatching operations. Forecasting is a major enabler to ensure safe and economical integration of wind power, while creating links between many flexibility innovations at different levels of the power system to achieve synergies. Accurate wind power forecasting is an important, cost-effective element of energy management, which also helps wind power plants and aggregation systems to participate effectively and directly in the electricity market, and to increase plant profitability through optimized supply planning.
大部分风功率预测基于时间序列分析的方法都以固定的时间间隔测量的风力发电机组相关数据。相关技术中采用递归神经网络类的模型来对时序序列进行分析预测,但递归神经网络在网络加深时存在梯度消失和梯度爆炸。即使是长短期记忆网络,在捕捉长期依赖上依然力不从心。后续发展出现的Transformer架构更强的长期依赖建模能力,在处理较长时间序列上效果有明显提升。基于递归神经网络的方法面对长序列时无法完全消除梯度消失和梯度爆炸,而Transformer架构则可以在长序列上效果更好,但原始Transformer架构的自注意力计算方法存在对局部信息不敏感,使得模型易受异常点或异常数据的影响导致预测出现偏差。Most wind power forecasting methods are based on time series analysis of wind turbine related data measured at fixed time intervals. In related technologies, a recurrent neural network model is used to analyze and predict time series sequences, but the recurrent neural network has gradient disappearance and gradient explosion when the network is deepened. Even LSTM networks are still incapable of capturing long-term dependencies. The Transformer architecture that emerged in the subsequent development has stronger long-term dependency modeling capabilities, and its effect on processing longer time series has been significantly improved. The method based on the recurrent neural network cannot completely eliminate gradient disappearance and gradient explosion when facing long sequences, while the Transformer architecture can perform better on long sequences, but the self-attention calculation method of the original Transformer architecture is not sensitive to local information. It makes the model vulnerable to outliers or abnormal data, which leads to biased predictions.
本申请提出一种基于卷积transformer架构的风功率预测的方法、装置及存储介质。This application proposes a method, device and storage medium for wind power prediction based on convolutional transformer architecture.
图1是根据一示例性实施例示出的一种基于卷积transformer架构的风功率预测方法的流程图,如图1所示,所述方法包括以下步骤:Fig. 1 is a flow chart of a method for predicting wind power based on a convolution transformer architecture according to an exemplary embodiment. As shown in Fig. 1 , the method includes the following steps:
步骤101,采集气象数据和运行数据,并获取嵌入向量。 Step 101, collect meteorological data and operating data, and obtain embedding vectors.
本申请实施例中,需要采集数据,以输入功率预测网络。风能发电的功率有两大影响因素:风能发电机组的运行状态和风能发电机组周围的气象条件。本申请实施例采集所述气象数据和运行数据,以预测所述风能发电机组的功率。In the embodiment of the present application, data needs to be collected to be input into the power prediction network. The power of wind power generation has two major factors: the operating state of the wind power generating set and the meteorological conditions around the wind power generating set. In this embodiment of the present application, the meteorological data and operating data are collected to predict the power of the wind energy generating set.
所述气象数据包括:风能发电厂的厂站名称、额定容量、发电单元型号、发电单元数量和扩容信息。所述厂站内的厂站出力表含时间和实际功率。气象数据中包括风力数据,所述风力数据包括:指定高度处的风速、风向、气温、气压和相对湿度。所述指定高度可以由实施者根据实际情况调整,本申请不对指定高度进行限定。在一种可能的实施例中,所述指定高度为10米、30米、50米、70米和风机轮毂高度处。运行记录包括起始时间、终止时间以及对应的最大出力上限值。The meteorological data includes: the name of the wind power plant, the rated capacity, the model of the power generation unit, the quantity of the power generation unit, and capacity expansion information. The station output table in the station includes time and actual power. The meteorological data includes wind data, and the wind data includes: wind speed, wind direction, air temperature, air pressure and relative humidity at a specified altitude. The specified height can be adjusted by the implementer according to the actual situation, and this application does not limit the specified height. In a possible embodiment, the designated height is 10 meters, 30 meters, 50 meters, 70 meters and the height of the hub of the wind turbine. The running record includes the start time, end time and corresponding maximum output upper limit.
所述运行数据包括:所述厂站名称、起报时间、预报时间,指定高度处的风速、风向、温 度、相对湿度,在一种可能的实施例中,所述指定高度为10米、30米、70米、100米。同时还需要测量海平面气压、云量、潜热通量、感热通量、动量通量、短波辐射通量、长波辐射通量、地表水压、总降水、大尺度降水、对流降水。The operation data includes: the name of the factory station, the start time, the forecast time, the wind speed, wind direction, temperature, and relative humidity at the designated height. In a possible embodiment, the designated height is 10 meters, 30 meters meters, 70 meters, 100 meters. At the same time, it is also necessary to measure sea level pressure, cloud cover, latent heat flux, sensible heat flux, momentum flux, short-wave radiation flux, long-wave radiation flux, surface water pressure, total precipitation, large-scale precipitation, and convective precipitation.
需要说明的是,所述气象数据和所述运行数据进行周期性采集,每经过一个时间步长t采集一次所述气象数据和所述运行数据,所述t的具体值可以由实施者根据实际情况调整,本申请不对t进行限定。在一种可能的实施例中,所述时间步长t为15分钟。It should be noted that the meteorological data and the operating data are collected periodically, and the meteorological data and the operating data are collected once every time step t. The specific value of t can be determined by the implementer according to the actual situation. The situation is adjusted, and this application does not limit t. In a possible embodiment, the time step t is 15 minutes.
将所述气象数据和运行数据组成时序数据,本申请实施根据多个时间点采集的数据来预测下一时间点的风能发电功率,利用滑窗在所述时序数据上滑动选取若干个连续时间点上的数据,为了功率预测网络顺利识别所述时序序列,根据滑窗选取的数据生成对应的嵌入向量。Combining the weather data and operating data into time series data, this application implements the data collected at multiple time points to predict the wind power generation power at the next time point, and uses the sliding window to slide on the time series data to select several consecutive time points In order for the power prediction network to identify the time series sequence smoothly, the corresponding embedding vector is generated according to the data selected by the sliding window.
步骤102,将所述嵌入向量输入功率预测网络,所述功率预测网络包括编码器和解码器。 Step 102, input the embedding vector into a power prediction network, and the power prediction network includes an encoder and a decoder.
本申请实施例中,所述功率预测网络为卷积迁移transformer架构的神经网络,所述功率预测网络包括编码器和解码器。In the embodiment of the present application, the power prediction network is a neural network of a convolutional migration transformer architecture, and the power prediction network includes an encoder and a decoder.
步骤103,根据所述编码器获取所述嵌入向量对应的特征图。 Step 103, obtain the feature map corresponding to the embedding vector according to the encoder.
本申请实施例中,所述编码器包括自注意层和前馈神经网络,将所述嵌入向量输入所述自注意层并转化为查询向量q、键向量k和值向量v,再将所述q、k、v输入所述前馈神经网络提取特征,以生成所述特征图。In the embodiment of the present application, the encoder includes a self-attention layer and a feed-forward neural network, the embedding vector is input into the self-attention layer and converted into a query vector q, a key vector k and a value vector v, and then the q, k, and v are input into the feedforward neural network to extract features to generate the feature map.
步骤104,将所述特征图输入解码器,以生成预测功率。 Step 104, input the feature map into a decoder to generate prediction power.
本申请实施例中,所述解码器包括自注意层、编码-解码注意力层和前馈神经网络,用于将所述特征图进行降维,以生成所述预测功率。In the embodiment of the present application, the decoder includes a self-attention layer, an encoding-decoding attention layer and a feed-forward neural network, configured to reduce the dimensionality of the feature map to generate the prediction power.
在一些实施例中,所述气象数据的时间步长为t,所述气象数据包括:In some embodiments, the time step of the weather data is t, and the weather data includes:
厂站额定容量、发电单元型号、发电单元数量和扩容信息。Power plant rated capacity, power generation unit model, number of power generation units and capacity expansion information.
厂站出力表实际功率。The actual power of the factory station output table.
风的高度、风速和风向。The height, speed and direction of the wind.
风机轮毂高度处风速和风机轮毂高度处风向。The wind speed at the height of the wind turbine hub and the wind direction at the height of the wind turbine hub.
气温、气压、相对湿度。Air temperature, air pressure, relative humidity.
本申请实施例中,所述气象数据包括:风能发电厂的厂站名称、额定容量、发电单元型号、发电单元数量和扩容信息。所述厂站内的厂站出力表含时间和实际功率。气象数据中包括风力数据,所述风力数据包括:指定高度处的风速、风向、气温、气压和相对湿度。所述指定高度可以由实施者根据实际情况调整,本申请不对指定高度进行限定。在一种可能的实施例中,所述指定高度为10米、30米、50米、70米和风机轮毂高度处。运行记录包括起始时间、终止时间以及对应的最大出力上限值。In the embodiment of the present application, the meteorological data includes: the name of the wind power plant, the rated capacity, the model of the power generation unit, the number of the power generation unit, and capacity expansion information. The station output table in the station includes time and actual power. The meteorological data includes wind data, and the wind data includes: wind speed, wind direction, air temperature, air pressure and relative humidity at a specified height. The specified height can be adjusted by the implementer according to the actual situation, and this application does not limit the specified height. In a possible embodiment, the designated height is 10 meters, 30 meters, 50 meters, 70 meters and the height of the hub of the wind turbine. The running record includes the start time, end time and corresponding maximum output upper limit.
在一些实施例中,所述运行数据的时间步长为t,所述运行数据包括:In some embodiments, the time step of the operation data is t, and the operation data includes:
厂站名称、起报时间、预报时间。The name of the plant and station, the starting time of the report, and the forecast time.
各高度的温度、动量通量、风向、风速和相对湿度。Temperature, momentum flux, wind direction, wind speed, and relative humidity at various altitudes.
海平面气压、云量、潜热通量、感热通量、短波辐射通量、长波辐射通量、地表水压、总降水、大尺度降水、对流降水。Sea level pressure, cloud cover, latent heat flux, sensible heat flux, shortwave radiation flux, longwave radiation flux, surface water pressure, total precipitation, large-scale precipitation, convective precipitation.
本申请实施例中,所述运行数据包括:所述厂站名称、起报时间、预报时间,指定高度处的风速、风向、温度、相对湿度,在一种可能的实施例中,所述指定高度为10米、30米、70米、100米。同时还需要测量海平面气压、云量、潜热通量、感热通量、动量通量、短波辐射通量、长波辐射通量、地表水压、总降水、大尺度降水、对流降水。In the embodiment of the present application, the operation data includes: the name of the plant station, the start time, the forecast time, the wind speed, wind direction, temperature, and relative humidity at the specified altitude. In a possible embodiment, the specified The height is 10 meters, 30 meters, 70 meters, 100 meters. At the same time, it is also necessary to measure sea level pressure, cloud cover, latent heat flux, sensible heat flux, momentum flux, short-wave radiation flux, long-wave radiation flux, surface water pressure, total precipitation, large-scale precipitation, and convective precipitation.
在一些实施例中,所述采集气象数据和运行数据,包括:In some embodiments, the collection of meteorological data and operational data includes:
将所述采集气象数据和运行数据归一化,并清洗无效数据。The collected meteorological data and operating data are normalized, and invalid data is cleaned.
本申请实施例中,为了降低输入所述功率预测网络数据的误差,需要清除无效的运行数据和气象数据。对所述运行数据和气象数据进行数据清洗,删除异常数据。在一种可能的实施例中,通过设置阈值范围来检测与正常实例有显著差异的数据,或通过搜索空值来检测缺失的数据和重复的测量。所有检测到的错误和缺失数据都从初始数据集中丢弃。同时为了防止梯度爆炸,需要将清洗后的数据进行归一化。在一种可能的实施例中,归一化的公式为:
Figure PCTCN2022072596-appb-000001
其中,x norm为归一化后的值,x为原数值,x min为原数值中的最小值,x max为原数值中的最大值。
In the embodiment of the present application, in order to reduce the error of inputting the power prediction network data, it is necessary to clear invalid operating data and meteorological data. Perform data cleaning on the operation data and meteorological data, and delete abnormal data. In one possible embodiment, a threshold range is set to detect data that is significantly different from normal instances, or missing data and repeated measurements are detected by searching for null values. All detected errors and missing data are discarded from the initial dataset. At the same time, in order to prevent gradient explosion, the cleaned data needs to be normalized. In a possible embodiment, the normalized formula is:
Figure PCTCN2022072596-appb-000001
Among them, x norm is the normalized value, x is the original value, x min is the minimum value in the original value, and x max is the maximum value in the original value.
在一些实施例中,所述获取嵌入向量,包括:In some embodiments, the obtaining the embedding vector includes:
令滑窗在数据上滑动,选取滑窗内的气象数据和运行数据,并生成嵌入向量。Let the sliding window slide on the data, select the meteorological data and operating data in the sliding window, and generate an embedding vector.
本申请实施例中,将所述气象数据和运行数据组成时序数据,本申请实施根据多个时间点采集的数据来预测下一时间点的风能发电功率,利用滑窗在所述时序数据上滑动选取若干个连续时间点上的数据,为了功率预测网络顺利识别所述时序序列,根据滑窗选取的数据生成对应的嵌入向量。In the embodiment of this application, the meteorological data and operating data are combined into time-series data. This application implements the data collected at multiple time points to predict the wind power generation power at the next time point, and uses a sliding window to slide on the time-series data The data at several consecutive time points are selected, and the corresponding embedding vector is generated according to the data selected by the sliding window in order for the power prediction network to successfully identify the time series.
图2是根据一示例性实施例示出的一种基于卷积transformer架构的风功率预测方法的流程图,所述编码器包括自注意层和前馈神经网络,如图2所示,所述方法包括以下步骤:Fig. 2 is a flow chart of a wind power prediction method based on a convolutional transformer architecture shown according to an exemplary embodiment, the encoder includes a self-attention layer and a feed-forward neural network, as shown in Fig. 2 , the method Include the following steps:
步骤201,将所述嵌入向量输入自注意层以生成查询向量q、键向量k和值向量v。 Step 201, input the embedding vector into the self-attention layer to generate query vector q, key vector k and value vector v.
本申请实施例中,通过自注意层获取所述嵌入向量对应的查询向量q、键向量k和值向量v,以进行后续的评分计算,获取注意力评分。In the embodiment of the present application, the query vector q, key vector k, and value vector v corresponding to the embedding vector are obtained from the attention layer to perform subsequent score calculation and obtain the attention score.
步骤202,根据所述q和所述k生成向量评分score。 Step 202, generating a vector score score according to the q and the k.
本申请实施例中,所述q和k用于计算所述嵌入向量的评分score,score的计算公式为: score=|q×k|,通过q和k相乘获取score。In the embodiment of the present application, the q and k are used to calculate the score of the embedding vector, and the calculation formula of the score is: score=|q×k|, and the score is obtained by multiplying q and k.
步骤203,根据所述score和归一化参数生成最终评分。 Step 203, generate a final score according to the score and normalization parameters.
本申请实施例中,为了使梯度稳定,需要使所述score归一化,即用score除以归一化参数
Figure PCTCN2022072596-appb-000002
在一种可能的实施例中,所述d k为键向量k的维度数量。在另一种可能的实施例中,所述score=112,所述k的维度数量为64,则最终评分为
Figure PCTCN2022072596-appb-000003
In the embodiment of this application, in order to stabilize the gradient, it is necessary to normalize the score, that is, divide the score by the normalization parameter
Figure PCTCN2022072596-appb-000002
In a possible embodiment, the d k is the number of dimensions of the key vector k. In another possible embodiment, the score=112, the number of dimensions of k is 64, and the final score is
Figure PCTCN2022072596-appb-000003
步骤204,对所述最终评分进行归一化以生成归一化评分。 Step 204, normalize the final score to generate a normalized score.
本申请实施例中,利用归一化函数对所述最终评分进行归一化。在一种可能的实施例中,所述归一化函数为softmax函数,将所述最终评分输入所述softmax函数,以生成所述归一化评分。所述归一化评分表示当前时间点对应的嵌入向量对预测功率的贡献大小,归一化评分越高,说明所述嵌入向量对应的数据与预测功率关系越紧密,对预测功率的贡献越大。在一种可能的实施例中,所述最终评分为12,经过softmax函数的归一化处理后输出归一化评分0.88,所述归一化评分用于后续为z加权。In the embodiment of the present application, a normalization function is used to normalize the final score. In a possible embodiment, the normalization function is a softmax function, and the final score is input into the softmax function to generate the normalization score. The normalized score indicates the contribution of the embedded vector corresponding to the current time point to the predicted power. The higher the normalized score, the closer the relationship between the data corresponding to the embedded vector and the predicted power, and the greater the contribution to the predicted power . In a possible embodiment, the final score is 12, and a normalized score of 0.88 is output after being normalized by the softmax function, and the normalized score is used for subsequent z-weighting.
步骤205,根据v和归一化评分计算加权评分向量并计算所述加权评分向量之和。 Step 205, calculate a weighted score vector according to v and the normalized score and calculate the sum of the weighted score vectors.
本申请实施例中,用所述归一化评分和所述v相乘,获取加权评分向量,将各个加权评分向量相加集合得到加权评分向量之和。In the embodiment of the present application, the normalized score is multiplied by the v to obtain a weighted score vector, and each weighted score vector is added to a set to obtain the sum of the weighted score vectors.
步骤206,将所述加权评分向量之和输入所述前馈神经网络,并生成所述特征图。 Step 206, input the sum of the weighted scoring vectors into the feedforward neural network, and generate the feature map.
再将所述加权评分向量之和输入所述前馈神经网络,提取特征以生成所述特征图。Then, the sum of the weighted scoring vectors is input into the feedforward neural network, and features are extracted to generate the feature map.
在一些实施例中,所述解码器包括自注意层、编码-解码注意力层和前馈神经网络。In some embodiments, the decoder includes a self-attention layer, an encoding-decoding attention layer, and a feed-forward neural network.
图8是根据一示例性实施例示出的编码器结构示意图。如图8所示,所述编码器包括自注意力层和前馈神经网络。Fig. 8 is a schematic structural diagram of an encoder according to an exemplary embodiment. As shown in Figure 8, the encoder includes a self-attention layer and a feed-forward neural network.
本申请实施例中,图9是根据一示例性实施例示出的解码器结构示意图。如图9所示,所述解码器中也有编码器的自注意层和前馈神经网络。除此之外,这两个层之间还有一个编码-解码层(即编码-解码注意力层),用来关注输入嵌入向量的相关部分。所述编码-解码注意力层为全连接网络,其中有两层网络,第一层的激活函数是ReLU,ReLU激活函数的公式化表达为
Figure PCTCN2022072596-appb-000004
通过ReLU实现稀疏后的模型能够更好地挖掘相关特征,拟合训练数据;第二层为线性激活函数。整个编码-解码注意力层可以总结为FFN(Z)函数:FFN(Z)=max(0,ZW 1+b 1)W 2+b 2
In this embodiment of the present application, FIG. 9 is a schematic structural diagram of a decoder according to an exemplary embodiment. As shown in FIG. 9 , the decoder also has a self-attention layer and a feed-forward neural network of the encoder. Besides, there is an encoder-decoder layer (i.e., encoder-decoder attention layer) between these two layers to focus on relevant parts of the input embedding vector. The encoding-decoding attention layer is a fully connected network, wherein there are two layers of networks, the activation function of the first layer is ReLU, and the formulation of the ReLU activation function is expressed as
Figure PCTCN2022072596-appb-000004
The sparse model achieved through ReLU can better mine relevant features and fit the training data; the second layer is a linear activation function. The whole encoding-decoding attention layer can be summarized as FFN(Z) function: FFN(Z)=max(0, ZW 1 +b 1 )W 2 +b 2 .
图7是根据一示例性实施例示出的功率预测网络预测流程示意图。如图所示,通过滑窗选取4个时间点上的气象数据和运行数据,根据卷积核生成对应的查询向量q、键向量k和值向量v,并输入编码器中的自注意层,计算注意力的相关评分,输出加权评分向量之和。Fig. 7 is a schematic diagram of a power prediction network prediction process according to an exemplary embodiment. As shown in the figure, the meteorological data and operating data at four time points are selected through the sliding window, and the corresponding query vector q, key vector k, and value vector v are generated according to the convolution kernel, and input to the self-attention layer in the encoder. Computes the correlation score for attention and outputs the sum of weighted score vectors.
图3是根据一示例性实施例示出的一种功率预测网络训练方法的流程图,如图3所示,所述方法包括以下步骤:Fig. 3 is a flowchart of a method for training a power prediction network according to an exemplary embodiment. As shown in Fig. 3, the method includes the following steps:
步骤301,根据气象数据和运行数据生成数据集。 Step 301, generating a data set according to meteorological data and operating data.
本申请实施例中,利用多种传感器采集所述气象数据和运行数据后,即可构建数据集,来训练所述功率预测网络。所述数据集为时序数据集,气象数据和运行数据的时间步长为t,在一种可能的实施例中,所述t=15分钟。在一种可能的实施例中,用不同的数据分割方法分割所述数据集,将2年内记录的数据集分成训练集和测试集。从原始时间序列中提取10个不同的训练集,按顺序或随机地将第一年的评估数据集划分出10%的训练集、30%的训练集、50%的训练集和70%的训练集。In the embodiment of the present application, after the meteorological data and operating data are collected by various sensors, a data set can be constructed to train the power prediction network. The data set is a time series data set, and the time step of the meteorological data and the operating data is t, and in a possible embodiment, the t=15 minutes. In a possible embodiment, different data segmentation methods are used to divide the data set, and the data set recorded within 2 years is divided into a training set and a test set. Extract 10 different training sets from the original time series, sequentially or randomly split the first-year evaluation dataset into 10% train, 30% train, 50% train, and 70% train set.
步骤302,对所述数据集进行标注以生成训练数据集。 Step 302, label the data set to generate a training data set.
本申请实施例中,对所述数据集中的数据进行标注,标注各个时间点上采集的气象数据和运行数据对应风能发电的实际功率,以训练所述功率预测网络。In the embodiment of the present application, the data in the data set are marked, and the meteorological data and operation data collected at each time point correspond to the actual power of wind power generation, so as to train the power prediction network.
步骤303,将所述训练数据集输入所述功率预测网络,并以损失函数最小化为目标进行训练。 Step 303, input the training data set into the power prediction network, and train with the goal of minimizing the loss function.
本申请实施例中,将所述训练数据集输入所述功率预测网络进行迭代训练,利用滑窗在所述训练数据集上滑动选取若干个连续时间点上的数据并输入所述功率预测网络,输出预测功率,将所述预测功率和所述实际功率进行对比,计算损失函数。以所述损失函数最小化为目标优化所述功率预测网络中的参数。经过训练后即可获取推荐的功率预测网络。In the embodiment of the present application, the training data set is input into the power prediction network for iterative training, and the data at several consecutive time points are selected by sliding on the training data set with a sliding window and input into the power prediction network, The predicted power is output, and the predicted power is compared with the actual power to calculate a loss function. The parameters in the power prediction network are optimized with the goal of minimizing the loss function. After training, the recommended power prediction network can be obtained.
在一些实施例中,所述对所述数据集进行标注以生成训练数据集,包括:In some embodiments, the labeling the data set to generate a training data set includes:
标注各个时间点上气象数据和运行数据对应的实际功率。Mark the actual power corresponding to the meteorological data and operating data at each time point.
图4是根据一示例性实施例示出的一种基于卷积transformer架构的风功率预测装置的框图。参照图4,该装置400包括采集模块410,输入模块420、特征提取模块430和预测模块440。Fig. 4 is a block diagram of a wind power prediction device based on a convolution transformer architecture according to an exemplary embodiment. Referring to FIG. 4 , the device 400 includes an acquisition module 410 , an input module 420 , a feature extraction module 430 and a prediction module 440 .
采集模块410,用于采集气象数据和运行数据,并获取嵌入向量。The collection module 410 is used to collect meteorological data and operating data, and obtain embedded vectors.
输入模块420,用于将所述嵌入向量输入功率预测网络,所述功率预测网络包括编码器和解码器。The input module 420 is configured to input the embedding vector into a power prediction network, and the power prediction network includes an encoder and a decoder.
特征提取模块430,用于根据所述编码器获取所述嵌入向量对应的特征图。The feature extraction module 430 is configured to obtain a feature map corresponding to the embedding vector according to the encoder.
预测模块440,用于将所述特征图输入解码器,以生成预测功率。A prediction module 440, configured to input the feature map into a decoder to generate prediction power.
在一些实施例中,所述气象数据的时间步长为t,所述气象数据包括:In some embodiments, the time step of the weather data is t, and the weather data includes:
厂站额定容量、发电单元型号、发电单元数量和扩容信息。Power plant rated capacity, power generation unit model, number of power generation units and capacity expansion information.
厂站出力表实际功率。The actual power of the factory station output table.
风的高度、风速和风向。The height, speed and direction of the wind.
风机轮毂高度处风速和风机轮毂高度处风向。The wind speed at the height of the wind turbine hub and the wind direction at the height of the wind turbine hub.
气温、气压、相对湿度。Air temperature, air pressure, relative humidity.
在一些实施例中,所述运行数据的时间步长为t,所述运行数据包括:In some embodiments, the time step of the operation data is t, and the operation data includes:
厂站名称、起报时间、预报时间。The name of the plant and station, the starting time of the report, and the forecast time.
各高度的温度、动量通量、风向、风速和相对湿度。Temperature, momentum flux, wind direction, wind speed, and relative humidity at various altitudes.
海平面气压、云量、潜热通量、感热通量、短波辐射通量、长波辐射通量、地表水压、总降水、大尺度降水、对流降水。Sea level pressure, cloud cover, latent heat flux, sensible heat flux, shortwave radiation flux, longwave radiation flux, surface water pressure, total precipitation, large-scale precipitation, convective precipitation.
在一些实施例中,所述采集模块410,包括:In some embodiments, the collection module 410 includes:
数据清洗子模块411,用于将所述采集气象数据和运行数据归一化,并清洗无效数据。The data cleaning sub-module 411 is used for normalizing the collected meteorological data and operating data, and cleaning invalid data.
在一些实施例中,所述采集模块410,包括:In some embodiments, the collection module 410 includes:
第一向量生成子模块412,用于令滑窗在数据上滑动,选取滑窗内的气象数据和运行数据,并生成嵌入向量。The first vector generation sub-module 412 is used to make the sliding window slide on the data, select the meteorological data and operating data in the sliding window, and generate an embedding vector.
图5是根据一示例性实施例示出的一种基于卷积transformer架构的风功率预测装置的框图。参照图5,该装置500包括第二向量生成子模块510、第一评分子模块520、第二评分子模块530、第三评分子模块540、第四评分子模块550和特征提取子模块560。Fig. 5 is a block diagram of a wind power prediction device based on a convolution transformer architecture according to an exemplary embodiment. Referring to FIG. 5 , the apparatus 500 includes a second vector generation submodule 510 , a first scoring submodule 520 , a second scoring submodule 530 , a third scoring submodule 540 , a fourth scoring submodule 550 and a feature extraction submodule 560 .
第二向量生成子模块510,用于将所述嵌入向量输入自注意层以生成查询向量q、键向量k和值向量v。The second vector generation sub-module 510 is configured to input the embedding vector into the self-attention layer to generate a query vector q, a key vector k and a value vector v.
第一评分子模块520,用于根据所述q和所述k生成向量评分score。The first scoring sub-module 520 is configured to generate a vector score score according to the q and the k.
第二评分子模块530,根据所述score和归一化参数生成最终评分。The second scoring sub-module 530 generates a final score according to the score and normalization parameters.
第三评分子模块540,对所述最终评分进行归一化以生成归一化评分。The third scoring sub-module 540 normalizes the final score to generate a normalized score.
第四评分子模块550,根据v和归一化评分计算加权评分向量并计算所述加权评分向量之和。The fourth scoring sub-module 550 calculates a weighted scoring vector according to v and the normalized scoring and calculates the sum of the weighted scoring vectors.
特征提取子模块560,用于将所述加权评分向量之和输入所述前馈神经网络,并生成所述特征图。The feature extraction sub-module 560 is configured to input the sum of the weighted scoring vectors into the feedforward neural network, and generate the feature map.
在一些实施例中,所述解码器包括自注意层、编码-解码注意力层和前馈神经网络。In some embodiments, the decoder includes a self-attention layer, an encoding-decoding attention layer, and a feed-forward neural network.
图6是根据一示例性实施例示出的一种功率预测网络训练装置的框图。参照图6,该装置600包括数据采集模块610、标注模块620和训练模块630。Fig. 6 is a block diagram showing a power prediction network training device according to an exemplary embodiment. Referring to FIG. 6 , the device 600 includes a data collection module 610 , a labeling module 620 and a training module 630 .
数据采集模块610,用于根据气象数据和运行数据生成数据集。The data acquisition module 610 is configured to generate a data set according to meteorological data and operating data.
标注模块620,用于对所述数据集进行标注以生成训练数据集。The labeling module 620 is configured to label the data set to generate a training data set.
训练模块630,用于将所述训练数据集输入所述功率预测网络,并以损失函数最小化为目 标进行训练。A training module 630, configured to input the training data set into the power prediction network, and train with the goal of minimizing the loss function.
在一些实施例中,所述标注模块620,包括:In some embodiments, the labeling module 620 includes:
标注子模块621,用于标注各个时间点上气象数据和运行数据对应的实际功率。The marking sub-module 621 is used to mark the actual power corresponding to the meteorological data and the operating data at each time point.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the foregoing embodiments, the specific manner in which each module executes operations has been described in detail in the embodiments related to the method, and will not be described in detail here.
图10是根据一示例性实施例示出的一种用于实现所述基于卷积transformer架构的风功率预测方法的装置1000的框图。Fig. 10 is a block diagram of an apparatus 1000 for realizing the wind power prediction method based on the convolution transformer architecture according to an exemplary embodiment.
在示例性实施例中,还提供了一种包括指令的存储介质,例如包括指令的存储器1010,接口1030,上述指令可由装置1000的处理器1020执行以完成上述方法。在一些实施例中,存储介质可以是非临时性计算机可读存储介质,例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, there is also provided a storage medium including instructions, such as a memory 1010 including instructions, and an interface 1030 , the instructions can be executed by the processor 1020 of the device 1000 to complete the above method. In some embodiments, the storage medium may be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical disk. data storage devices, etc.
在示例性实施例中,还提供了一种计算机程序产品,所述计算机程序产品中包括计算机程序代码,当所述计算机程序代码在计算机上运行时,以执行上述方法。In an exemplary embodiment, a computer program product is also provided, the computer program product includes computer program code, and when the computer program code is run on a computer, the above method is executed.
在示例性实施例中,还提供了一种计算机程序,所述计算机程序包括计算机程序代码,当所述计算机程序代码在计算机上运行时,以使得计算机执行上述方法。In an exemplary embodiment, there is also provided a computer program, the computer program includes computer program code, and when the computer program code is run on a computer, it causes the computer to execute the above method.
本申请所有实施例均可以单独被执行,也可以与其他实施例相结合被执行,均视为本公开要求的保护范围。All the embodiments of the present application may be implemented independently or in combination with other embodiments, and all of them shall be regarded as the scope of protection required by the present disclosure.

Claims (18)

  1. 一种基于卷积transformer架构的风功率预测方法,其特征在于,包括:A method for predicting wind power based on convolution transformer architecture, characterized in that it includes:
    采集气象数据和运行数据,并获取嵌入向量;Collect meteorological data and operational data, and obtain embedding vectors;
    将所述嵌入向量输入功率预测网络,所述功率预测网络包括编码器和解码器;inputting the embedding vector into a power prediction network comprising an encoder and a decoder;
    根据所述编码器获取所述嵌入向量对应的特征图;Obtaining a feature map corresponding to the embedding vector according to the encoder;
    将所述特征图输入解码器,以生成预测功率。The feature maps are fed into a decoder to generate predicted powers.
  2. 根据权利要求1所述的方法,其特征在于,所述气象数据的时间步长为t,所述气象数据包括:The method according to claim 1, wherein the time step of the weather data is t, and the weather data includes:
    厂站额定容量、发电单元型号、发电单元数量和扩容信息;Power station rated capacity, power generation unit model, number of power generation units and capacity expansion information;
    厂站出力表实际功率;The actual power of the plant output meter;
    风的高度、风速和风向;the height, speed and direction of the wind;
    风机轮毂高度处风速和风机轮毂高度处风向;The wind speed at the height of the fan hub and the wind direction at the height of the fan hub;
    气温、气压、相对湿度。Air temperature, air pressure, relative humidity.
  3. 根据权利要求1或2所述的方法,其特征在于,所述运行数据的时间步长为t,所述运行数据包括:The method according to claim 1 or 2, wherein the time step of the operating data is t, and the operating data includes:
    厂站名称、起报时间、预报时间;The name of the plant and station, the starting time of reporting, and the forecasting time;
    各高度的温度、动量通量、风向、风速和相对湿度;Temperature, momentum flux, wind direction, wind speed and relative humidity at each altitude;
    海平面气压、云量、潜热通量、感热通量、短波辐射通量、长波辐射通量、地表水压、总降水、大尺度降水、对流降水。Sea level pressure, cloud cover, latent heat flux, sensible heat flux, shortwave radiation flux, longwave radiation flux, surface water pressure, total precipitation, large-scale precipitation, convective precipitation.
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述采集气象数据和运行数据,包括:The method according to any one of claims 1 to 3, wherein the collecting meteorological data and operating data includes:
    将所述采集气象数据和运行数据归一化,并清洗无效数据。The collected meteorological data and operating data are normalized, and invalid data is cleaned.
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述获取嵌入向量,包括:The method according to any one of claims 1 to 4, wherein said obtaining an embedding vector comprises:
    令滑窗在数据上滑动,选取滑窗内的气象数据和运行数据,并生成嵌入向量。Let the sliding window slide on the data, select the meteorological data and operating data in the sliding window, and generate an embedding vector.
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,所述编码器包括自注意层和前馈神经网络,所述根据所述编码器获取所述嵌入向量对应的特征图,包括:The method according to any one of claims 1 to 5, wherein the encoder includes a self-attention layer and a feed-forward neural network, and the feature map corresponding to the embedding vector is obtained according to the encoder, include:
    将所述嵌入向量输入自注意层以生成查询向量q、键向量k和值向量v;Input the embedding vector into the self-attention layer to generate query vector q, key vector k and value vector v;
    根据所述q和所述k生成向量评分score;Generate a vector scoring score according to the q and the k;
    根据所述score和归一化参数生成最终评分;Generate a final score according to the score and normalization parameters;
    对所述最终评分进行归一化以生成归一化评分;normalizing the final score to generate a normalized score;
    根据v和归一化评分计算加权评分向量并计算所述加权评分向量之和;Calculate a weighted score vector according to v and the normalized score and calculate the sum of the weighted score vectors;
    将所述加权评分向量之和输入所述前馈神经网络,并生成所述特征图。The sum of the weighted scoring vectors is input into the feedforward neural network, and the feature map is generated.
  7. 根据权利要求1至6中任一项所述的方法,其特征在于,所述解码器包括自注意层、编码-解码注意力层和前馈神经网络。The method according to any one of claims 1 to 6, wherein the decoder comprises a self-attention layer, an encoding-decoding attention layer and a feed-forward neural network.
  8. 一种功率预测网络训练方法,其特征在于,用于训练权利要求1-7中任一项所述的功率预测网络,包括:A power prediction network training method, characterized in that it is used to train the power prediction network described in any one of claims 1-7, comprising:
    根据气象数据和运行数据生成数据集;Generate datasets from meteorological data and operational data;
    对所述数据集进行标注以生成训练数据集;labeling the data set to generate a training data set;
    将所述训练数据集输入所述功率预测网络,并以损失函数最小化为目标进行训练。The training data set is input into the power prediction network, and the training is carried out with the goal of minimizing the loss function.
  9. 根据权利要求8所述的方法,其特征在于,所述对所述数据集进行标注以生成训练数据集,包括:The method according to claim 8, wherein said labeling said data set to generate a training data set comprises:
    标注各个时间点上气象数据和运行数据对应的实际功率。Mark the actual power corresponding to the meteorological data and operating data at each time point.
  10. 一种基于卷积transformer架构的风功率预测装置,其特征在于,包括:A wind power prediction device based on convolution transformer architecture, characterized in that it comprises:
    采集模块,用于采集气象数据和运行数据,并获取嵌入向量;The collection module is used to collect meteorological data and operational data, and obtain embedded vectors;
    输入模块,用于将所述嵌入向量输入功率预测网络,所述功率预测网络包括编码器和解码器;An input module, configured to input the embedding vector into a power prediction network, and the power prediction network includes an encoder and a decoder;
    特征提取模块,用于根据所述编码器获取所述嵌入向量对应的特征图;A feature extraction module, configured to obtain a feature map corresponding to the embedding vector according to the encoder;
    预测模块,用于将所述特征图输入解码器,以生成预测功率。A prediction module, configured to input the feature map into a decoder to generate prediction power.
  11. 一种基于卷积transformer架构的风功率预测装置,其特征在于,包括:A wind power prediction device based on convolution transformer architecture, characterized in that it comprises:
    处理器;processor;
    用于存储所述处理器可执行指令的存储器;memory for storing said processor-executable instructions;
    其中,所述处理器被配置为执行所述指令,以实现如权利要求1至7中任一项所述的基于卷积transformer架构的风功率预测方法。Wherein, the processor is configured to execute the instructions, so as to realize the wind power prediction method based on the convolution transformer architecture according to any one of claims 1-7.
  12. 一种非临时性计算机可读存储介质,其特征在于,当所述存储介质中的指令由基于卷积transformer架构的风功率预测装置的处理器执行时,使得基于卷积transformer架构的风功率预测装置能够执行如权利要求1至7中任一项所述的基于卷积transformer架构的风功率预测方法。A non-transitory computer-readable storage medium, characterized in that, when the instructions in the storage medium are executed by the processor of the wind power prediction device based on the convolution transformer architecture, the wind power prediction based on the convolution transformer architecture The device is capable of executing the wind power prediction method based on the convolution transformer architecture according to any one of claims 1 to 7.
  13. 一种功率预测网络训练装置,其特征在于,包括:A power prediction network training device, characterized in that it comprises:
    处理器;processor;
    用于存储所述处理器可执行指令的存储器;memory for storing said processor-executable instructions;
    其中,所述处理器被配置为执行所述指令,以实现如权利要求8或9所述的功率预测网络 训练方法。Wherein, the processor is configured to execute the instructions, so as to realize the power prediction network training method as claimed in claim 8 or 9.
  14. 一种非临时性计算机可读存储介质,其特征在于,当所述存储介质中的指令由功率预测网络训练装置的处理器执行时,使得功率预测网络训练装置能够执行如权利要求8或9所述的功率预测网络训练方法。A non-transitory computer-readable storage medium, characterized in that, when the instructions in the storage medium are executed by the processor of the power prediction network training device, the power prediction network training device can execute the The power prediction network training method described above.
  15. 一种计算机程序产品,其特征在于,所述计算机程序产品中包括计算机程序代码,当所述计算机程序代码在计算机上运行时,以执行如权利要求1至7中任一项所述的方法。A computer program product, characterized in that the computer program product includes computer program code, and when the computer program code is run on a computer, the method according to any one of claims 1 to 7 is executed.
  16. 一种计算机程序产品,其特征在于,所述计算机程序产品中包括计算机程序代码,当所述计算机程序代码在计算机上运行时,以执行如权利要求8或9所述的方法。A computer program product, characterized in that the computer program product includes computer program code, and when the computer program code is run on a computer, the method as claimed in claim 8 or 9 is executed.
  17. 一种计算机程序,其特征在于,所述计算机程序包括计算机程序代码,当所述计算机程序代码在计算机上运行时,以使得计算机执行如权利要求1至7中任一项所述的方法。A computer program, characterized in that the computer program includes computer program code, and when the computer program code is run on a computer, the computer executes the method according to any one of claims 1 to 7.
  18. 一种计算机程序,其特征在于,所述计算机程序包括计算机程序代码,当所述计算机程序代码在计算机上运行时,以使得计算机执行如权利要求8或9所述的方法。A computer program, characterized in that the computer program includes computer program code, and when the computer program code is run on a computer, the computer is made to execute the method as claimed in claim 8 or 9.
PCT/CN2022/072596 2021-10-29 2022-01-18 Wind power prediction method based on convolutional transformer architecture, and system and device WO2023070960A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111274987.2A CN114021803A (en) 2021-10-29 2021-10-29 Wind power prediction method, system and equipment based on convolution transform architecture
CN202111274987.2 2021-10-29

Publications (1)

Publication Number Publication Date
WO2023070960A1 true WO2023070960A1 (en) 2023-05-04

Family

ID=80058831

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/072596 WO2023070960A1 (en) 2021-10-29 2022-01-18 Wind power prediction method based on convolutional transformer architecture, and system and device

Country Status (2)

Country Link
CN (1) CN114021803A (en)
WO (1) WO2023070960A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116930973A (en) * 2023-09-15 2023-10-24 湖南赛能环测科技有限公司 Scene-adaptive sodar wind power accurate prediction method
CN117111540A (en) * 2023-10-25 2023-11-24 南京德克威尔自动化有限公司 Environment monitoring and early warning method and system for IO remote control bus module
CN117132606A (en) * 2023-10-24 2023-11-28 四川大学 Segmentation method for lung lesion image
CN117293916A (en) * 2023-08-22 2023-12-26 国网安徽省电力有限公司天长市供电公司 User-oriented power grid dispatching method and device and computing equipment
CN117559519A (en) * 2023-10-31 2024-02-13 北京瑞科同创能源科技有限公司 Wind power plant power data prediction method and device and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019216449A1 (en) * 2018-05-09 2019-11-14 주식회사 알고리고 Method and apparatus for time series artificial neural network electric vehicle power demand prediction, using spatio-temporal fusion of power demand data and heterogeneous data
CN112653142A (en) * 2020-12-18 2021-04-13 武汉大学 Wind power prediction method and system for optimizing depth transform network
CN112991090A (en) * 2021-02-05 2021-06-18 江南大学 Photovoltaic power prediction method based on Transformer model
CN113177633A (en) * 2021-04-20 2021-07-27 浙江大学 Deep decoupling time sequence prediction method
CN113343590A (en) * 2021-07-08 2021-09-03 华北电力大学(保定) Wind speed prediction method and system based on combined model
CN113935534A (en) * 2021-10-20 2022-01-14 华能大理风力发电有限公司洱源分公司 Photovoltaic day-ahead prediction method, system and equipment based on convolution transform architecture

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019216449A1 (en) * 2018-05-09 2019-11-14 주식회사 알고리고 Method and apparatus for time series artificial neural network electric vehicle power demand prediction, using spatio-temporal fusion of power demand data and heterogeneous data
CN112653142A (en) * 2020-12-18 2021-04-13 武汉大学 Wind power prediction method and system for optimizing depth transform network
CN112991090A (en) * 2021-02-05 2021-06-18 江南大学 Photovoltaic power prediction method based on Transformer model
CN113177633A (en) * 2021-04-20 2021-07-27 浙江大学 Deep decoupling time sequence prediction method
CN113343590A (en) * 2021-07-08 2021-09-03 华北电力大学(保定) Wind speed prediction method and system based on combined model
CN113935534A (en) * 2021-10-20 2022-01-14 华能大理风力发电有限公司洱源分公司 Photovoltaic day-ahead prediction method, system and equipment based on convolution transform architecture

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
XIE, LINFENG ET AL.: "Short Term Prediction of Wind Power Based on a New Technology", COMPUTER SIMULATION, vol. 7, no. 37, 31 July 2020 (2020-07-31), XP009545767, ISSN: 1006-9348 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117293916A (en) * 2023-08-22 2023-12-26 国网安徽省电力有限公司天长市供电公司 User-oriented power grid dispatching method and device and computing equipment
CN117293916B (en) * 2023-08-22 2024-04-23 国网安徽省电力有限公司天长市供电公司 User-oriented power grid dispatching method and device and computing equipment
CN116930973A (en) * 2023-09-15 2023-10-24 湖南赛能环测科技有限公司 Scene-adaptive sodar wind power accurate prediction method
CN116930973B (en) * 2023-09-15 2023-12-08 湖南赛能环测科技有限公司 Scene-adaptive sodar wind power accurate prediction method
CN117132606A (en) * 2023-10-24 2023-11-28 四川大学 Segmentation method for lung lesion image
CN117132606B (en) * 2023-10-24 2024-01-09 四川大学 Segmentation method for lung lesion image
CN117111540A (en) * 2023-10-25 2023-11-24 南京德克威尔自动化有限公司 Environment monitoring and early warning method and system for IO remote control bus module
CN117111540B (en) * 2023-10-25 2023-12-29 南京德克威尔自动化有限公司 Environment monitoring and early warning method and system for IO remote control bus module
CN117559519A (en) * 2023-10-31 2024-02-13 北京瑞科同创能源科技有限公司 Wind power plant power data prediction method and device and electronic equipment

Also Published As

Publication number Publication date
CN114021803A (en) 2022-02-08

Similar Documents

Publication Publication Date Title
WO2023070960A1 (en) Wind power prediction method based on convolutional transformer architecture, and system and device
CN103117546B (en) A kind of Ultrashort-term slide prediction method for wind power
Grantham et al. Nonparametric short-term probabilistic forecasting for solar radiation
Gallagher et al. Development and application of a machine learning supported methodology for measurement and verification (M&V) 2.0
Li et al. A multi-data driven hybrid learning method for weekly photovoltaic power scenario forecast
Gao et al. Strong modulation of the Pacific meridional mode on the occurrence of intense tropical cyclones over the western North Pacific
WO2015196133A2 (en) Energy infrastructure sensor data rectification using regression models
Maatallah et al. Wind power assessment and evaluation of electricity generation in the Gulf of Tunis, Tunisia
Lojowska et al. Advantages of ARMA-GARCH wind speed time series modeling
CN110929963A (en) Wind speed prediction method, wind speed prediction device, and storage medium
Quiring et al. Incorporating hurricane forecast uncertainty into a decision-support application for power outage modeling
CN103631681A (en) Method for online restoring abnormal data of wind power plant
Cui et al. Statistical scenarios forecasting method for wind power ramp events using modified neural networks
Saxena et al. A review study of weather forecasting using artificial neural network approach
Ouyang et al. Ramp events forecasting based on long‐term wind power prediction and correction
CN113935534A (en) Photovoltaic day-ahead prediction method, system and equipment based on convolution transform architecture
WO2020140127A1 (en) Systems and methods distributed-solar power forecasting using parameter regularization
Liu et al. Modeling tidal current speed using a Wakeby distribution
Katikas et al. A stochastic simulation scheme for the long-term persistence, heavy-tailed and double periodic behavior of observational and reanalysis wind time-series
Kotsiantis et al. Filling missing temperature values in weather data banks
Gonzalez-Longatt Wind Resource Potential in Los Taques-Venezuela
CN115908051A (en) Method for determining energy storage capacity of power system
Afrasiabi et al. Probability density function forecasting of electricity price: Deep gabor convolutional mixture network
Yan et al. Analysis of extreme wind speed estimates in the northern South China Sea
Kartini et al. Short term forecasting of global solar irradiance by k-nearest neighbor multilayer backpropagation learning neural network algorithm

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22884880

Country of ref document: EP

Kind code of ref document: A1