CN110363354B - Wind power prediction method for wind farm, electronic device and storage medium - Google Patents

Wind power prediction method for wind farm, electronic device and storage medium Download PDF

Info

Publication number
CN110363354B
CN110363354B CN201910640312.1A CN201910640312A CN110363354B CN 110363354 B CN110363354 B CN 110363354B CN 201910640312 A CN201910640312 A CN 201910640312A CN 110363354 B CN110363354 B CN 110363354B
Authority
CN
China
Prior art keywords
wind speed
wind
prediction
day
clustering
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201910640312.1A
Other languages
Chinese (zh)
Other versions
CN110363354A (en
Inventor
沈惟舟
李柠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Jiaotong University
Original Assignee
Shanghai Jiaotong University
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 Shanghai Jiaotong University filed Critical Shanghai Jiaotong University
Priority to CN201910640312.1A priority Critical patent/CN110363354B/en
Publication of CN110363354A publication Critical patent/CN110363354A/en
Application granted granted Critical
Publication of CN110363354B publication Critical patent/CN110363354B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • 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
    • 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/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/06Electricity, gas or water supply

Abstract

The application provides a wind power prediction method of a wind field, an electronic device and a storage medium, wherein the method comprises the following steps: acquiring the hourly wind speed history data of a wind field in a daily period containing the history wind speed, and constructing a corresponding multidimensional wind speed characteristic vector; clustering the multidimensional wind speed feature vectors by using an improved K-means clustering method to obtain a plurality of clustering results; integrating historical wind speed and day samples by using the clustering result and obtaining a corresponding random forest prediction model; classifying the wind speed day to be predicted according to the initial wind speed feature vector of the initial prediction result to obtain the class of the wind speed day to be predicted, acquiring a corresponding random forest prediction model, and carrying out multi-step iterative prediction according to the initial wind speed feature vector by taking a preset number of hours as a time step to obtain the wind power prediction result of the wind speed day to be predicted. The modeling method solves the problem that modeling in the prior art is rough, calculation is very complex, prediction accuracy is relatively poor, and accordingly implementation is simpler and more convenient, and higher prediction accuracy is provided.

Description

Wind power prediction method for wind farm, electronic device and storage medium
Technical Field
The present disclosure relates to wind power prediction technologies, and in particular, to a wind power prediction method for a wind farm, an electronic device, and a storage medium.
Background
Along with the prominence of environmental problems and the exhaustion of traditional energy sources, renewable energy sources such as solar energy, wind energy and tidal energy are attracting more and more attention, wherein wind energy is used as a novel renewable energy source which is convenient, environment-friendly and efficient, has wide application prospect, and the wind energy industry in China is subjected to great upgrading and expansion. The wind energy is mainly used for generating electricity through wind power and is integrated into a power grid, so that the energy sources are more abundant, and meanwhile, a certain pressure is brought to the safe and stable operation of a power system. Because wind energy is closely related to weather conditions such as wind speed and the like, the wind power generation device has the characteristics of randomness, instability and the like, so that the output of wind power generation is unstable, and the output of the wind power generation device can change along with the change of wind speed. Therefore, when wind power is connected with the grid, certain influence can be brought to the safe and stable operation of the grid. The technical problem of wind power integration always restricts the development and utilization of wind energy. To solve this problem, predicting the wind power output of a wind farm is an effective approach.
Currently, one of the main methods for predicting wind power is by physical methods. The prediction accuracy of the physical method and the dependence thereof on an accurate physical model are poor if the built model is rough. In addition, the physical method is generally applied to a large wind power prediction system due to very complex calculation, and is realized by the calculation capability of a large computer.
Content of the application
In view of the above drawbacks of the prior art, an object of the present application is to provide a wind power prediction method, an electronic device, and a storage medium for solving the problem that a model modeling by using a physical method is relatively coarse in the prior art, and the problem that the calculation is very complex and the prediction accuracy is relatively poor, so that the implementation is simpler and more convenient, and higher prediction accuracy is provided.
To achieve the above and other related objects, the present application provides a wind power prediction method for a wind farm, including: acquiring wind speed historical data of a wind field, which comprises wind speed values of each hour in a historical wind speed day, and constructing a multidimensional wind speed feature vector corresponding to each historical wind speed day according to the wind speed values of each hour in each historical wind speed day; wherein each dimension corresponds to an hour time point of a wind speed value; corresponding to each historical wind speed day, clustering each multidimensional wind speed feature vector by using an improved K-means clustering method to obtain clustering results of a plurality of categories; integrating historical wind speed daily samples by using clustering results respectively corresponding to each category, and respectively training to obtain random forest prediction models corresponding to each category; classifying the wind speed day to be predicted according to an initial wind speed feature vector corresponding to an initial prediction result to obtain a class of the wind speed day to be predicted, acquiring a corresponding random forest prediction model according to the class of the wind speed day to be predicted, and performing multi-step iterative prediction according to the initial wind speed feature vector by using the acquired random forest prediction model with a preset number of hours as a time step to obtain a wind power prediction result of the wind speed day to be predicted.
In an embodiment of the present application, the improved K-means clustering method combines euclidean distance and cosine distance to obtain a mixed distance metric function, and then uses the K-means clustering method to perform clustering according to the mixed distance metric function.
In one embodiment of the present application, the hybrid distance metric function is defined as:
D mix (x i ,x k )==c 1 D suc (x i ,x k )+c 2 D cos (x i ,x k );
Figure BDA0002131625540000021
Figure BDA0002131625540000022
Figure BDA0002131625540000023
Figure BDA0002131625540000024
D cos (x i ,x k )=1-D ac (x i ,x k );
wherein D is mix (x i ,x k ) For the mixed distance metric function employed between two samples, D euc (x i ,x k ) Is the Euclidean distance between two samples, D cos (x i ,x k ) Between two samplesCosine distance, c 1 And c 2 The constant coefficient K is used for increasing the proportion of the cosine distance of the included angle when judging the distance between samples.
In an embodiment of the present application, the number of the clustering results is determined by a statistical parameter SSE;
in an embodiment of the present application, the calculation formula of the SSE is:
Figure BDA0002131625540000025
wherein C is i Is the ith cluster, p is C i Sample points m in (1) i Is C i Is defined in the above-described document).
In an embodiment of the present application, integrating the historical wind speed daily samples in units of days and respectively training one or more random forest prediction models includes:
(1) Resampling the historical wind speed day samples with a Bagging method to obtain n sample subsets { D ] with the same sample capacity as D 1 ,D 2 ,…D n };
(2) In the construction of each decision tree of a random forest, selecting one of sample subsets as a training set of the decision tree, randomly selecting M (M < M) features from all features, selecting an optimal splitting mode for splitting decision tree nodes based on the M features, and continuously repeating the process until a certain preset condition is reached, wherein each decision tree is not pruned, so that each decision tree grows completely;
(3) Combining n decision trees generated based on the sample subset to generate a random forest;
(4) When the test sample is input into the random forest model, the output result is the average value of all the predicted values of the decision tree.
In one embodiment of the present application, the mathematical model of the iterative multi-step prediction method is:
Figure BDA0002131625540000031
where y is the wind power value, f represents the predictive model, and p represents the dimension of the model input.
In an embodiment of the present application, further includes: performing prediction analysis on the power prediction result by calculating a prediction index NMAE; the calculation formula of the prediction index NMAE is as follows:
Figure BDA0002131625540000032
wherein p is i As an actual measured value of the wind power,
Figure BDA0002131625540000033
as the predicted value of wind power, P install Is the rated value of the output power of the wind field.
To achieve the above and other related objects, the present application provides an electronic device, including: a processor and a memory; the memory is used for storing a computer program, and the processor is used for executing the computer program stored by the memory so as to enable the terminal to execute the wind power prediction method of the wind farm.
To achieve the above and other related objects, the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the wind farm wind power prediction method.
As described above, the wind power prediction method, the electronic device and the storage medium for wind farms have the following beneficial effects: the method solves the problems of coarseness, complex calculation and poor prediction precision of the modeling type by using a physical method in the prior art, so that the method is simpler and more convenient to realize and provides higher prediction precision.
Drawings
Fig. 1 is a flow chart of a wind power prediction method of a wind farm according to an embodiment of the present application.
Fig. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Other advantages and effects of the present application will become apparent to those skilled in the art from the present disclosure, when the following description of the embodiments is taken in conjunction with the accompanying drawings. The present application may be embodied or carried out in other specific embodiments, and the details of the present application may be modified or changed from various points of view and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict.
It is noted that in the following description, reference is made to the accompanying drawings, which describe several embodiments of the present application. It is to be understood that other embodiments may be utilized and that mechanical, structural, electrical, and operational changes may be made without departing from the spirit and scope of the present application. The following detailed description is not to be taken in a limiting sense, and the scope of embodiments of the present application is defined only by the claims of the issued patent. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. Spatially relative terms, such as "upper," "lower," "left," "right," "lower," "below," "lower," "above," "upper," and the like, may be used herein to facilitate a description of one element or feature as illustrated in the figures relative to another element or feature.
Throughout the specification, when a portion is said to be "coupled" to another portion, this includes not only the case of "direct connection" but also the case of "indirect connection" with other elements interposed therebetween. In addition, when a certain component is said to be "included" in a certain section, unless otherwise stated, other components are not excluded, but it is meant that other components may be included.
The first, second, and third terms are used herein to describe various portions, components, regions, layers and/or sections, but are not limited thereto. These terms are only used to distinguish one portion, component, region, layer or section from another portion, component, region, layer or section. Thus, a first portion, component, region, layer or section discussed below could be termed a second portion, component, region, layer or section without departing from the scope of the present application.
Furthermore, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context indicates otherwise. It will be further understood that the terms "comprises," "comprising," "includes," and/or "including" specify the presence of stated features, operations, elements, components, items, categories, and/or groups, but do not preclude the presence, presence or addition of one or more other features, operations, elements, components, items, categories, and/or groups. The terms "or" and/or "as used herein are to be construed as inclusive, or meaning any one or any combination. Thus, "A, B or C" or "A, B and/or C" means "any of the following: a, A is as follows; b, a step of preparing a composite material; c, performing operation; a and B; a and C; b and C; A. b and C). An exception to this definition will occur only when a combination of elements, functions or operations are in some way inherently mutually exclusive.
Currently, one of the main methods for predicting wind power is by physical methods. The prediction accuracy of the physical method and the dependence thereof on an accurate physical model are poor if the built model is rough. In addition, the physical method is generally applied to a large wind power prediction system due to very complex calculation, and is realized by the calculation capability of a large computer.
Therefore, the wind power prediction method for the wind field is used for solving the problem that modeling by using a physical method is rough in the prior art, is very complex in calculation and relatively poor in prediction precision, is simpler and more convenient to realize, and provides relatively high prediction precision.
The method comprises the following steps: acquiring wind speed historical data of a wind field, which comprises wind speed values of each hour in a historical wind speed day, and constructing a multidimensional wind speed feature vector corresponding to each historical wind speed day according to the wind speed values of each hour in each historical wind speed day; wherein each dimension corresponds to an hour time point of a wind speed value; corresponding to each historical wind speed day, clustering each multidimensional wind speed feature vector by using an improved K-means clustering method to obtain clustering results of a plurality of categories; integrating historical wind speed daily samples by using clustering results respectively corresponding to each category, and respectively training to obtain random forest prediction models corresponding to each category; classifying the wind speed day to be predicted according to an initial wind speed feature vector corresponding to an initial prediction result to obtain a class of the wind speed day to be predicted, acquiring a corresponding random forest prediction model according to the class of the wind speed day to be predicted, and performing multi-step iterative prediction according to the initial wind speed feature vector by using the acquired random forest prediction model with a preset number of hours as a time step to obtain a wind power prediction result of the wind speed day to be predicted.
The following detailed description of the embodiments of the present application is provided with reference to fig. 1, so that those skilled in the art to which the present application pertains can easily implement the embodiments. This application may be embodied in many different forms and is not limited to the embodiments described herein.
Fig. 1 is a schematic flow chart of a wind power prediction method in a wind farm according to an embodiment of the present application.
The method comprises the following steps:
step S11: acquiring wind speed historical data of a wind field, which comprises wind speed values of each hour in a historical wind speed day, and constructing a multidimensional wind speed feature vector corresponding to each historical wind speed day according to the wind speed values of each hour in each wind speed day; wherein each dimension corresponds to an hour time point of a wind speed value.
Optionally, acquiring wind speed history data in a wind farm, wherein the wind speed history data is a wind speed value of each hour in each wind speed day including all historical wind speed days; constructing a wind speed characteristic vector according to the hourly wind speed value in each wind speed day in the wind speed historical data, wherein the wind speed characteristic vector is a multidimensional wind speed characteristic vector corresponding to each historical wind speed day; the dimension of each corresponding wind speed feature vector corresponds to an hour time point of a wind speed value.
Optionally, constructing a multidimensional wind speed feature vector corresponding to each historical wind speed day according to the hourly wind speed value in each wind speed day:
S={S 0 ,S 1 ,S 2 ,…S 22 ,S 23 }
wherein S is 0 ,S 1 …S 23 The wind speed values are the hour time points of each dimension of the corresponding wind speed feature vector corresponding to one wind speed value, and the total is 24.
Alternatively, the hour time point of each dimension corresponding to one wind speed value is an integral point, for example, the hour time point of each dimension corresponding to one wind speed value is 0 point, 1 point … point.
Step S12: and clustering the multidimensional wind speed feature vectors by using an improved K-means clustering method according to each historical wind speed day to obtain clustering results of a plurality of categories.
Optionally, according to each historical wind speed day, clustering the most wind speed feature vectors of each historical wind speed day by using an improved K-means clustering method, and obtaining a plurality of clustering results after clustering, wherein each clustering result belongs to different categories.
Step S13: and integrating the historical wind speed and day samples by using clustering results respectively corresponding to each category to obtain random forest prediction models respectively corresponding to each category.
Optionally, the historical wind speed daily samples are integrated by using clustering results corresponding to each category respectively to obtain random forest prediction models corresponding to each category, wherein the random forest prediction models are algorithms fused by a plurality of decision trees, belong to one algorithm of a Bagging framework, the weak models of the random forest are the "forest" trained by the decision tree algorithm (CART algorithm), the CART algorithm can be used for regression and classification, and the "random" means that the constructed models have certain randomness. The training of each decision tree model is extracted by self-sampling (boost sampling), so that the training samples of each sub-model are not identical, and each sub-model has some samples that are not in the training set of the model, and those samples that are not extracted by the sub-model can be used as the test set of the sub-model. Each decision tree model is built without using all characteristic variables, and a subset is randomly extracted from all the characteristics to train the model, so that the fact that not only are training samples not identical, but also the characteristic variables are not identical is guaranteed, and the randomness of a plurality of sub-models is well guaranteed.
Specifically, integrating wind field history samples by using clustering results of respective categories, wherein the wind field history samples comprise wind speed values of each history wind speed day and data of wind power corresponding to the wind speed values; training a random forest model by utilizing wind speeds and corresponding wind power values in historical data, wherein the input value of the random forest model is a wind speed value of a historical wind speed day, the output is future wind power, the integrated data are used as a unit of day, training sets of different prediction models are arranged, and training is carried out by adopting different types of wind speed day sample sets to obtain a plurality of types of random forest multi-step prediction models of wind speed days.
Step S14: classifying the wind speed day to be predicted according to an initial wind speed feature vector corresponding to an initial prediction result to obtain a class of the wind speed day to be predicted, acquiring a corresponding random forest prediction model according to the class of the wind speed day to be predicted, and performing multi-step iterative prediction according to the initial wind speed feature vector by using the acquired random forest prediction model with a preset number of hours as a time step to obtain a wind power prediction result of the wind speed day to be predicted.
Optionally, classifying the day to be predicted according to the initial prediction result and the initial wind speed feature vector corresponding to the day to be predicted to obtain a category of the day to be predicted, acquiring a corresponding random forest prediction model according to the category of the day to be predicted, and performing multi-step iterative prediction according to the initial wind speed feature vector by using the acquired random forest prediction model with a preset number of hours as a time step to obtain a wind power prediction result of the day to be predicted. For example, a preset 6 hours is used for multi-step iterative prediction for a time step. Specifically, according to an initial prediction result of a day to be measured, the initial prediction result is hourly wind speed value data of the day to be measured; constructing a multidimensional wind speed feature vector corresponding to a day to be detected as an initial wind speed feature vector according to a wind speed value of each hour in the day to be detected, classifying according to the clustering result to obtain a category of the day to be detected, acquiring a random forest prediction model corresponding to the category of the day to be detected according to the category of the day to be detected, and after acquiring the random forest prediction model, carrying out a preset time step on the random forest prediction model, wherein the time step is a fixed number of hours, and carrying out multi-step iteration prediction according to the initial wind speed feature vector after the preset time step, so as to obtain a wind power prediction result of the day to be detected.
Optionally, the improved K-means clustering method is to combine Euclidean distance and cosine distance to obtain a mixed distance measurement function, and then to use the K-means clustering method to perform clustering according to the mixed distance measurement function. The K-Means clustering method K-Means is a Cluster Analysis method, wherein the clustering is to group data objects into a plurality of classes or clusters (clusters), so that objects in the same Cluster have higher similarity, and objects in different clusters have larger differences. Clustering may be based on partitioning or layering. Partitioning is the partitioning of objects into different clusters, while layering is the ranking of objects. For a data object, it can only be divided into one cluster. If a data object can be divided into clusters, it is called Overlapping (Overlapping). Distance-based clustering is to bring similar objects that are close together. Clustering based on probability distribution models is to find a set of objects, among a set of objects, that can conform to a particular distribution model, that are not necessarily nearest or most similar, but can perfectly represent the model described by the probability distribution model. Since the K-Means algorithm values operate on a given complete data set, without any special training data, K-Means is an unsupervised machine learning method. First, given the number of partitions k, an initial partition is created, k objects are randomly selected from the dataset, each object initially representing a Cluster center (Cluster center). For other objects, their distances from the center of each cluster are calculated and they are grouped into clusters closest to each other. Iterative relocation techniques are employed to attempt to improve partitioning by moving objects between partitions. The relocation technique is to recalculate the average value of a cluster when a new object is added to the cluster or an existing object is left from the cluster, and then reassign the object. This process is repeated until the objects in each cluster are no longer changing.
Specifically, an improved K-means clustering method is used for clustering historical wind speed days according to wind speed feature vectors, in the clustering, a similarity measurement function is used for calculating the similarity of samples, and a mixed distance measurement function is constructed for K-means clustering by combining Euclidean distance and cosine distance aiming at the wind speed feature vectors. Wherein Euclidean distance (Euclidean Distance) is a classical spatial distance method for measuring similarity between samples. Angle Cosine (Angle Cosine) is a similarity coefficient method, and is more concerned with waveform similarity of time sequences than Euclidean distance to space distance calculation.
Optionally, consider a set of data samples
X={x ij |i=1,2,…,n;j=1,2,…,m}
Where n represents the number of samples and m represents the dimension of the samples. The euclidean distance between two samples is defined as:
Figure BDA0002131625540000081
optionally, the mathematical formula of the cosine of the included angle is:
Figure BDA0002131625540000082
the larger the value of the cosine of the included angle is [ -1,1], the more similar the two samples are. In order to be able to conform to the physical principle that the smaller the distance is, the more similar the sample is, in this embodiment, the cosine distance of the included angle is defined as:
D cos (x i ,x k )=1-D ac (x i ,x k )
mapping the value range to [0,2], wherein the smaller the value is, the higher the similarity between the two samples is.
Optionally, the similarity of wind speed sequence samples is multifaceted, and the two wind speed sequences can be close in space distance or similar in waveform. In order to more comprehensively cluster wind speed sequences, in the embodiment, a similarity measurement mode of a K-means algorithm is improved, cosine distances are added into original Euclidean distance measurement, a new mixed similarity measurement mode is constructed, and similarity between sequences is judged from two angles of a space distance and a sequence waveform. The mathematical formula of the mixed distance measurement function is as follows:
D mix (x i ,x k )=c 1 D euc (x i ,x k )+c 2 D cos (x i ,x k )
wherein, c1 and c2 are weights of two distance calculation modes, and the calculation modes are shown as follows:
Figure BDA0002131625540000083
Figure BDA0002131625540000084
wherein D is mix (x i ,x k ) For the mixed distance metric function employed between two samples, D euc (x i ,x k ) Is the Euclidean distance between two samples, D cos (x i ,x k ) C is the cosine distance between two samples 1 And c 2 The constant coefficient K is used for increasing the proportion of the cosine distance of the included angle when judging the distance between samples.
Optionally, the number of the clustering results is determined by a statistical parameter SSE; specifically, the number of clustering results is determined by an elbow method, and a core index for determining the number of clustering results is a statistical parameter SSE. SSE is the sum of the cluster errors of all samples, and the finer the sample division is as the number of cluster results increases.
Optionally, the calculation formula of the statistical parameter SSE is:
Figure BDA0002131625540000091
wherein C is i Is the ith cluster, p is C i Sample points m in (1) i Is C i Is defined in the above-described document).
As the number of clustering results increases, the sample division becomes finer, the aggregation degree of each cluster becomes higher, and the SSE becomes smaller. When the number of the clustering results is smaller than the optimal clustering number, the aggregation degree of each cluster is greatly increased due to the increase of the number of the clustering results, so that the descending degree of SSE is large, and when the number of the clustering results reaches the real clustering number, the aggregation degree return obtained by increasing the number of the clustering results is rapidly reduced, the descending degree of SSE is rapidly reduced, and then the descending degree of SSE tends to be gentle along with the increase of the number of the clustering results. The relation diagram of SSE and the number of clustering results is an elbow shape, and the number of the clustering results corresponding to the elbow shape is the optimal clustering number.
Optionally, integrating the historical wind speed daily samples by day and respectively training one or more random forest prediction models, including:
(1) Firstly, sampling by using a Bagging method, specifically, resampling from a historical wind speed day sample by using the Bagging method in a put-back way to obtain n sample subsets { D ] with the same sample capacity as D 1 ,D 2 ,…,D n }。
(2) Training a random forest prediction model, firstly constructing random forest decision trees, selecting one of sample subsets as a training set of each decision tree in the construction of each decision tree of the random forest, randomly selecting M (M < M) features from all features, selecting an optimal splitting mode for splitting decision tree nodes based on the M features, and continuously repeating the process until a certain preset condition is reached, wherein each decision tree is not pruned, and each decision tree grows completely.
(3) Combining n decision trees generated according to the sample subset to generate a random forest;
(4) Inputting the sample to be tested into a random forest model, and taking average value of all the predicted values of the decision tree as the output result.
Optionally, the mathematical model of the iterative multi-step prediction method is:
Figure BDA0002131625540000092
where y is the wind power value, f is the prediction model, p is the dimension of the model input, and every time a step size value is predicted, the value is used to replace the input farthest in the time line in the original input to predict the next step size. For example, the wind speed predicted value of each hour whole point of the wind power plant is obtained through numerical weather prediction on the predicted day, the predicted day is classified according to the distance from each clustering center, iterative multi-step wind power prediction for 6 hours in advance is performed through a corresponding random forest prediction model, and 4 times of prediction are performed for the complete iteration of one day.
Optionally, the method further comprises: performing prediction analysis on the power prediction result by calculating a prediction index NMAE; and carrying the power prediction result into a calculation formula of the prediction index NMAE to obtain a prediction index, wherein the calculation formula of the prediction index NMAE is as follows:
Figure BDA0002131625540000101
wherein p is i As an actual measured value of the wind power,
Figure BDA0002131625540000102
as the predicted value of wind power, P install Is the rated value of the output power of the wind field.
As shown in fig. 2, a schematic structural diagram of the electronic device 20 in the embodiment of the present application is shown.
The electronic device 20 includes: a memory 21 and a processor 22, the memory 21 for storing a computer program; the processor 22 runs a computer program to implement the wind farm wind power prediction method as described in fig. 1.
Alternatively, the number of the memories 21 may be one or more, and the number of the processors 22 may be one or more, and one is taken as an example in fig. 2.
Optionally, the processor 22 in the electronic device 20 loads one or more instructions corresponding to the process of the application program into the memory 21 according to the steps as described in fig. 1, and the processor 22 executes the application program stored in the memory 21, so as to implement various functions in the wind farm wind power prediction method as described in fig. 1.
Optionally, the memory 21 may include, but is not limited to, high speed random access memory, nonvolatile memory. Such as one or more disk storage devices, flash memory devices, or other non-volatile solid-state storage devices; the processor 22 may include, but is not limited to, a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
Alternatively, the processor 22 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
The present application also provides a computer readable storage medium storing a computer program which when run implements a wind farm wind power prediction method as shown in fig. 1. The computer-readable storage medium may include, but is not limited to, floppy diskettes, optical disks, CD-ROMs (compact disk-read only memories), magneto-optical disks, ROMs (read-only memories), RAMs (random access memories), EPROMs (erasable programmable read only memories), EEPROMs (electrically erasable programmable read only memories), magnetic or optical cards, flash memory, or other type of media/machine-readable medium suitable for storing machine-executable instructions. The computer readable storage medium may be an article of manufacture that is not accessed by a computer device or may be a component used by an accessed computer device.
In summary, the wind power prediction method, the electronic device and the storage medium for wind farm of the present application include: acquiring wind speed historical data of a wind field, which comprises wind speed values of each hour in a historical wind speed day, and constructing a multidimensional wind speed feature vector corresponding to each historical wind speed day according to the wind speed values of each hour in each historical wind speed day; wherein each dimension corresponds to an hour time point of a wind speed value; corresponding to each historical wind speed day, clustering each multidimensional wind speed feature vector by using an improved K-means clustering method to obtain clustering results of a plurality of categories; integrating historical wind speed daily samples by using clustering results respectively corresponding to each category, and respectively training to obtain random forest prediction models corresponding to each category; classifying the wind speed day to be predicted according to an initial wind speed feature vector corresponding to an initial prediction result to obtain a class of the wind speed day to be predicted, acquiring a corresponding random forest prediction model according to the class of the wind speed day to be predicted, and performing multi-step iterative prediction according to the initial wind speed feature vector by using the acquired random forest prediction model with a preset number of hours as a time step to obtain a wind power prediction result of the wind speed day to be predicted. The method solves the problems of coarseness, complex calculation and poor prediction precision of the modeling type by using a physical method in the prior art, so that the method is simpler and more convenient to realize and provides higher prediction precision. Therefore, the method effectively overcomes various defects in the prior art and has high industrial utilization value.
The foregoing embodiments are merely illustrative of the principles of the present application and their effectiveness, and are not intended to limit the application. Modifications and variations may be made to the above-described embodiments by those of ordinary skill in the art without departing from the spirit and scope of the present application. Accordingly, it is intended that all equivalent modifications and variations which may be accomplished by persons skilled in the art without departing from the spirit and technical spirit of the disclosure be covered by the claims of this application.

Claims (7)

1. A method for predicting wind power in a wind farm, comprising:
acquiring wind speed historical data of a wind field, which comprises wind speed values of each hour in a historical wind speed day, and constructing a multidimensional wind speed feature vector corresponding to each historical wind speed day according to the wind speed values of each hour in each historical wind speed day; wherein each dimension corresponds to an hour time point of a wind speed value;
corresponding to each historical wind speed day, clustering each multidimensional wind speed feature vector by using an improved K-means clustering method to obtain clustering results of a plurality of categories;
integrating historical wind speed daily samples by using clustering results respectively corresponding to each category, and respectively training to obtain random forest prediction models corresponding to each category;
classifying the wind speed day to be predicted according to an initial wind speed feature vector corresponding to an initial prediction result to obtain a class of the wind speed day to be predicted, acquiring a corresponding random forest prediction model according to the class of the wind speed day to be predicted, and performing multi-step iterative prediction according to the initial wind speed feature vector by using the acquired random forest prediction model with a preset number of hours as a time step to obtain a wind power prediction result of the wind speed day to be predicted;
the improved K-means clustering method is to combine Euclidean distance and cosine distance to obtain a mixed distance measurement function, and then to use the K-means clustering method to perform clustering according to the mixed distance measurement function;
and wherein the hybrid distance metric function is defined as:
D mix (x i ,x k )=c 1 D euc (x i ,x k )+c 2 D cos (x i, x k );
Figure FDA0003974905900000011
Figure FDA0003974905900000012
Figure FDA0003974905900000013
Figure FDA0003974905900000014
D cos (x i ,x k )=1-D ac (x i ,x k );
wherein D is mix (x i ,x k ) For the mixed distance metric function employed between two samples, D euc (x i ,x k ) Is the Euclidean distance between two samples, D cos (x i ,x k ) C is the cosine distance between two samples 1 And c 2 The constant coefficient K is used for increasing the proportion of the cosine distance of the included angle when judging the distance between samples.
2. A method of predicting wind power in a wind farm according to claim 1, wherein the number of clustered results is determined by a statistical parameter SSE.
3. The wind farm wind power prediction method according to claim 2, wherein the calculation formula of the SSE is:
Figure FDA0003974905900000021
wherein C is i Is the ith cluster, p is C i Sample points m in (1) i Is C i Is defined in the above-described document).
4. The wind farm wind power prediction method according to claim 1, wherein the mathematical model of the iterative multi-step prediction method is:
Figure FDA0003974905900000022
where y is the wind power value, f represents the predictive model, and p represents the dimension of the model input.
5. The wind farm wind power prediction method according to claim 1, further comprising: performing prediction analysis on the power prediction result by calculating a prediction index NMAE; the calculation formula of the prediction index NMAE is as follows:
Figure FDA0003974905900000023
wherein p is i As an actual measured value of the wind power,
Figure FDA0003974905900000024
as the predicted value of wind power, P install Is the rated value of the output power of the wind field.
6. An electronic device, comprising:
a memory for storing a computer program;
a processor for running the computer program to perform the wind park wind power prediction method according to any one of claims 1 to 5.
7. A computer storage medium, characterized in that a computer program is stored, which computer program, when run, implements the wind park wind power prediction method according to any one of claims 1 to 5.
CN201910640312.1A 2019-07-16 2019-07-16 Wind power prediction method for wind farm, electronic device and storage medium Active CN110363354B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910640312.1A CN110363354B (en) 2019-07-16 2019-07-16 Wind power prediction method for wind farm, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910640312.1A CN110363354B (en) 2019-07-16 2019-07-16 Wind power prediction method for wind farm, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN110363354A CN110363354A (en) 2019-10-22
CN110363354B true CN110363354B (en) 2023-05-02

Family

ID=68219575

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910640312.1A Active CN110363354B (en) 2019-07-16 2019-07-16 Wind power prediction method for wind farm, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN110363354B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112285807B (en) * 2019-11-12 2023-11-07 北京嘉韵楷达气象科技有限公司 Meteorological information prediction method and device
CN111242345A (en) * 2019-12-26 2020-06-05 浙江大学 Nuclear power unit electric power prediction method based on cluster analysis and random forest regression
CN112613632A (en) * 2020-03-31 2021-04-06 北京金风慧能技术有限公司 Power prediction model establishing method, prediction method and device and electronic equipment
CN115511227B (en) * 2022-11-21 2023-04-07 国能日新科技股份有限公司 Wind power generation power prediction method and device based on stable learning
CN117370790A (en) * 2023-10-13 2024-01-09 江苏智谨创新能源科技有限公司 Automatic fault alarm method and system for photovoltaic power generation assembly

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104299044A (en) * 2014-07-01 2015-01-21 沈阳工程学院 Clustering-analysis-based wind power short-term prediction system and prediction method
CN105654207A (en) * 2016-01-07 2016-06-08 国网辽宁省电力有限公司锦州供电公司 Wind power prediction method based on wind speed information and wind direction information
CN108280545A (en) * 2018-01-19 2018-07-13 上海电力学院 A kind of photovoltaic power prediction technique based on K mean cluster neural network
CN109508379A (en) * 2018-12-21 2019-03-22 上海文军信息技术有限公司 A kind of short text clustering method indicating and combine similarity based on weighted words vector

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104299044A (en) * 2014-07-01 2015-01-21 沈阳工程学院 Clustering-analysis-based wind power short-term prediction system and prediction method
CN105654207A (en) * 2016-01-07 2016-06-08 国网辽宁省电力有限公司锦州供电公司 Wind power prediction method based on wind speed information and wind direction information
CN108280545A (en) * 2018-01-19 2018-07-13 上海电力学院 A kind of photovoltaic power prediction technique based on K mean cluster neural network
CN109508379A (en) * 2018-12-21 2019-03-22 上海文军信息技术有限公司 A kind of short text clustering method indicating and combine similarity based on weighted words vector

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
"Wind Power Prediction based on Random Forests";Zehong Zhou等;《ICEEECS 2016》;20161231;全文 *
"基于数据驱动的超短期风电功率预测综述";杨茂 等;《电力系统保护与控制》;20190701;全文 *
"基于混合距离学习的鲁棒的模糊C均值聚类算法";卞则康 等;《智能系统学报》;20170831;全文 *
"基于相似日和风速连续性的风电场短期功率预测";倪鹏 等;《山东电力技术》;20161231;全文 *

Also Published As

Publication number Publication date
CN110363354A (en) 2019-10-22

Similar Documents

Publication Publication Date Title
CN110363354B (en) Wind power prediction method for wind farm, electronic device and storage medium
CN107944622B (en) Wind power prediction method based on continuous time interval clustering
CN111860982A (en) Wind power plant short-term wind power prediction method based on VMD-FCM-GRU
Hu et al. Research and application of a hybrid model based on Meta learning strategy for wind power deterministic and probabilistic forecasting
CN110750524A (en) Method and system for determining fault characteristics of active power distribution network
CN109902953A (en) A kind of classification of power customers method based on adaptive population cluster
Pei et al. Short-term regional wind power forecasting based on spatial–temporal correlation and dynamic clustering model
CN113361785A (en) Power distribution network short-term load prediction method and device, terminal and storage medium
CN113193551A (en) Short-term power load prediction method based on multi-factor and improved feature screening strategy
Kiran et al. Tree-seed programming for modelling of Turkey electricity energy demand
CN110263834A (en) A kind of detection method of new energy power quality exceptional value
Bidoki et al. Comparison of several clustering methods in the case of electrical load curves classification
CN112651576A (en) Long-term wind power prediction method and device
CN109858667A (en) It is a kind of based on thunder and lightning weather to the short term clustering method of loading effects
Mukilan et al. Prediction of rooftop photovoltaic solar potential using machine learning
CN110135511B (en) Method and device for determining time section of power system and electronic equipment
Pazhoohesh et al. Dealing with missing data in the smart buildings using innovative imputation techniques
Wang et al. A stacking-based short-term wind power forecasting method by CBLSTM and ensemble learning
CN116777039A (en) Double-layer neural network wind speed prediction method based on training set segmentation and error correction
Hui et al. Ultra-short-term prediction of wind power based on fuzzy clustering and RBF neural network
CN114298132A (en) Wind power prediction method and device and electronic equipment
CN115270921A (en) Power load prediction method, system and storage medium based on combined prediction model
Qin Software reliability prediction model based on PSO and SVM
Jiang et al. Discharge estimation based on machine learning
CN114118812A (en) Hydropower station energy efficiency analysis and evaluation method and device based on improved fuzzy mean clustering

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant