Short-term power curve prediction method and device for offshore wind plant, terminal equipment and storage medium
By acquiring dynamic data in offshore wind farms and combining intelligent optimization algorithms and LSTM models to dynamically calibrate the predicted power curve, the problem of insufficient power prediction accuracy in offshore wind farms is solved, achieving higher prediction accuracy and grid stability.
Patent Information
- Application Number
- CN202510810025.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-09-19
AI Technical Summary
The existing technology for offshore wind farm power prediction is not accurate enough and lacks a dynamic calibration mechanism, resulting in a high error rate in the prediction results and failing to meet the accuracy requirements for stable grid operation.
By obtaining the dynamic power curve and meteorological data of the offshore wind farm, combined with intelligent optimization algorithms and LSTM models, model parameter training and random particle weight adjustment are carried out to dynamically calibrate the predicted power curve, reduce the impact of random noise, and improve prediction accuracy.
The accuracy of short-term power forecasts for offshore wind farms has been significantly improved, the error in the forecast results has been reduced, and the accuracy requirements for stable operation of the power grid have been met.
Smart Images

Figure CN120675056A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of offshore wind farms, and in particular to a method, device, terminal equipment and storage medium for predicting a short-term power curve of an offshore wind farm. Background Art
[0002] Against the backdrop of a global energy transition, the development and utilization of offshore wind power, as a clean, renewable energy source, has garnered widespread attention. Accurate offshore wind power forecasting is crucial for the stable operation of offshore wind farms, effectively improving the economic efficiency and reliability of offshore wind power as an energy source. However, existing technologies rely solely on time-series models to predict offshore wind farm power curves, lacking a dynamic calibration mechanism. This inability to adaptively adjust the predicted curve results in high error rates in practical applications, far from meeting the accuracy requirements for stable grid operation. Summary of the Invention
[0003] The present invention provides a method, apparatus, terminal device and storage medium for predicting the short-term power curve of an offshore wind farm. The method can solve the defect of insufficient accuracy of offshore wind farm power prediction in the prior art.
[0004] An embodiment of the present invention provides a method for predicting a short-term power curve of an offshore wind farm, comprising:
[0005] Obtain dynamic power curves of offshore wind farms and dynamic offshore meteorological data;
[0006] Inputting the dynamic power curve and the offshore dynamic meteorological data into a power prediction model, so that the power prediction model outputs an initial predicted power curve based on the input data; wherein the power prediction model uses a historical power curve dataset and a historical meteorological dataset of the offshore wind farm as input, and uses a predicted first predicted power curve as output, and is obtained after training in combination with model parameters determined after optimization by a preset intelligent optimization algorithm;
[0007] Combining the initial predicted power curve, the marine dynamic meteorological data, and the introduced initial process noise, generating a group of random particles, and assigning all random particles the same initial weight; wherein each of the random particles represents a random predicted power curve;
[0008] In each preset time step, the real-time process noise of the current time step is obtained, and the second power curve segment of the random predicted power curve at the current time step is adjusted according to the real-time process noise and the first power curve segment of the initial predicted power curve at the current time step, and the initial weight of the second power curve segment is adjusted according to the adjusted first power curve segment, the standard deviation of the real-time process noise, and the second power curve segment to obtain an updated weight of the second power curve segment; and a calibrated predicted power curve segment after calibration of the current time step is calculated according to all the updated weights and the second power curve segments corresponding to the updated weights;
[0009] A final predicted power curve is generated based on all calibrated predicted power curve segments.
[0010] Furthermore, the model parameters are determined in the following manner:
[0011] Initializing algorithm parameters of the intelligent optimization algorithm; wherein the algorithm parameters include random number, number of particles, inertia weight, acceleration constant, maximum number of iterations, velocity boundary, and position boundary;
[0012] Based on the initialized algorithm parameters, several parameter particles are generated; the initial position of each parameter particle represents a set of initial hyperparameters;
[0013] According to the initial hyperparameters corresponding to each parameter particle, configure the parameter optimization model corresponding to each parameter particle;
[0014] Iteratively training each parameter optimization model according to the historical power curve data set and the historical meteorological data set until each parameter optimization model reaches the maximum number of iterations, and determining a final global optimal position;
[0015] The hyperparameter represented by the final global optimal position is used as the model parameter.
[0016] Furthermore, the initial hyperparameters include the initial number of hidden layer neurons, the initial learning rate and the initial number of iterations;
[0017] The step of configuring the parameter optimization model corresponding to each parameter particle according to the initial hyperparameters corresponding to each parameter particle includes:
[0018] For each parameter particle, the initial number of hidden layer neurons, initial learning rate and initial number of iterations corresponding to the parameter particle are used as the hyperparameters of the preset first LSTM model, and the first LSTM model after completing the hyperparameter configuration is used as the parameter optimization model corresponding to the parameter particle.
[0019] Furthermore, the iterative training of each parameter optimization model according to the historical power curve data set and the historical meteorological data set until each parameter optimization model reaches the maximum number of iterations and determines the final global optimal position, including:
[0020] Dividing the historical power curve dataset and the historical meteorological dataset into a training set and a validation set;
[0021] Using the training set as the input of each parameter optimization model and the predicted second predicted power curve as the output of each parameter optimization model, iteratively training each parameter optimization model until the maximum number of iterations is reached, terminating the iterative training, and using the global optimal position updated after the last iterative training as the final global optimal position;
[0022] After each iterative training is completed, the verification set is input into each parameter optimization model, and the historical global optimal fitness value and the historical individual optimal fitness value of each parameter optimization model are updated according to the current fitness value calculated by each parameter optimization model based on the verification set;
[0023] Based on the updated historical global optimal fitness value, the global optimal position is updated, and based on the updated historical individual optimal fitness value of each parameter optimization model, the historical individual optimal position of each parameter optimization model is updated;
[0024] For each parameter optimization model, the position of the parameter particle corresponding to the parameter optimization model is updated according to the updated global optimal position, the updated historical individual optimal position of the parameter optimization model and the current algorithm parameters of the parameter optimization model, and the hyperparameters corresponding to the updated position are used as the hyperparameters of the parameter optimization model during the next iterative training; wherein, when the iterative training is performed for the first time, the historical individual optimal position of the parameter particle corresponding to each parameter optimization model is the initial position corresponding to the parameter particle corresponding to each parameter optimization model, and the global optimal position, the historical global optimal fitness value and the historical individual optimal fitness value are all empty.
[0025] Furthermore, the model parameters include the number of hidden layer neurons, learning rate and number of iterations;
[0026] The training process of the power prediction model includes:
[0027] Using the model parameters as the hyperparameters of the preset second LSTM model to obtain a second LSTM model with configured hyperparameters, and using the second LSTM model with configured hyperparameters as the third LSTM model;
[0028] Initializing the third LSTM model;
[0029] Using the training set as the input of the third LSTM model and the predicted first prediction power curve as the output of the third LSTM model, iteratively training the third LSTM model until the number of iterations is reached, terminating the iterative training, and obtaining a trained third LSTM model;
[0030] The third LSTM model after training is used as the power prediction model;
[0031] In which, during each iterative training process, the first predicted power curve predicted by the current third LSTM model is compared with the actual power curve in the training set, the loss gradient is calculated according to the comparison result, and the network parameters of the current third LSTM model are adjusted according to the loss gradient to obtain the third LSTM model for the next iterative training.
[0032] Furthermore, the step of calculating the calibrated predicted power curve segment after calibration at the current time step based on all the updated weights and the second power curve segment corresponding to each updated weight includes:
[0033] Normalize each updated weight to obtain the normalized updated weight;
[0034] The updated weight of each random particle after normalization at the current time step is multiplied by the corresponding second power curve segment, and then all products are accumulated to obtain the calibrated predicted power curve segment after calibration at the current time step.
[0035] Furthermore, after obtaining the updated weights after normalization, the following steps are also included:
[0036] Calculating the effective sample size according to the updated weight after the normalization process;
[0037] Determine whether the effective sample size is less than the product of a preset resampling threshold and the total number of random particles,
[0038] If yes, generate a set of uniformly distributed sampling points within the preset distribution interval, and assign a corresponding random particle to each sampling point according to the updated weight after the normalization process, obtain the assigned sampling points, and use all the assigned sampling points as a new set of random particles;
[0039] If not, no action will be taken.
[0040] An embodiment of the present invention further provides a short-term power curve prediction device for an offshore wind farm, comprising: a data acquisition module, an initial predicted power curve generation module, a random particle generation module, a calibrated predicted power curve segment generation module, and a predicted power curve generation module;
[0041] The data acquisition module is used to obtain the dynamic power curve of the offshore wind farm and the dynamic offshore meteorological data;
[0042] The initial predicted power curve generation module is configured to input the dynamic power curve and the offshore dynamic meteorological data into a power prediction model, so that the power prediction model outputs an initial predicted power curve based on the input data; wherein the power prediction model uses a historical power curve dataset and a historical meteorological dataset of an offshore wind farm as input, and uses a predicted first predicted power curve as output, and is obtained after training in combination with model parameters determined after optimization by a preset intelligent optimization algorithm;
[0043] The random particle generation module is configured to generate a group of random particles by combining the initial predicted power curve, the marine dynamic meteorological data, and the introduced initial process noise, and assign the same initial weight to all random particles; wherein each random particle represents a random predicted power curve;
[0044] The calibrated predicted power curve segment generation module is configured to obtain, in each preset time step, the real-time process noise of the current time step, and adjust the second power curve segment of the random predicted power curve at the current time step based on the real-time process noise and the first power curve segment of the initial predicted power curve at the current time step; and adjust the initial weight of the second power curve segment based on the adjusted first power curve segment, the standard deviation of the real-time process noise, and the second power curve segment to obtain an updated weight of the second power curve segment; and calculate the calibrated predicted power curve segment after calibration for the current time step based on all the updated weights and the second power curve segments corresponding to each updated weight;
[0045] The predicted power curve generating module is used to generate a final predicted power curve according to all calibrated predicted power curve segments.
[0046] The present application also provides a terminal device, including:
[0047] one or more processors;
[0048] a memory, coupled to the processor, for storing one or more programs;
[0049] When the one or more programs are executed by the one or more processors, the one or more processors implement the short-term power curve prediction method for an offshore wind farm as described in the above-mentioned embodiment of the invention.
[0050] The present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for predicting the short-term power curve of an offshore wind farm as described in the above-mentioned embodiment of the invention is implemented.
[0051] The following beneficial effects are achieved by implementing the present invention:
[0052] The present invention provides a short-term power curve prediction method, device, terminal equipment and storage medium for an offshore wind farm. The short-term power curve prediction method first inputs the dynamic power curve and the offshore dynamic meteorological data into a power prediction model, so that the power prediction model outputs an initial predicted power curve based on the input data, and then obtains process noise in real time in each time step, and dynamically adjusts the randomly generated random predicted power curve in combination with the initial predicted power curve. At the same time, based on the noise standard deviation and each predicted power curve segment, the weight distribution is dynamically adjusted. Finally, based on the updated update weight and the second power curve segment of the random predicted power curve corresponding to each updated weight, the calibrated predicted power curve segment after calibration of each time step is calculated. Therefore, the final predicted power curve generated based on all the calibrated predicted power curve segments can effectively reduce the impact of random noise on the prediction result and significantly improve the prediction accuracy of the predicted power curve. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for use in the implementation. Obviously, the drawings described below are only some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0054] Figure 1 This is a flow chart of a method for predicting a short-term power curve of an offshore wind farm provided in one embodiment of the present application;
[0055] Figure 2 This is a schematic diagram of the prediction effect provided by a certain embodiment of the present application;
[0056] Figure 3 This is a schematic structural diagram of a short-term power curve prediction device for an offshore wind farm provided by a certain embodiment of the present application;
[0057] Figure 4 This is a schematic diagram of the structure of a terminal device provided in a certain embodiment of the present application. DETAILED DESCRIPTION
[0058] To make the objectives, technical solutions, and advantages of this application more clear, the technical solutions in this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this application.
[0059] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned figure descriptions are intended to cover non-exclusive inclusions.
[0060] In the description of the embodiments of this application, the technical terms "first" and "second" are used only to distinguish different objects and should not be understood to indicate or imply relative importance or implicitly specify the quantity, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, the meaning of "plurality" is more than two, unless otherwise clearly and specifically defined.
[0061] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0062] In the description of the embodiments of this application, the term "and / or" is simply a description of the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent the following three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this document generally indicates that the associated objects are in an "or" relationship.
[0063] In the description of the embodiments of the present application, the term "multiple" refers to more than two (including two). Similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple pieces" refers to more than two pieces (including two pieces).
[0064] In the description of the embodiments of the present application, unless otherwise expressly specified or limited, technical terms such as "installed," "connected," "connected," and "fixed" should be understood in a broad sense. For example, they can refer to fixed connections, detachable connections, or integration; mechanical connections or electrical connections; direct connections or indirect connections through an intermediate medium; internal connections between two components or interactions between two components. Those skilled in the art can understand the specific meanings of the above terms in the embodiments of the present application based on specific circumstances.
[0065] See also Figure 1 To address the problem of insufficient accuracy in offshore wind farm power prediction in the prior art, an embodiment of the present invention provides a method for predicting a short-term power curve of an offshore wind farm, comprising:
[0066] S1. Obtain dynamic power curves of offshore wind farms and dynamic offshore meteorological data;
[0067] Schematically, dynamic power curves of offshore wind farms and dynamic offshore meteorological data are obtained;
[0068] Specifically, the marine dynamic meteorological data includes wind speed, wind direction, temperature, air pressure and humidity;
[0069] Schematically, the dynamic power curve and the marine dynamic meteorological data are preprocessed to obtain preprocessed dynamic power curve and marine dynamic meteorological data;
[0070] Specifically, the dynamic power curve and the marine dynamic meteorological data are normalized to obtain the normalized dynamic power curve and marine dynamic meteorological data.
[0071] S2. Inputting the dynamic power curve and the offshore dynamic meteorological data into a power prediction model, so that the power prediction model outputs an initial predicted power curve based on the input data; wherein the power prediction model uses a historical power curve dataset and a historical meteorological dataset of an offshore wind farm as input, and uses a predicted first predicted power curve as output, and is obtained after training in combination with model parameters determined after optimization by a preset intelligent optimization algorithm;
[0072] For example, in the process of constructing a traditional offshore wind power prediction model, the selection of model parameters usually relies on a traditional parameter adjustment method. This parameter adjustment method is difficult to ensure that the global optimal parameter combination is found, thereby affecting the prediction accuracy of the model. Therefore, in this embodiment, an intelligent optimization algorithm is used to perform a global optimization search on the model parameters to be trained, thereby obtaining a power prediction model with higher prediction accuracy.
[0073] In a preferred embodiment, the model parameters are determined in the following manner:
[0074] Initializing algorithm parameters of the intelligent optimization algorithm; wherein the algorithm parameters include random number, number of particles, inertia weight, acceleration constant, maximum number of iterations, velocity boundary, and position boundary;
[0075] Based on the initialized algorithm parameters, several parameter particles are generated; the initial position of each parameter particle represents a set of initial hyperparameters;
[0076] According to the initial hyperparameters corresponding to each parameter particle, configure the parameter optimization model corresponding to each parameter particle;
[0077] Iteratively training each parameter optimization model according to the historical power curve data set and the historical meteorological data set until each parameter optimization model reaches the maximum number of iterations, and determining a final global optimal position;
[0078] Using the hyperparameter represented by the final global optimal position as the model parameter;
[0079] Schematically, the intelligent optimization algorithm may be a heuristic optimization algorithm such as a particle swarm optimization algorithm. In this embodiment, the particle swarm optimization algorithm is taken as an example for explanation:
[0080] Specifically, the algorithm parameters of the intelligent optimization algorithm are initialized, and based on the initialized algorithm parameters, a number of parameter particles are generated, where the initial position of each parameter particle represents a set of initial hyperparameters;
[0081] In a preferred embodiment, the initial hyperparameters include the initial number of hidden layer neurons, the initial learning rate and the initial number of iterations;
[0082] The step of configuring the parameter optimization model corresponding to each parameter particle according to the initial hyperparameters corresponding to each parameter particle includes:
[0083] For each parameter particle, the initial number of hidden layer neurons, initial learning rate, and initial number of iterations corresponding to the parameter particle are used as the hyperparameters of the preset first LSTM model, and the first LSTM model after completing the hyperparameter configuration is used as the parameter optimization model corresponding to the parameter particle;
[0084] Schematically, this embodiment uses the number of hidden layer neurons, learning rate, and number of iterations as hyperparameters for configuring the model;
[0085] It should be noted that in order to distinguish the hyperparameter status during the optimization process from the hyperparameters represented by the final global optimal position, the hyperparameters of the initial configuration of each parameter optimization model are defined as initial hyperparameters; correspondingly, the hyperparameter combination corresponding to the final global optimal position obtained by the global search of the particle swarm optimization algorithm is defined as model parameters. These model parameters will serve as the basis for model hyperparameter configuration during power prediction model training.
[0086] Schematically, for each parameter particle, the initial number of hidden layer neurons, initial learning rate, and initial number of iterations corresponding to the parameter particle are used as the hyperparameters of the preset first LSTM model, and the first LSTM model after the hyperparameter configuration is completed is used as the parameter optimization model corresponding to the parameter particle;
[0087] Specifically, in this embodiment, the LSTM model used to optimize the super model parameters is referred to as the first LSTM model, and is used as the basic model architecture;
[0088] During the parameter optimization process, the basic model architecture is assigned the initial number of hidden layer neurons, initial learning rate, and initial number of iterations corresponding to different parameter particles, thereby obtaining the parameter optimization model corresponding to each parameter particle.
[0089] In a preferred embodiment, the iterative training of each parameter optimization model according to the historical power curve data set and the historical meteorological data set until each parameter optimization model reaches the maximum number of iterations and determines the final global optimal position includes:
[0090] Dividing the historical power curve dataset and the historical meteorological dataset into a training set and a validation set;
[0091] Using the training set as the input of each parameter optimization model and the predicted second predicted power curve as the output of each parameter optimization model, iteratively training each parameter optimization model until the maximum number of iterations is reached, terminating the iterative training, and using the global optimal position updated after the last iterative training as the final global optimal position;
[0092] After each iterative training is completed, the verification set is input into each parameter optimization model, and the historical global optimal fitness value and the historical individual optimal fitness value of each parameter optimization model are updated according to the current fitness value calculated by each parameter optimization model based on the verification set;
[0093] Based on the updated historical global optimal fitness value, the global optimal position is updated, and based on the updated historical individual optimal fitness value of each parameter optimization model, the historical individual optimal position of each parameter optimization model is updated;
[0094] For each parameter optimization model, the position of the parameter particle corresponding to the parameter optimization model is updated according to the updated global optimal position, the updated historical individual optimal position of the parameter optimization model, and the current algorithm parameters of the parameter optimization model, and the hyperparameters corresponding to the updated position are used as the hyperparameters of the parameter optimization model during the next iterative training; wherein, when the iterative training is performed for the first time, the historical individual optimal position of the parameter particle corresponding to each parameter optimization model is the initial position corresponding to the parameter particle corresponding to each parameter optimization model, and the global optimal position, the historical global optimal fitness value, and the historical individual optimal fitness value are all empty;
[0095] In an illustrative manner, it is necessary to collect a historical power curve dataset of an offshore wind farm and a corresponding historical meteorological dataset, wherein the historical meteorological dataset includes historical wind speed, historical wind direction, historical temperature, historical air pressure, and historical humidity;
[0096] Specifically, the collected data is classified according to different data characteristics, and the classified data is normalized. The normalization formula is as follows:
[0097]
[0098] Where x norm is the normalized data, x min is the minimum value of the feature type to which the data currently being normalized belongs, x max is the maximum value of the feature type to which the data currently undergoing normalization belongs, and x is the data currently undergoing normalization;
[0099] Then, the normalized historical power curve data and historical meteorological data are divided into a training set and a data set according to a preset ratio;
[0100] Illustratively, for each parameter optimization model, the training set is used as the input of the parameter optimization model, and the predicted second predicted power curve is used as the output of the parameter optimization model. The parameter optimization model is iteratively trained until the maximum number of iterations is reached, and the iterative training is terminated to obtain the final global optimal position.
[0101] Specifically, after each iterative training is completed, the verification set needs to be input into the parameter optimization model, and the current fitness value of the parameter optimization model is calculated according to the third predicted power curve predicted by the parameter optimization model based on the verification set and the true power curve in the verification set. The calculation formula of the fitness value is as follows:
[0102]
[0103] Where y true,i is the true power curve in the i-th sample; y pred,i is the third predicted power curve obtained based on the historical power curve data and historical meteorological data in the i-th sample; N is the total number of samples in the validation set;
[0104] Then, the current fitness value is compared with the historical global optimal fitness value and the historical individual optimal fitness value of the parameter optimization model.
[0105] It should be noted that the historical global optimal fitness value is the fitness value with the minimum value screened out by comparing the current fitness values of each parameter optimization model after the completion of previous iterative training. In the first iterative training, since the fitness value of any parameter optimization model has not been evaluated, the historical global optimal fitness value is empty;
[0106] It should be noted that the historical individual optimal fitness value is the result of comparing the current fitness value of a parameter optimization model with the historical individual optimal fitness value after all the iterative training is completed, and retaining the result with a better fitness value (that is, a smaller fitness value, which will not be described later). In the first iterative training, since the fitness value of the parameter optimization model has not yet been evaluated, the historical individual optimal fitness value is empty;
[0107] It should be noted that the global optimal position is the position with the best fitness value found by all parameter particles during the iteration process. Therefore, in the first iterative training, the global optimal position is empty; the historical individual optimal position is the position with the best fitness value found by a single parameter particle in its own search history. Therefore, in the first iterative training, the historical individual optimal position is the initial position.
[0108] Specifically, after each iterative training, the current fitness value of each parameter optimization model is compared with the historical global optimal fitness value updated after the previous iteration.
[0109] If the current fitness values of all parameter optimization models are not less than the historical global optimal fitness values updated after the previous iteration, the historical global optimal fitness values updated after the previous iteration are updated to the historical global optimal fitness values after the completion of the current iteration training;
[0110] If there is at least one parameter optimization model whose current fitness value is less than the historical global optimal fitness value, the current fitness value with the smallest value is selected to update the historical global optimal fitness value, and the current position of the parameter particle corresponding to the minimum current fitness value is synchronously updated to the global optimal position and the historical individual optimal position of the optimization parameter model corresponding to the parameter particle, and the current fitness value with the smallest value is updated to the historical individual optimal fitness value of the optimization parameter model corresponding to the parameter particle;
[0111] Specifically, for each parameter optimization model, if the current fitness value of the parameter optimization model is not less than the historical global optimal fitness value but is less than the historical individual optimal fitness value of the parameter optimization model updated after the previous iterative training, it means that the hyperparameter represented by the current position of the parameter particle corresponding to the parameter optimization model is not close to the global optimal solution in this iteration, but the parameter particle performs better in its own historical search results. At this time, the current position of the parameter particle corresponding to the parameter optimization model is updated to the historical individual optimal position of the parameter particle corresponding to the parameter optimization model, and the current fitness value is updated to the historical individual optimal fitness value of the parameter particle corresponding to the parameter optimization model;
[0112] Specifically, for each parameter optimization model, if the current fitness value of the parameter optimization model is not less than the historical global optimal fitness value updated after the previous iterative training and is not less than the historical individual optimal fitness value updated after the previous iterative training, the historical global optimal fitness value updated after the previous iterative training is updated to the historical global optimal fitness value after the current iterative training is completed, and the historical individual optimal fitness value updated after the previous iterative training is updated to the historical individual optimal fitness value after the current iterative training is completed;
[0113] Indicatively, after completing each iterative training, the position of the parameter particle corresponding to the parameter optimization model needs to be updated;
[0114] Specifically, for each parameter optimization model, the position of the parameter particle corresponding to the parameter optimization model is updated according to the updated global optimal position, the historical individual optimal position of the parameter optimization model after update, and the current algorithm parameters of the parameter optimization model, and the hyperparameters corresponding to the updated position are used as the hyperparameters of the parameter optimization model in the next iterative training. The formula for position update is as follows:
[0115]
[0116]
[0117] Where, is the velocity of the parameter particle p at the tth iteration (dimension is j), is the velocity of the parameter particle p at the t+1th iteration, is the position of the parameter particle p at the tth iteration; w is the inertia weight; c1 is the first acceleration constant, c2 is the second acceleration constant, r1 is the first random number, and r2 is the second random number; is the historical individual optimal position of parameter particle p at the tth iteration, is the global optimal position of the parameter particle p at the tth iteration, is the position of parameter particle p at the t+1th iteration;
[0118] The parameter optimization model is iteratively trained until the maximum number of iterations is reached, the iterative training is terminated, a final global optimal position is obtained, and the hyperparameters represented by the final global optimal position are used as the model parameters.
[0119] In a preferred embodiment, the model parameters include the number of hidden layer neurons, the learning rate and the number of iterations;
[0120] The training process of the power prediction model includes:
[0121] Using the model parameters as the hyperparameters of the preset second LSTM model to obtain a second LSTM model with configured hyperparameters, and using the second LSTM model with configured hyperparameters as the third LSTM model;
[0122] Initializing the third LSTM model;
[0123] Using the training set as the input of the third LSTM model and the predicted first prediction power curve as the output of the third LSTM model, iteratively training the third LSTM model until the number of iterations is reached, terminating the iterative training, and obtaining a trained third LSTM model;
[0124] The third LSTM model after training is used as the power prediction model;
[0125] In each iterative training process, the first predicted power curve predicted by the current third LSTM model is compared with the actual power curve in the training set, the loss gradient is calculated according to the comparison result, and the network parameters of the current third LSTM model are adjusted according to the loss gradient to obtain the third LSTM model for the next iterative training;
[0126] Illustratively, after determining the model parameters through the particle swarm optimization algorithm, the model parameters are used as the hyperparameters of the second LSTM model to obtain a second LSTM model with configured hyperparameters, and the second LSTM model with configured hyperparameters is used as the third LSTM model;
[0127] It should be noted that, in order to distinguish the first LSTM model used to solve the model parameters, in this embodiment, the LSTM model configured with the model parameters is used as the second LSTM model;
[0128] Illustratively, the network parameters (including weights and biases) in the third LSTM model are randomly initialized, and then the third LSTM model is iteratively trained until the number of iterations is reached, and the iterative training is terminated to obtain a trained third LSTM model;
[0129] Specifically, in each iterative training process, the training set is input into the third LSTM model so that the third LSTM model outputs a predicted first predicted power curve, and the first predicted power curve predicted by the current third LSTM model is compared with the actual power curve in the training set, and the loss gradient is calculated according to the comparison result, wherein the calculation formula of the loss gradient is as follows:
[0130]
[0131] Where, J(θ ts ) represents the loss function at time step ts, θ ts represents the network parameters at time step ts, represents the loss gradient at time step ts;
[0132] Then, according to the calculated loss gradient, the network parameters of the current third LSTM model are adjusted to obtain the third LSTM model for the next iterative training. The specific adjustment formula is as follows:
[0133]
[0134] Where θ ts+1 represents the loss function network parameters at time step ts+1, that is, the adjusted network parameters; η represents the learning rate.
[0135] S3. Combining the initial predicted power curve, the marine dynamic meteorological data, and the introduced initial process noise, generating a group of random particles, and assigning all random particles the same initial weight; wherein each random particle represents a random predicted power curve;
[0136] Schematically, although the power prediction model can learn time series characteristics and regularities from the dynamic power curve and dynamic marine meteorological data to generate an initial predicted power curve, due to the uncertainty factors in the marine environment, this embodiment will introduce random interference factors to dynamically correct the initial predicted power curve;
[0137] Specifically, based on the initial predicted power curve predicted by the power prediction model, combined with the dynamic meteorological data at sea and the introduced initial process noise, a group of random particles are generated. Each random particle represents a random predicted power curve. These random predicted power curves will subsequently participate in operations such as particle weight adjustment and prediction curve correction, continuously approaching a more accurate predicted power curve, and realizing the correction and optimization of the initial predicted power curve. The state of each random particle at the initial moment can be expressed as:
[0138]
[0139] Where Y LSTM,0 is the initial predicted power curve at the initial moment; is the initial process noise, which has a mean of zero and a covariance of Gaussian distribution; M is the total number of random particles; Represents the state of the zth random particle at the initial moment.
[0140] S4. In each preset time step, obtain the real-time process noise of the current time step, and adjust the second power curve segment of the random predicted power curve at the current time step based on the real-time process noise and the first power curve segment of the initial predicted power curve at the current time step, and adjust the initial weight of the second power curve segment based on the adjusted first power curve segment, the standard deviation of the real-time process noise, and the second power curve segment to obtain an updated weight of the second power curve segment; calculate the calibrated predicted power curve segment after calibration for the current time step based on all the updated weights and the second power curve segments corresponding to each updated weight;
[0141] Specifically, in each preset time step step, the real-time process noise of the time step step is obtained, so as to perform sampling adjustment on the second power curve segment of the random prediction power curve at the current time step. The specific formula is as follows:
[0142]
[0143] Where ΔY LSTM,step is the first power curve segment of the initial predicted power curve at time step step; T is the total length of the initial predicted power curve; is the real-time process noise of time step step, which has a mean of zero and a covariance of Gaussian distribution; The second power curve segment of the random predicted power curve at the time step step;
[0144] Then, the initial weight of the second power curve segment is adjusted according to the adjusted first power curve segment, the standard deviation of the real-time process noise, and the second power curve segment. The specific weight adjustment formula is as follows:
[0145]
[0146] Where, Y is the updated weight of the zth random particle at time step; LSTM is the initial predicted power curve;
[0147] It should be noted that since all random particles have the same initial weight, that is, each random particle has the same initial weight w0;
[0148] In a preferred embodiment, the step of calculating the calibrated predicted power curve segment after calibration at the current time step based on all the updated weights and the second power curve segment corresponding to each updated weight includes:
[0149] Normalize each updated weight to obtain the normalized updated weight;
[0150] Multiply the normalized updated weight of each random particle at the current time step by the corresponding second power curve segment, and then accumulate all the products to obtain the calibrated predicted power curve segment after calibration at the current time step;
[0151] Specifically, after obtaining the update weight of each random particle at the time step step, all the update weights at the time step step are normalized to obtain the normalized update weights. The specific normalization formula is as follows:
[0152]
[0153] Where, is the updated weight of the zth random particle after normalization at time step step;
[0154] Then, the updated weight of each random particle after normalization at the current time step is multiplied by the corresponding second power curve segment, and all products are accumulated to obtain the calibrated predicted power curve segment after calibration at the current time step. The specific formula is as follows:
[0155]
[0156] Where Y filtered,step The calibrated predicted power curve segment for time step step.
[0157] In a preferred embodiment, after obtaining the updated weights after normalization, the method further includes:
[0158] Calculating the effective sample size according to the updated weight after the normalization process;
[0159] Determine whether the effective sample size is less than the product of a preset resampling threshold and the total number of random particles,
[0160] If yes, generate a set of uniformly distributed sampling points within the preset distribution interval, and assign a corresponding random particle to each sampling point according to the updated weight after the normalization process, obtain the assigned sampling points, and use all the assigned sampling points as a new set of random particles;
[0161] If not, no action will be taken;
[0162] Schematically, in order to maintain the diversity and representativeness of the generated random particles, resampling is performed based on the normalized updated weights of each random particle;
[0163] Specifically, the effective sample size ESS is calculated based on the updated weight after normalization, and the specific calculation formula is as follows:
[0164]
[0165] Determine whether the effective sample size is less than the product of the preset resampling threshold and the total number of random particles. If ESS < μ × M (where μ is the preset resampling threshold, which is 0.5), generate a set of uniformly distributed sampling points in the distribution interval [0, 1);
[0166] For each sampling point, a corresponding random particle is assigned to each sampling point based on the updated weight after the normalization process. Random particles with higher updated weights are more likely to be selected, while random particles with lower updated weights may not be selected. In this way, the assigned sampling points are obtained, and all the assigned sampling points are used as a new set of random particles. The initial weights of the new random particles are also equal. These new random particles are then resampled, weighted, and normalized to obtain a calibrated predicted power curve.
[0167] S5. generating a final predicted power curve based on all calibrated predicted power curve segments;
[0168] Specifically, the calibrated predicted power curve segments at each time step are integrated together to generate the final predicted power curve. This predicted power curve can be used to adjust the power generation plan of traditional energy sources (such as thermal power and hydropower) in advance to balance supply and demand and avoid wind and solar power curtailment.
[0169] Specifically, the performance verification was conducted using a historical power curve dataset and a historical meteorological dataset from a coastal province. The 50-day historical offshore wind power curve data and meteorological data from January 1 to February 19 of a certain year, with an interval of 1 hour, were used as samples. The data were normalized, and the ratios of the training set and validation set were set to 75% and 25% respectively in chronological order.
[0170] By calculating the four indicators of root mean square error (RMSE), mean absolute error (MAE), mean relative percentage error (MAPE) and coefficient of determination (R2), the results of the first prediction method without pre-optimization of the model hyperparameters, the second prediction method that optimizes the LSTM hyperparameters but does not calibrate the predicted curve, and the short-term power curve prediction method of the offshore wind farm of this embodiment are verified. The verification results are shown in Table 1. The prediction effect is as follows: Figure 1 shown.
[0171]
[0172] Table 1
[0173] As can be seen from Table 1, the prediction accuracy of the second prediction method and the present invention is significantly improved compared with the first prediction method; the prediction accuracy and fit of the present invention are also improved compared with the second prediction method, indicating the effectiveness of the short-term power curve prediction method of the offshore wind farm of the present invention.
[0174] See Figure 3 , is a short-term power curve prediction device for an offshore wind farm provided by an embodiment of the present invention, comprising: a data acquisition module, an initial predicted power curve generation module, a random particle generation module, a calibrated predicted power curve segment generation module, and a predicted power curve generation module;
[0175] The data acquisition module is used to obtain the dynamic power curve of the offshore wind farm and the dynamic offshore meteorological data;
[0176] The initial predicted power curve generation module is configured to input the dynamic power curve and the offshore dynamic meteorological data into a power prediction model, so that the power prediction model outputs an initial predicted power curve based on the input data; wherein the power prediction model uses a historical power curve dataset and a historical meteorological dataset of an offshore wind farm as input, and uses a predicted first predicted power curve as output, and is obtained after training in combination with model parameters determined after optimization by a preset intelligent optimization algorithm;
[0177] The random particle generation module is configured to generate a group of random particles by combining the initial predicted power curve, the marine dynamic meteorological data, and the introduced initial process noise, and assign the same initial weight to all random particles; wherein each random particle represents a random predicted power curve;
[0178] The calibrated predicted power curve segment generation module is configured to obtain, in each preset time step, the real-time process noise of the current time step, and adjust the second power curve segment of the random predicted power curve at the current time step based on the real-time process noise and the first power curve segment of the initial predicted power curve at the current time step; and adjust the initial weight of the second power curve segment based on the adjusted first power curve segment, the standard deviation of the real-time process noise, and the second power curve segment to obtain an updated weight of the second power curve segment; and calculate the calibrated predicted power curve segment after calibration for the current time step based on all the updated weights and the second power curve segments corresponding to each updated weight;
[0179] The predicted power curve generating module is used to generate a final predicted power curve according to all calibrated predicted power curve segments.
[0180] See also Figure 4 , an embodiment of the present application further provides a terminal device, including:
[0181] one or more processors;
[0182] a memory, coupled to the processor, for storing one or more programs;
[0183] When the one or more programs are executed by the one or more processors, the one or more processors implement the short-term power curve prediction method for an offshore wind farm as described above.
[0184] The processor is used to control the overall operation of the terminal device to complete all or part of the steps of the above-mentioned short-term power curve prediction method for offshore wind farms. The memory is used to store various types of data to support the operation of the terminal device. These data may include, for example, instructions for any application or method operating on the terminal device, as well as application-related data. The memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0185] In an exemplary embodiment, the terminal device can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to execute the short-term power curve prediction method for offshore wind farms as described in any of the above embodiments, and achieve the same technical effect as the above methods.
[0186] In another exemplary embodiment, a computer-readable storage medium including a computer program is further provided. When executed by a processor, the computer program implements the steps of the method for predicting the short-term power curve of an offshore wind farm as described in any of the aforementioned embodiments. For example, the computer-readable storage medium may be the aforementioned memory including the computer program. The computer program may be executed by a processor of a terminal device to implement the method for predicting the short-term power curve of an offshore wind farm as described in any of the aforementioned embodiments, thereby achieving the same technical effects as the aforementioned methods.
[0187] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for predicting short-term power curve of an offshore wind farm, characterized in that: include: Obtain dynamic power curves of offshore wind farms and dynamic offshore meteorological data; Inputting the dynamic power curve and the offshore dynamic meteorological data into a power prediction model, so that the power prediction model outputs an initial predicted power curve based on the input data; wherein the power prediction model uses a historical power curve dataset and a historical meteorological dataset of the offshore wind farm as input, and uses a predicted first predicted power curve as output, and is obtained after training in combination with model parameters determined after optimization by a preset intelligent optimization algorithm; Combining the initial predicted power curve, the marine dynamic meteorological data, and the introduced initial process noise, generating a group of random particles, and assigning all random particles the same initial weight; wherein each of the random particles represents a random predicted power curve; In each preset time step, the real-time process noise of the current time step is obtained, and the second power curve segment of the random predicted power curve at the current time step is adjusted according to the real-time process noise and the first power curve segment of the initial predicted power curve at the current time step, and the initial weight of the second power curve segment is adjusted according to the adjusted first power curve segment, the standard deviation of the real-time process noise, and the second power curve segment to obtain an updated weight of the second power curve segment; and a calibrated predicted power curve segment after calibration of the current time step is calculated according to all the updated weights and the second power curve segments corresponding to the updated weights; A final predicted power curve is generated based on all calibrated predicted power curve segments.
2. The method for predicting short-term power curve of an offshore wind farm according to claim 1, wherein: The model parameters are determined by: Initializing algorithm parameters of the intelligent optimization algorithm; wherein the algorithm parameters include random number, number of particles, inertia weight, acceleration constant, maximum number of iterations, velocity boundary, and position boundary; Based on the initialized algorithm parameters, several parameter particles are generated; the initial position of each parameter particle represents a set of initial hyperparameters; According to the initial hyperparameters corresponding to each parameter particle, configure the parameter optimization model corresponding to each parameter particle; Iteratively training each parameter optimization model according to the historical power curve data set and the historical meteorological data set until each parameter optimization model reaches the maximum number of iterations, and determining a final global optimal position; The hyperparameter represented by the final global optimal position is used as the model parameter.
3. The method for predicting short-term power curve of an offshore wind farm according to claim 2, wherein: The initial hyperparameters include the initial number of hidden layer neurons, the initial learning rate and the initial number of iterations; The step of configuring the parameter optimization model corresponding to each parameter particle according to the initial hyperparameters corresponding to each parameter particle includes: For each parameter particle, the initial number of hidden layer neurons, initial learning rate and initial number of iterations corresponding to the parameter particle are used as the hyperparameters of the preset first LSTM model, and the first LSTM model after completing the hyperparameter configuration is used as the parameter optimization model corresponding to the parameter particle.
4. The method for predicting short-term power curve of an offshore wind farm according to claim 3, wherein: The iterative training of each parameter optimization model according to the historical power curve data set and the historical meteorological data set until each parameter optimization model reaches the maximum number of iterations and determines the final global optimal position, including: Dividing the historical power curve dataset and the historical meteorological dataset into a training set and a validation set; Using the training set as the input of each parameter optimization model and the predicted second predicted power curve as the output of each parameter optimization model, iteratively training each parameter optimization model until the maximum number of iterations is reached, terminating the iterative training, and using the global optimal position updated after the last iterative training as the final global optimal position; After each iterative training is completed, the verification set is input into each parameter optimization model, and the historical global optimal fitness value and the historical individual optimal fitness value of each parameter optimization model are updated according to the current fitness value calculated by each parameter optimization model based on the verification set; Based on the updated historical global optimal fitness value, the global optimal position is updated, and based on the updated historical individual optimal fitness value of each parameter optimization model, the historical individual optimal position of each parameter optimization model is updated; For each parameter optimization model, the position of the parameter particle corresponding to the parameter optimization model is updated according to the updated global optimal position, the updated historical individual optimal position of the parameter optimization model and the current algorithm parameters of the parameter optimization model, and the hyperparameters corresponding to the updated position are used as the hyperparameters of the parameter optimization model during the next iterative training; wherein, when the iterative training is performed for the first time, the historical individual optimal position of the parameter particle corresponding to each parameter optimization model is the initial position corresponding to the parameter particle corresponding to each parameter optimization model, and the global optimal position, the historical global optimal fitness value and the historical individual optimal fitness value are all empty.
5. The method for predicting short-term power curve of an offshore wind farm according to claim 4, characterized in that: The model parameters include the number of hidden layer neurons, learning rate and number of iterations; The training process of the power prediction model includes: Using the model parameters as the hyperparameters of the preset second LSTM model to obtain a second LSTM model with configured hyperparameters, and using the second LSTM model with configured hyperparameters as the third LSTM model; Initializing the third LSTM model; Using the training set as the input of the third LSTM model and the predicted first prediction power curve as the output of the third LSTM model, iteratively training the third LSTM model until the number of iterations is reached, terminating the iterative training, and obtaining a trained third LSTM model; The third LSTM model after training is used as the power prediction model; In which, during each iterative training process, the first predicted power curve predicted by the current third LSTM model is compared with the actual power curve in the training set, the loss gradient is calculated according to the comparison result, and the network parameters of the current third LSTM model are adjusted according to the loss gradient to obtain the third LSTM model for the next iterative training.
6. The method for predicting short-term power curve of an offshore wind farm according to claim 1, wherein: The step of calculating the calibrated predicted power curve segment after calibration at the current time step based on all the updated weights and the second power curve segment corresponding to each updated weight includes: Normalize each updated weight to obtain the normalized updated weight; The updated weight of each random particle after normalization at the current time step is multiplied by the corresponding second power curve segment, and then all products are accumulated to obtain the calibrated predicted power curve segment after calibration at the current time step.
7. The method for predicting short-term power curve of an offshore wind farm according to claim 6, wherein: After obtaining the updated weights after normalization, it also includes: Calculating the effective sample size according to the updated weight after the normalization process; Determine whether the effective sample size is less than the product of a preset resampling threshold and the total number of random particles, If yes, generate a set of uniformly distributed sampling points within the preset distribution interval, and assign a corresponding random particle to each sampling point according to the updated weight after the normalization process, obtain the assigned sampling points, and use all the assigned sampling points as a new set of random particles; If not, no action will be taken.
8. A short-term power curve prediction device for an offshore wind farm, characterized in that: include: a data acquisition module, an initial predicted power curve generation module, a random particle generation module, a calibration predicted power curve segment generation module, and a predicted power curve generation module; The data acquisition module is used to obtain the dynamic power curve of the offshore wind farm and the dynamic offshore meteorological data; The initial predicted power curve generation module is configured to input the dynamic power curve and the offshore dynamic meteorological data into a power prediction model, so that the power prediction model outputs an initial predicted power curve based on the input data; wherein the power prediction model uses a historical power curve dataset and a historical meteorological dataset of an offshore wind farm as input, and uses a predicted first predicted power curve as output, and is obtained after training in combination with model parameters determined after optimization by a preset intelligent optimization algorithm; The random particle generation module is configured to generate a group of random particles by combining the initial predicted power curve, the marine dynamic meteorological data, and the introduced initial process noise, and assign the same initial weight to all random particles; wherein each random particle represents a random predicted power curve; The calibrated predicted power curve segment generation module is configured to obtain, in each preset time step, the real-time process noise of the current time step, and adjust the second power curve segment of the random predicted power curve at the current time step based on the real-time process noise and the first power curve segment of the initial predicted power curve at the current time step; and adjust the initial weight of the second power curve segment based on the adjusted first power curve segment, the standard deviation of the real-time process noise, and the second power curve segment to obtain an updated weight of the second power curve segment; and calculate the calibrated predicted power curve segment after calibration for the current time step based on all the updated weights and the second power curve segments corresponding to each updated weight; The predicted power curve generating module is used to generate a final predicted power curve according to all calibrated predicted power curve segments.
9. A terminal device, characterized in that: include: one or more processors; a memory, coupled to the processor, for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the short-term power curve prediction method for an offshore wind farm as described in any one of claims 1 to 7.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for predicting the short-term power curve of an offshore wind farm according to any one of claims 1 to 7 is implemented.