Wave power generation power prediction method

By combining the K-Means algorithm with dynamic time warping and centroid averaging, and conditional generative adversarial networks with an improved dynamic optimization algorithm, a wave energy power prediction model was constructed. This model solves the problem of insufficient prediction accuracy for wave energy power generation under different ocean conditions and achieves higher prediction accuracy and stability.

CN121840592APending Publication Date: 2026-04-10GUANGDONG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-31
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing wave energy power generation prediction methods have limited prediction accuracy and generalization ability when faced with dynamic switching of different ocean conditions. In particular, they are difficult to capture dynamic characteristics under extreme conditions, resulting in insufficient prediction accuracy.

Method used

An adaptive clustering model based on dynamic time warping centroid averaging (K-Means algorithm) is used, and combined with conditional generative adversarial networks and an improved dynamic optimization algorithm, a bidirectional long short-term memory neural network is trained to construct a wave energy power prediction model.

Benefits of technology

It improves the accuracy and stability of wave energy power generation prediction, especially with higher reliability and generalization ability under extreme conditions, forming a complete technology chain from data construction to model optimization, supporting the efficient utilization of marine renewable energy and safe grid dispatch.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121840592A_ABST
    Figure CN121840592A_ABST
Patent Text Reader

Abstract

The invention relates to a wave energy power generation power prediction method, and relates to the technical field of energy power generation power prediction, and the method comprises the steps: carrying out the preprocessing and feature screening of sample data, and obtaining a power generation data set; based on a K-Means algorithm of preset dynamic time warping gravity center averaging, a clustering result is determined, and each cluster of the clustering result corresponds to one working condition mode; generating an adversarial network based on a clustering result and a preset condition to perform data enhancement; and based on the target sample set corresponding to each cluster and a preset improved dynamic microphone optimization algorithm, training and optimizing a pre-constructed bidirectional long-short-term memory neural network to obtain a wave energy prediction model corresponding to each cluster. According to the method, sample enhancement is carried out on the power generation data through the conditional time series generative adversarial network, the problem that the power generation data of the wave power generation power is less in extreme weather can be solved, single prediction models are constructed by adopting a clustering recognition method, and the models are optimized by using an optimization algorithm so as to achieve relatively high prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of energy power prediction, in particular to a wave energy power prediction method. BACKGROUND

[0002] As a clean and renewable energy generation method, wave energy generation is an important direction to promote the utilization of marine energy and build a new type of island power system. It has the advantages of being clean and sustainable, and is of great significance to alleviate energy crisis and reduce environmental pollution, and occupies a key position in the field of marine energy development.

[0003] In the aspect of wave energy power prediction, the existing mainstream methods mostly use a single prediction model to train all historical data. Some methods perform cluster analysis on wave energy generation sequences, and some methods use improved time series generative adversarial networks to realize small sample enhancement of power data in extreme conditions.

[0004] However, a single prediction model generally uses a single model parameter to fit all operating conditions, which is difficult to cope with dynamic switching between different marine states, and has limited prediction accuracy and generalization ability. In the case of sparse extreme condition data, existing models cannot fully learn and capture the unique dynamic characteristics of such conditions, and the prediction accuracy of such conditions is severely insufficient. It is difficult to find a globally optimal parameter combination in a complex multi-dimensional parameter space, which further limits the improvement of prediction performance. SUMMARY

[0005] The technical problem to be solved by the present application is to provide a wave energy power prediction method, which aims to solve at least one of the above technical problems.

[0006] The technical solution of the present application to solve the above technical problems is as follows: The present application provides a wave energy power prediction method, which adopts the following technical solution: A wave energy power prediction method, comprising: Obtaining sample data, preprocessing and feature selection of the sample data, and obtaining a wave energy generation dataset, wherein the sample data includes wind direction, wind speed, gust wind speed, significant wave height, dominant wave period, average wave period, dominant wave direction, sea level pressure, sea surface temperature, air temperature and dew point temperature, the wave energy generation dataset includes a plurality of target meteorological features, and the plurality of target meteorological features includes significant wave height, average wave period, gust wind speed, wind speed and power generation power; Based on the wave energy generation dataset, a preset normalization processing method and a preset dynamic time warping gravity center average K-Means algorithm, a clustering result is determined, the clustering result includes a plurality of cluster assignment results and a plurality of cluster centers, each cluster corresponds to a marine environment operating mode; generate a generative adversarial network based on the clustering result and a preset condition to determine a target data set, the target data set including a target sample set corresponding to each cluster; For each of the clusters, based on the target sample set corresponding to the cluster and a preset improved dynamic time warping optimization algorithm, a pre-constructed bidirectional long short-term memory neural network is trained and optimized to obtain a wave energy prediction model corresponding to the cluster, so that wave energy power generation is predicted based on the wave energy prediction model corresponding to each cluster and new meteorological data to obtain predicted power generation information.

[0007] The present application has the following beneficial effects: by obtaining sample data and pre-processing and feature screening, a wave energy power generation data set closer to actual working conditions can be constructed; the K-Means algorithm based on dynamic time warping and gravity center average is used for adaptive clustering of marine working conditions, overcoming the defect that a single model is difficult to adapt to dynamic switching of multiple working conditions; the conditional time series generative adversarial network is introduced to realize the generation of high-fidelity synthetic data under extreme working conditions, effectively alleviating the prediction distortion problem caused by the sparsity of key scene data; the improved dynamic time warping optimization algorithm is combined to realize intelligent optimization of the prediction model hyperparameters, improving the prediction accuracy and stability of the bidirectional long short-term memory neural network under different marine working conditions. A complete technical chain from data construction, working condition identification, sample enhancement to model optimization is formed, making the wave energy power generation prediction have higher reliability and generalization ability in common and extreme scenarios, and providing reliable technical support for efficient utilization of marine renewable energy and safe dispatch of power grids.

[0008] On the basis of the above technical scheme, the present application can also be improved as follows.

[0009] Further, the wave energy power generation data set includes a plurality of time series samples, each of the time series samples including a plurality of target meteorological features, the clustering result is determined based on the wave energy power generation data set, a preset normalization processing method and a preset dynamic time warping gravity center average K-Means algorithm, and includes: Each of the target meteorological features in the wave energy power generation data set is mapped to a set interval based on the preset normalization processing method to obtain a normalized data set; Based on the preset dynamic time warping gravity center average K-Means algorithm, a plurality of time series samples in the normalized data set are clustered to obtain a clustering result, with the minimum within-cluster sum of squared deviations as the clustering target; The clustering target is: ; Wherein, represents a time series sample, represents the kth cluster, a cluster center representing the kth cluster, a time series sample a dynamic time warping distance between the cluster center and the time series sample.

[0010] The beneficial effect of the above further scheme is that the wave energy generation data set is normalized, which can map each target meteorological feature to the same scale, eliminate the influence of different dimensions and orders of magnitude, and provide a unified and suitable data expression form for subsequent clustering. The K-Means algorithm based on the preset dynamic time warping center average is used for clustering, which is suitable for the characteristics of the wave energy generation data with time series characteristics, can accurately mine the internal structure of the data, effectively identify the typical operating conditions, and thus adaptively divide different marine environment working condition modes.

[0011] Further, the K-Means algorithm based on the preset dynamic time warping center average takes the minimum sum of squared deviations within the cluster as the clustering target, and clusters the plurality of time series samples in the normalized data set to obtain a clustering result, comprising: S221, based on the preset number of clusters, randomly selecting a plurality of time series samples in the normalized data set as a cluster center set, the cluster center set comprising a plurality of clusters; S222, for each of the time series samples, based on the preset dynamic time warping algorithm, calculating the minimum distance path between the time series sample of the current iteration and each of the cluster centers; S223, based on the minimum distance path between each time series sample and each of the clusters, performing cluster assignment on all time series samples to obtain a clustering result of the current iteration, the clustering result of the current iteration comprising a plurality of clusters, each cluster corresponding to a cluster assignment set and a cluster center, the cluster assignment set comprising a plurality of time series samples; S224, for each cluster of the current iteration, based on the cluster assignment set corresponding to the cluster and the preset DTW center average algorithm, determining a new cluster center of the cluster in the current iteration; S225, based on the new cluster center corresponding to each cluster, determining a new cluster center set of the current iteration, and taking the new cluster center set of the current iteration as the cluster center set of the next iteration, performing S222 to S224 until the external convergence condition is met, obtaining the clustering result, the external convergence condition being that the clustering result of all time series samples of the current iteration and the clustering result of the previous iteration of the current iteration are within a set difference range, or the number of iterations of the current iteration reaches a set iteration number threshold.

[0012] The beneficial effects of the above further scheme are: by replacing the traditional Euclidean distance with a dynamic time warping distance, the nonlinear deformation problems such as stretching and shifting of the wave energy time series on the time axis are effectively overcome, and the similarity between the sequences under different working conditions can be more accurately measured; the cluster center is iteratively optimized by using the gravity mean algorithm to ensure that each cluster center can truly reflect the common timing mode of the sequences in the cluster. By minimizing the sum of squared deviations within the cluster, it is ensured that the samples in the same cluster have highly similar timing characteristics, thereby improving the pertinence and generalization ability of the subsequent prediction model in dealing with complex and variable marine environments.

[0013] Further, the new cluster gravity center of the cluster in the current iteration is determined based on the cluster assignment set corresponding to the cluster and the preset DTW gravity mean algorithm, comprising: S2241, randomly selecting a time series sample in the cluster assignment set corresponding to the cluster as the initial value of the cluster gravity center; S2242, based on the preset dynamic time warping algorithm, calculating the optimal warping path of the value of each time series sample in the cluster assignment set in the current sub-iteration and the cluster gravity center in the current sub-iteration; S2243, for each time point of the cluster gravity center in the current sub-iteration, based on the optimal warping path of all time series samples in the cluster assignment set corresponding to the cluster, determining all intra-cluster sample data points aligned with the time point in the optimal warping path to form a data point set corresponding to the time point; S2244, calculating the average value of all data points in each time point corresponding data point set respectively; S2245, based on the average value of all data points in each time point corresponding data point set, determining the new gravity sequence of the cluster in the current sub-iteration; S2246, determining whether the new gravity sequence of the cluster in the current sub-iteration satisfies the sub-convergence condition; S2247, if it satisfies, the new gravity sequence after satisfying the sub-convergence condition is taken as the new cluster gravity center of the cluster in the current iteration; S2248, if it does not satisfy, the new gravity sequence is taken as the value of the cluster gravity center in the next sub-iteration, and S2242 to S2246 are executed until the new gravity sequence obtained after satisfying the sub-convergence condition is taken as the new cluster gravity center of the cluster in the current iteration; The determination of whether the new gravity sequence of the cluster in the current sub-iteration satisfies the sub-convergence condition comprises: determining whether the difference between the new gravity sequence and the value of the cluster gravity center is not greater than a preset gravity threshold, or determining whether the iteration number of the current sub-iteration reaches a preset maximum internal iteration number; If a difference between the new cluster center sequence and the value of the cluster center is not greater than a preset cluster center threshold, or the number of iterations of the current sub-iteration reaches a preset maximum internal iteration number, it is determined that the sub-convergence condition is met, otherwise it is determined that the sub-convergence condition is not met.

[0014] The beneficial effect of the further scheme is that the optimal alignment path is established for each sample in the cluster and the current cluster center by using the dynamic time warping technology, effectively solving the nonlinear deformation problem of the wave energy time sequence in the time dimension. The cluster center is iteratively updated by calculating the average value of all aligned data points at each time point, ensuring that the generated cluster center sequence can accurately capture the common timing characteristics of the wave energy data under the working condition. Compared with the traditional arithmetic average method, the dynamic alignment based average calculation method can better preserve the time dynamic characteristics of the original sequence, so that the final cluster center truly becomes a typical representative of the working condition mode.

[0015] Further, the target data set is determined based on the clustering result and a preset condition generation adversarial network, comprising: Based on the clustering result, a cluster with insufficient sample quantity is determined. For any cluster with insufficient sample quantity, a multi-dimensional condition vector of the cluster is constructed. For any cluster with insufficient sample quantity, the initial C-TimeGAN model is trained based on the cluster assignment result and the multi-dimensional condition vector corresponding to the cluster, to obtain a trained C-TimeGAN model; the trained C-TimeGAN model is a condition generation adversarial network based on the TimeGAN framework. For any cluster with insufficient sample quantity, a synthetic sample set is generated based on the multi-dimensional condition vector, the sample quantity and the maximum sample quantity of the cluster, using the trained C-TimeGAN model. For any cluster with insufficient sample quantity, the Euclidean distance between each sample in the synthetic sample set and the corresponding cluster center is calculated, and the samples in the synthetic sample set are screened based on the Euclidean distances, to obtain a screened synthetic sample set. For any cluster with insufficient sample quantity, the original samples corresponding to the cluster are merged with the screened synthetic sample set, to obtain an enhanced sample set corresponding to the cluster, and the enhanced sample set is taken as the target sample set of the cluster. For any cluster with sufficient sample quantity, the cluster assignment result corresponding to the cluster with sufficient sample quantity is taken as the target sample set of the cluster. Based on the target sample set of each cluster, a target data set is determined.

[0016] The beneficial effect of adopting the above further scheme is: identifying the working condition cluster with insufficient sample quantity, constructing a multi-dimensional condition vector by extracting cluster gravity feature and statistical feature, establishing a unique working condition fingerprint for each target cluster, and ensuring that the generated data not only maintains the time sequence authenticity, but also accurately matches the fluctuation characteristics and statistical rules of the target cluster based on the generation mode of the condition vector. A quadruple loss function is designed, which adds a Euclidean distance constraint loss based on the original reconstruction loss, adversarial loss and step loss of TimeGAN, ensuring that the generated samples maintain a reasonable spatial distance from the cluster gravity center, avoiding the generation of invalid data that deviates from the actual working condition. Through a strict Euclidean distance threshold screening mechanism, the quality and rationality of the generated samples are further ensured. The sample balance under various working conditions, especially rare extreme working conditions, is improved.

[0017] Further, the multi-dimensional condition vector of the cluster comprises: Based on the cluster assignment result corresponding to the cluster, the cluster gravity feature is extracted, and the cluster gravity feature is flattened according to the set dimension to obtain a high-dimensional cluster gravity feature vector, and the cluster gravity feature represents the change mode of the plurality of target meteorological features at the set time; Based on the cluster gravity feature and a preset statistical feature calculation formula, the mean vector and the standard deviation vector of all samples in the cluster on each target meteorological feature dimension are calculated, and the mean vector and the standard deviation vector are spliced into a statistical feature vector; The high-dimensional cluster gravity feature vector and the statistical feature vector are compressed and fused by an encoding network to obtain an original condition vector; The original condition vector is compressed and mapped by an encoding network to obtain a multi-dimensional condition vector, and the multi-dimensional condition vector is a 32-dimensional condition vector.

[0018] The beneficial effect of adopting the above further scheme is: organically combining the cluster gravity feature and the statistical feature, retaining the typical time sequence change mode of the wave energy data under the working condition, and integrating the distribution characteristics of the samples in the cluster, forming a "digital fingerprint" that comprehensively describes the working condition characteristics, and efficiently mapping the original feature vector to a 32-dimensional low-dimensional space through the intelligent compression of the three-layer encoding network, which not only eliminates feature redundancy, but also retains key discriminative information.

[0019] Further, the C-TimeGAN model is trained based on the cluster assignment result corresponding to the cluster and the multi-dimensional condition vector, and a trained C-TimeGAN model is obtained, comprising: S331, based on the TimeGAN framework and the LSTM formula, an initial C-TimeGAN is constructed, and the initial C-TimeGAN comprises an embedding network, a recovery network, a conditional generation network and a discrimination network; S332, constructing a loss function including a reconstruction loss, an unsupervised adversarial loss, a supervised step loss, and an Euclidean distance constraint loss, wherein the reconstruction loss is used to ensure the reversibility of the embedding-recovery process, the unsupervised adversarial loss is used to train the discriminator to distinguish between real sequences and generated sequences, the supervised step loss is used to ensure that the generator learns the real time series transition dynamics, and the Euclidean distance constraint loss is used to ensure that the generated sequence maintains a reasonable distance from the cluster center; S333, training the embedding network and the recovery network based on the cluster assignment result corresponding to the cluster and the multi-dimensional conditional vector, fixing the parameters of the conditional generation network and the discriminator network, and obtaining a pre-trained embedding network and recovery network; S334, updating the parameters of the discriminator network based on the cluster assignment result corresponding to the cluster and the multi-dimensional conditional vector, and maximizing the unsupervised adversarial loss; S335, updating the parameters of the embedding network and the recovery network based on the cluster assignment result corresponding to the cluster and the multi-dimensional conditional vector, and minimizing the weighted sum of the reconstruction loss and the supervised step loss; S336, updating the parameters of the conditional generation network based on the cluster assignment result corresponding to the cluster and the multi-dimensional conditional vector, and minimizing the weighted sum of the unsupervised adversarial loss, the supervised step loss, and the Euclidean distance constraint loss, performing S334 to S336 until a training stop condition is met, and obtaining a trained C-TimeGAN model.

[0020] The beneficial effects of the above further scheme are: a four-loss function system is constructed, the reconstruction loss guarantees the reversible mapping between the original feature space and the latent representation space, the unsupervised adversarial loss drives the dynamic game of the generation and discrimination network, the supervised step loss ensures that the generator captures the real time series transition rule, and the newly added Euclidean distance constraint loss effectively suppresses the deviation of the generated sample from the target cluster feature distribution. Through the phased training mechanism, the embedding-recovery network is pre-trained to establish a stable feature representation basis, and then the alternating update strategy is used to coordinate the optimization process of the four network components. This training method not only avoids the mode collapse problem common in GAN models, but also ensures the high consistency of the generated data and the target working condition through the continuous injection of the conditional vector. The final C-TimeGAN model can generate high-quality synthetic data with both temporal coherence and working condition specificity, providing rich and reliable training samples for subsequent prediction models.

[0021] Further, for any cluster with insufficient sample quantity, a synthetic sample set is generated using the trained C-TimeGAN model based on the multi-dimensional conditional vector, the sample quantity, and the maximum sample quantity of the cluster, comprising: S341, determining the maximum sample quantity of each cluster based on a preset sample balancing strategy and the sample quantity of each cluster; S342, for any cluster with insufficient sample quantity, sampling a random noise sequence of a time step, the random noise obeying a multi-dimensional Gaussian distribution; S343, for any cluster with insufficient sample quantity, inputting the multi-dimensional conditional vector of the cluster and the random noise sequence into the generator of the trained C-TimeGAN model to generate a latent representation sequence; S344, for any cluster with insufficient sample quantity, inputting the latent representation sequence into the recovery network of the C-TimeGAN model to obtain a generated synthetic time series sample, and performing S342 to S344 until a preset number of times to obtain a plurality of synthetic time series samples; S345, determining a synthetic sample set corresponding to the cluster based on all synthetic time series samples.

[0022] The beneficial effects of the above further scheme are: based on the sample balancing strategy, the required generation quantity of each cluster is dynamically calculated to ensure the accuracy and pertinence of data enhancement; then a random noise sequence conforming to the statistical characteristics is generated through a multi-dimensional Gaussian distribution to provide rich input sources for the generation process. In the generation process, the generator of the trained C-TimeGAN model deeply fuses the multi-dimensional conditional vector representing the specific working condition characteristics and the random noise through a multi-level conditional injection mechanism to generate a latent representation sequence conforming to the distribution characteristics of the target cluster; the recovery network accurately maps these latent representations back to the original feature space to form high-quality synthetic time series samples.

[0023] Further, the bidirectional long short-term memory neural network is trained and optimized based on the target sample set corresponding to the cluster and a preset improved dynamic optimization algorithm to obtain a wave energy prediction model corresponding to the cluster, including: A bidirectional long short-term memory neural network is constructed for each cluster based on the target sample set corresponding to each cluster; For each cluster, the target sample set corresponding to the cluster is divided into a training set, a validation set and a test set; For each cluster, the number of hidden units, the learning rate, the Dropout dropout probability and the training batch size of the bidirectional long short-term memory neural network of the cluster are defined as the hyperparameter vector to be optimized, and the prediction error of the bidirectional long short-term memory neural network on the validation set is used as the fitness function; For each cluster, based on the training set, the validation set, the hyperparameter vector to be optimized and the fitness function corresponding to the cluster, an optimal solution is searched in the hyperparameter space by using the improved dynamic optimization algorithm to obtain an optimal hyperparameter configuration; For each of the clusters, based on the optimal hyperparameter configuration, a bidirectional long short-term memory neural network model is trained on the training set of the cluster, and the performance of the trained bidirectional long short-term memory neural network model is evaluated on the test set, to obtain a wave energy prediction model corresponding to the cluster.

[0024] The beneficial effect of the above further scheme is that the BiLSTM key hyperparameters (number of hidden units, learning rate, Dropout probability, etc.) are taken as the optimization target, and the unique adaptive exploration-exploitation mechanism and elite guide strategy of the IAOO algorithm are used to perform efficient global search in a complex multi-dimensional parameter space. Compared with the traditional grid search and manual parameter tuning methods, the IAOO algorithm intelligently balances global exploration and local development through a dynamic conversion probability mechanism, and combines elite memory pool maintenance and historical optimal solution guidance to improve the efficiency and accuracy of hyperparameter optimization. Through the hierarchical training and validation mechanism, the optimal hyperparameter combination is first quickly located on the validation set using the IAOO algorithm, then the model training is completed on the training set, and finally the performance evaluation is performed on the test set, forming a complete model optimization closed loop. This optimization scheme enables the BiLSTM model of each working condition cluster to achieve the best prediction state, improving the overall accuracy and working condition adaptability of wave energy power prediction.

[0025] Further, based on the training set, the validation set, the hyperparameter vector to be optimized, and the fitness function corresponding to the cluster, the improved IAOO algorithm is used to search for the optimal solution in the hyperparameter space to obtain the optimal hyperparameter configuration, including: S441, initializing the population of the improved IAOO algorithm based on the search space of the hyperparameter vector to be optimized, setting the population size and the maximum number of iterations, the population including a plurality of individuals, each individual representing a set of hyperparameter vector schemes; S442, calculating the exploration probability of each individual in the current iteration population according to the cosine decay formula, and generating a random number; S443, based on the exploration probability and the random number, determining the position update strategy of each individual in the current iteration population to execute the exploration phase or the exploitation phase; S444, for each of the individuals, if the current iteration individual is determined to execute the exploration phase, updating the position of the individual according to the hierarchical position update strategy; S445, for each of the individuals, if the current iteration individual is determined to execute the exploitation phase, updating the position of the individual according to the enhanced exploitation strategy guided by the elite; S446, based on the position of each individual, obtaining an updated population; S447, for each individual in the updated population, configure a bidirectional long short-term memory neural network based on the individual's corresponding hyperparameter vector scheme, train the configured bidirectional long short-term memory neural network based on the training set corresponding to the cluster, and calculate the prediction error of the trained network based on the validation set corresponding to the cluster; S448, based on the fitness function and the prediction error of each individual in the updated population, evaluate the fitness of each individual in the updated population, and update the global optimal solution and the elite memory pool, execute S442 to S448 until the number of iterations reaches the maximum number of iterations or the number of consecutive improvements of the global optimal solution reaches the preset threshold, and the hyperparameter vector scheme corresponding to the global optimal solution in the current iteration period is taken as the optimal hyperparameter configuration.

[0026] The beneficial effects of the above-mentioned further scheme are: by simulating the intelligent propagation mechanism of oats seeds in nature, a complete "exploration-exploitation" adaptive optimization framework is constructed. After establishing a population containing multiple hyperparameter combinations in the initialization stage, the algorithm dynamically calculates the exploration probability of each individual through the cosine decay formula, intelligently balancing the relationship between global search and local development; in the exploration stage, a hierarchical position update strategy is adopted, which divides the population individuals into different groups for global exploration, guided exploration and local disturbance, effectively maintaining the diversity of the population; in the exploitation stage, an elite guiding mechanism is introduced, which maintains an elite memory pool and calculates an adaptive guiding vector, so that the individual can intelligently approach the historical optimal solution direction during position updating. After each iteration, the algorithm evaluates the fitness of each hyperparameter combination based on the prediction error on the validation set and dynamically updates the elite memory pool. After multiple iterations, the optimal hyperparameter configuration finally output makes the BiLSTM model of each working condition cluster reach the best performance state, improving the accuracy and stability of wave energy power prediction. BRIEF DESCRIPTION OF DRAWINGS

[0027] Figure 1 A flowchart of a wave energy power prediction method provided by an embodiment of the present application is shown in the figure; Figure 2 Another flowchart of a wave energy power prediction method provided by an embodiment of the present application is shown in the figure; Figure 3 A schematic diagram of an F-HBA power conversion matrix provided by an embodiment of the present application is shown in the figure; Figure 4 A meteorological data and power correlation coefficient thermodynamic diagram provided by an embodiment of the present application is shown in the figure; Figure 5 A K-Means clustering flowchart based on DBA provided by an embodiment of the present application is shown in the figure; Figure 6An IAOO algorithm flowchart is provided for an embodiment of the present application. DETAILED DESCRIPTION

[0028] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the scope of protection of the present application.

[0029] In addition, the term "and / or" in the present application is only used to describe an association relationship of associated objects, and can represent three relationships, for example, A and / or B can represent three cases of existence of A alone, existence of A and B simultaneously, and existence of B alone. In addition, the character " / " in the present application generally represents an "or" relationship between the front and rear associated objects, unless otherwise specified.

[0030] The embodiments of the present application provide a wave energy power generation power prediction method, which can be executed by an electronic device. The electronic device can be a server or a mobile terminal device. The server can be an independent physical server, a server cluster composed of multiple physical servers or a distributed system, or a cloud server providing cloud computing services. The mobile terminal device can be a notebook computer, a desktop computer or the like, but is not limited thereto.

[0031] As shown in Figure 1 and Figure 2 A wave energy power generation power prediction method mainly includes the following steps. S1, sample data is acquired, preprocessed and feature screened to obtain a wave energy power generation dataset. The sample data includes wind direction, wind speed, gust wind speed, significant wave height, dominant wave period, average wave period, dominant wave direction, sea level pressure, sea surface temperature, air temperature and dew point temperature. The wave energy power generation dataset includes multiple target meteorological features, and the multiple target meteorological features include significant wave height, average wave period, gust wind speed, wind speed and power generation power. In the embodiments of the present application, firstly, the original sample data is preprocessed by abnormal value detection and missing value supplement; secondly, the power conversion matrix of the multi-buoy oscillating float wave power generation device (Floating heave-buoy array, F-HBA) is fitted using the support vector machine (Support Vector Machine, SVM) algorithm, and the fitting process is that the input quantity is the significant wave height and the average wave period, and the output quantity is the power generation power. Then, the meteorological data and the fitted power generation power are used to construct a complete wave power generation data set, and finally, the Pearson correlation coefficient is used to screen important features of the power generation power in the data set to obtain a screened wave power generation data set.

[0032] Specifically, the sample data is multi-buoy measurement data and weather station data, and the data is obtained from the National Data Buoy Center (National Data Buoy Center, NDBC), and the station taken is station 46014, the time interval is 1 hour, and the data content includes wind direction (WDIR), wind speed (WSPD), gust wind speed (GST), significant wave height (WVHT), dominant wave period (DPD), average wave period (APD), dominant wave direction (MWD), sea level pressure (PRES), sea surface temperature (WTMP), air temperature (ATMP) and dew point temperature (DEWP).

[0033] Specifically, the sample data is preprocessed and screened to obtain a wave power generation data set, including: S11, determining the abnormal value of the sample data based on the preset quartile range method, and removing the abnormal value of the sample data to obtain the removed sample data; In the embodiments of the present application, if a given meteorological feature data is , the sorted sample is , X i The first quartile Q1 of X is: The third quartile Q3 of X is: The interquartile range IQR of X is: .

[0034] The abnormal value determination formula is: ; .

[0035] S12, filling the abnormal value position and the missing value position in the removed sample data based on the preset K-nearest neighbor complementary method to obtain the filled sample data; In the embodiments of the present application, the abnormal values are filled by K-Nearest Neighbor Imputation, and the missing values are also filled by K-Nearest Neighbor Imputation. The K-Nearest Neighbor Imputation corrects the missing data, and the K-Nearest Neighbor Imputation algorithm corrects the average value of the missing data according to the average value of the data located at K positions before and after the missing value.

[0036] The formula of the K-Nearest Neighbor Imputation algorithm is as follows: ; wherein Xi is the position of the missing time series data, is the Kth data before the missing position, is the Kth data after the missing position.

[0037] S13, fitting the power conversion matrix of the multi-buoy oscillating buoy wave energy generation device and the effective wave height and the average wave period in the sample data based on the support vector machine algorithm, and determining the power generation power; In the embodiments of the present application, the power conversion matrix of the multi-buoy oscillating buoy wave energy generation device (F-HBA) is fitted by using the support vector machine (SVM), as shown in FIG. 8. Figure 3 The support vector machine (SVM) algorithm is to find a nonlinear function , so that . Taking each time point as a sample, the input is the effective wave height and the average wave period , and the output is the power generation power .

[0038] The support vector machine algorithm is as follows: ; ; ; .

[0039] wherein, , represents the ith sample, represents the effective wave height observation value of the nth hour point in the sample i, represents the average wave period observation value of the nth hour point in the sample i, represents the power generation power superscript of the nth hour point in the sample i, and T represents transposition.

[0040] S14, calculating a plurality of correlation coefficients based on the power generation power data, the filled sample data and a preset Pearson correlation coefficient calculation formula, the correlation coefficients representing the influence degree of the meteorological features in the sample data on the power generation power; In the embodiments of the present application, the power generation data is added to the filled sample data, and then a plurality of correlation coefficients are calculated using the Pearson correlation coefficient calculation formula to obtain the influence degree of the meteorological features on the power generation.

[0041] In S15, based on the plurality of correlation coefficients and a set coefficient threshold, a plurality of target meteorological features are screened from the sample data to obtain a wave energy power generation dataset, and the plurality of target meteorological features are effective wave height, average wave period, gust wind speed, wind speed and power generation.

[0042] In the embodiments of the present application, as shown in Figure 4 , four features with a Pearson correlation coefficient greater than 0.3 are selected as input features, and the complete wave energy power generation dataset includes effective wave height, average wave period, gust wind speed, wind speed and power generation.

[0043] In S2, based on the wave energy power generation dataset, a preset normalization processing method and a preset dynamic time warping centroid average K-Means algorithm, a clustering result is determined, and the clustering result includes a plurality of cluster assignment results, and each cluster corresponds to one marine environment working condition mode. In the embodiments of the present application, the screened wave energy power generation dataset is normalized, and then the processed data is clustered.

[0044] Specifically, S2 includes the following steps: In S21, each target meteorological feature in the wave energy power generation dataset is mapped to a set interval based on a preset normalization processing method to obtain a normalized dataset. In the embodiments of the present application, a maximum-minimum normalization method is used to map all feature values to the interval [0, 1].

[0045] The maximum-minimum normalization method is: .

[0046] In S22, based on the preset dynamic time warping centroid average K-Means algorithm, a plurality of time series samples in the normalized dataset are clustered to obtain a clustering result, with the minimum intra-cluster sum of squared deviations as the clustering target. The clustering target is: . Wherein, represents a time series sample, represents the kth cluster, represents the cluster centroid of the kth cluster, represents the sample and the cluster centroid between the dynamic time warping distance.

[0047] In the embodiments of the present application, as shown in Figure 5 , a data set of N multivariate time series samples is normalized , each time series is a 24*5 matrix, which can be expressed as . Wherein, is a 5-dimensional column vector, representing 5 feature values at time n. The superscript T represents transposition.

[0048] To divide the N time series into kmax clusters (where kmax is the optimal cluster classification number selected) , a cluster division and a set of corresponding cluster centers are needed to minimize the total cluster within dispersion sum of squares as the clustering objective, and to cluster multiple time series samples in the normalized data set.

[0049] Further, step S22 includes: S221, randomly selecting multiple time series samples in the normalized data set as a cluster center set based on a preset cluster number, the cluster center set including multiple clusters; In the embodiments of the present application, the cluster centers are initialized, and kmax different time series samples X are randomly selected from the data set S as an initial cluster center set , the initial cluster center set is expressed as: ; .

[0050] Wherein, the superscript (t) represents the iteration number, and the initial t=0.

[0051] S222, for each of the time series samples, based on a preset dynamic time warping algorithm, calculating the minimum distance path between the time series sample and each of the cluster centers in the current iteration; In the embodiments of the present application, each iteration sets the iteration counter t=t+1.

[0052] For each time series sample in the data set (from i=1 to N), the dynamic time warping (DTW) distance square sum between and the kth cluster center is calculated, and the minimum distance path is obtained by the dynamic time warping algorithm , and the algorithm is as follows: ; Wherein, represents the calculation of sample and the kth cluster gravity center an optimal warping path between them, the path is a set composed of index pairs . represents an alignment point in the path, indicating that the ath time step in is matched with the nth time step in , both and refer to the 5-dimensional feature vector of the time series at a certain time.

[0053] S223, based on the minimum distance path between each time series sample and each cluster respectively, cluster assignment is performed on all time series samples to obtain the clustering result of the current iteration, the clustering result of the current iteration includes multiple clusters, each cluster corresponds to a cluster assignment set and a cluster gravity center, and the cluster assignment set includes multiple time series samples; In the embodiment of the application, the time series is assigned to the cluster corresponding to the cluster gravity center closest to it .

[0054] The assignment algorithm is: ; wherein, represents the index of the cluster to which the sample is assigned at the tth iteration, and after this step, a new cluster division is obtained.

[0055] S224, for each cluster of the current iteration, based on the cluster assignment set corresponding to the cluster and the preset DTW gravity center average algorithm, a new cluster gravity center of the cluster in the current iteration is determined. In the embodiment of the application, for each cluster (from k=1 to kmax), a new sequence of cluster gravity centers needs to be calculated, the sequence is the gravity center of the cluster in which it is located, and the cluster gravity center can minimize the sum of squares of DTW distances with all sequences in the cluster, as shown in the following formula: ; Since direct calculation consumes more computing resources, DBA algorithm is used to iteratively solve the cluster gravity center , and to avoid the algorithm falling into local optimum, the initialization gravity center is continuously selected.

[0056] Further, the determination of the new cluster gravity center of the cluster in the current iteration based on the cluster assignment set corresponding to the cluster and the preset DTW gravity center average algorithm includes: S2241, randomly selecting a time series sample in the cluster assignment set corresponding to the cluster as an initial value of the cluster gravity center; S2242, based on a preset dynamic time warping algorithm, calculating an optimal warping path of each time series sample in the cluster assignment set of the current sub-iteration and the value of the cluster gravity center of the current sub-iteration; S2243, for each time point of the cluster gravity center of the current sub-iteration, based on the optimal warping path of all time series samples in the cluster assignment set corresponding to the cluster, determining all sample data points in the cluster aligned with the time point in the optimal warping path to form a data point set corresponding to the time point; S2244, calculating the average value of all data points in the data point set corresponding to each time point respectively; S2245, based on the average value of all data points in the data point set corresponding to each time point, determining a new gravity center sequence of the cluster of the current sub-iteration; S2246, judging whether the new gravity center sequence of the cluster of the current sub-iteration satisfies a sub-convergence condition; S2247, if yes, taking the new gravity center sequence after satisfying the sub-convergence condition as a new cluster gravity center of the cluster in the current iteration; S2248, if no, taking the new gravity center sequence as the value of the cluster gravity center of the next sub-iteration, and executing S2242 to S2246 until the new gravity center sequence obtained after satisfying the sub-convergence condition is taken as the new cluster gravity center of the cluster in the current iteration; The judgment of whether the new gravity center sequence of the cluster of the current sub-iteration satisfies the sub-convergence condition comprises: judging whether the difference between the new gravity center sequence and the value of the cluster gravity center is not greater than a preset gravity center threshold, or judging whether the iteration number of the current sub-iteration reaches a preset maximum internal iteration number; If the difference between the new gravity center sequence and the value of the cluster gravity center is not greater than the preset gravity center threshold, or the iteration number of the current sub-iteration reaches the preset maximum internal iteration number, it is determined that the sub-convergence condition is satisfied, otherwise it is determined that the sub-convergence condition is not satisfied.

[0057] In the above embodiment, a sample is randomly selected from the cluster as the initial gravity center of this update, denoted as . For each sample in the cluster , the optimal warping path between and the current gravity center is calculated by the DTW algorithm.

[0058] A new empty gravity center sequence For each time point n (from n = 1 to 24), its value is calculated by the following formula: For each time point n (from n = 1 to 24), its value is calculated by the following formula: ; ; .

[0059] First, all sample point sets aligned with the n th time point of the gravity center are obtained , then the alignment path of each time sequence in the cluster and the current gravity sequence is calculated, and then all sample points aligned with the n th time point of the gravity center are averaged to obtain the new gravity time point value , and finally the cluster gravity center is obtained .

[0060] S225, based on the new cluster gravity center corresponding to each cluster, determine the new cluster gravity center set of the current iteration, and take the new cluster gravity center set of the current iteration as the cluster gravity center set of the next iteration, execute S222 to S224, until the external convergence condition is met, obtain the clustering result, the external convergence condition is that the clustering result of all time sequence samples of the current iteration is within a set difference range of the clustering result of the last iteration of the current iteration, or the number of times of the current iteration reaches a set iteration number threshold.

[0061] S3, generating a generative adversarial network based on the clustering result and a preset condition, determining a target data set, the target data set including a target sample set corresponding to each cluster; In the embodiment of the application, k max clusters and their corresponding cluster gravity centers are obtained through S2, and data enhancement is performed for clusters with insufficient sample quantity.

[0062] Specifically, S3 includes the following sub-steps: S31, determining a cluster with insufficient sample quantity based on the clustering result; S32, for any cluster with insufficient sample quantity, constructing a multi-dimensional condition vector of the cluster; In the embodiment of the application, constructing the multi-dimensional condition vector of the cluster includes: S321, extracting a cluster gravity center feature based on the cluster allocation result corresponding to the cluster, and flattening the cluster gravity center feature according to a set dimension to obtain a high-dimensional cluster gravity center feature vector, the cluster gravity center feature representing the change pattern of multiple target meteorological features at a set time; S322, calculating the mean vector and the standard deviation vector of all samples in the cluster on each target meteorological feature dimension based on the cluster gravity center feature and a preset statistical feature calculation formula, and splicing the mean vector and the standard deviation vector into a statistical feature vector; S323, the high-dimensional cluster gravity center feature vector and the statistical feature vector are compressed and fused by an encoding network to obtain an original condition vector; S324, the original condition vector is compressed and mapped by an encoding network to obtain a multi-dimensional condition vector, and the multi-dimensional condition vector is a 32-dimensional condition vector.

[0063] In the above embodiment, for the kth cluster , the cluster gravity center is a 24*5 matrix, representing the typical change pattern of 5 features in 24 hours. Flattening it into a 120-dimensional vector obtains .

[0064] Based on a preset statistical feature calculation formula, the statistical features of all samples in the cluster in each feature dimension are calculated to obtain a 5-dimensional mean vector and a 5-dimensional standard deviation vector . The preset statistical feature calculation formula is: ; .

[0065] These statistical features are spliced into a statistical vector: , wherein is a 10-dimensional vector.

[0066] The two levels of condition information are compressed and fused by an encoding network, and the compression and fusion formula is as follows: ; , wherein is a 130-dimensional vector.

[0067] Then it is mapped to a low-dimensional condition space by a 3-layer fully connected encoding network: ; , wherein the encoder is an encoder network structure, the input layer is 130-dimensional, the hidden layer 1 is 128-dimensional, the activation function is LeakyReLU(0.2), the hidden layer 2 is 64-dimensional, the activation function is LeakyReLU(0.2), and the output layer is 32-dimensional, the activation function is Tanh. is a 32-dimensional vector. The activation function LeakyReLU(0.2) represents a leaky rectified linear unit function (LeakyReLU) with a slope of 0.2.

[0068] S33, for any sample quantity insufficient cluster, based on the cluster corresponding to the cluster allocation result and the multi-dimensional condition vector to the pre-constructed initial C-TimeGAN model is trained, and the trained C-TimeGAN model is obtained; the trained C-TimeGAN model is a conditional generative adversarial network based on TimeGAN framework; In the embodiment of the application, S33 comprises the following sub-steps: S331, based on the TimeGAN framework and the LSTM formula, an initial C-TimeGAN is constructed, and the initial C-TimeGAN comprises an embedding network, a recovery network, a conditional generation network and a discrimination network; In the embodiment of the application, the method for constructing the initial C-TimeGAN comprises: defining an embedding network, the embedding network being used to map the multi-dimensional time series data to a latent representation space and fuse the multi-dimensional condition vector based on the TimeGAN framework and the LSTM formula; defining a recovery network, the recovery network being used to map the latent representation space back to the original feature space of the multi-dimensional time series data based on the TimeGAN framework and the fully connected layer; defining a conditional generation network, the conditional generation network being used to fuse the multi-dimensional condition vector and random noise to generate a new latent sequence based on the initial state injection strategy, the per-step input injection strategy and the gating injection strategy through the TimeGAN framework and the LSTM formula; defining a discrimination network, the discrimination network being used to judge whether the input latent sequence is a real embedding or a generated embedding based on the TimeGAN framework and the bidirectional LSTM formula to obtain a judgment result, the judgment result comprising a forward hidden state and a backward hidden state, and based on the judgment result and a feature fusion function, the two-direction features are jointly mapped to obtain a comprehensive discrimination result.

[0069] In the above embodiment, the LSTM formula is: ; wherein, is the input gate output, is the forget gate output, is the output gate output, is the candidate memory output; is the input vector, is the previous time hidden state, is the previous time memory unit, is the current memory unit, is the current time output; , , is the weight matrix and the bias; Sigmoid function is used to control the switch of the gate; tanh is used to generate candidate memories. represents element-wise multiplication; three gates (input, forget, output) control the "write, keep, output" information respectively.

[0070] In the above embodiment, the embedding network , maps the original feature space to the latent representation space while fusing the conditional information: ; where, is the input feature vector at time step t, which is a row vector, is the cluster conditional vector obtained by S314, is the latent representation.

[0071] The recovery network , maps the latent representation back to the original feature space: ; Its implementation is to use a fully connected layer, input a 64-dimensional latent vector, and output a 5-dimensional feature vector, using Sigmoid as the activation function.

[0072] The conditional generation network , generates a sequence of latent representations from random noise and conditional vectors: ; where, is the random noise at time step t, and I represents a 32-dimensional identity matrix. is the generated latent representation.

[0073] The above uses a multi-level conditional injection strategy, and the initial state injection: , takes the conditional vector as the initial hidden state of LSTM, and MLP refers to a fully connected feedforward neural network; each step input injection: , concatenates the conditional vector with the noise at each time step; gated injection, adds a conditional gating mechanism inside the LSTM .

[0074] The discriminator network , discriminates whether the input sequence is a real embedding or a generated embedding, while receiving conditional information to enhance the discrimination ability: ; Uses a bidirectional LSTM structure to discriminate whether the input sequence is a real embedding or a generated embedding: ; .

[0075] where, This represents the embedding features of the sample to be judged at time t. This is the condition vector corresponding to the sample; and These represent the forward and backward LSTM network units, respectively, used to capture the forward and backward dependencies of the time series.

[0076] After obtaining the forward hidden state and the backward hidden state ( and After that, through the feature fusion function By jointly mapping the features from both directions, a comprehensive discriminant representation is obtained: ; in, A value of 1 indicates that the sample generated by the generator is judged as true. A value of 0 indicates that the sample generated by the generator is identified as false.

[0077] S332, Construct a loss function, which includes reconstruction loss, unsupervised adversarial loss, supervised step loss, and Euclidean distance constraint loss. The reconstruction loss is used to ensure the reversibility of the embedding-recovery process. The unsupervised adversarial loss is used to train the discriminator to distinguish between real sequences and generated sequences. The supervised step loss is used to ensure that the generator learns the real temporal transition dynamics. The Euclidean distance constraint loss is used to ensure that the generated sequence maintains a reasonable distance from the cluster centroid. In this embodiment, Euclidean distance constraint loss is added to the three basic losses of TimeGAN, forming a quadruple loss function.

[0078] Reconstruction losses The function is: ; Where X is from cluster A real sample sequence extracted from the data. It is its reconstruction output.

[0079] Unsupervised combat loss The function is: ; in, These are samples generated by the generator, and their distribution is as follows: .

[0080] Supervision of step loss The function is: ; Euclidean distance constraint loss for: ; where the Euclidean distance is defined as (the Euclidean distance is calculated after the 24x5 matrix is flattened); ; Threshold calculation: ; where, is the average Euclidean distance of samples in cluster Ck to the cluster center plus 2 times the standard deviation, ensuring that the generated samples are within a reasonable range.

[0081] S333, based on the cluster assignment result corresponding to the cluster and the multi-dimensional condition vector, the embedding network and the recovery network are trained to minimize the reconstruction loss, the parameters of the condition generation network and the discriminator network are fixed, and the pre-trained embedding network and the recovery network are obtained; S334, based on the cluster assignment result corresponding to the cluster and the multi-dimensional condition vector, the discriminator network parameters are updated to maximize the unsupervised adversarial loss; S335, based on the cluster assignment result corresponding to the cluster and the multi-dimensional condition vector, the embedding network and the recovery network parameters are updated to minimize the weighted sum of the reconstruction loss and the supervised step loss; S336, based on the cluster assignment result corresponding to the cluster and the multi-dimensional condition vector, the condition generation network parameters are updated to minimize the weighted sum of the unsupervised adversarial loss, the supervised step loss, and the Euclidean distance constraint loss, and S334 to S336 are executed until the training stop condition is met, obtaining the trained C-TimeGAN model.

[0082] In the embodiments of the application, a phased joint training strategy is adopted.

[0083] Phase 1: Pre-training embedding and recovery network (iterating 500 times), minimizing the reconstruction loss, fixing the generator and discriminator: ; where, and are the parameters of the embedding network and the recovery network, respectively.

[0084] Phase 2: Joint training of all networks (iterating 1000 times).

[0085] Each training batch is updated in the following order: (1) Update the discriminator: ; where, is the parameter of the discriminator.

[0086] (2) Update the embedding and recovery network: ; (3) Update generator (with Euclidean distance constraint): ; where, is set as a hyperparameter: , , .

[0087] S34, for any one sample insufficient cluster, based on the multi-dimensional condition vector of the cluster, the sample quantity and the maximum sample quantity, a synthesized sample set is generated by using the trained C-TimeGAN model; In the embodiment of the application, for any one sample insufficient cluster, based on the multi-dimensional condition vector of the cluster, the sample quantity and the maximum sample quantity, a synthesized sample set is generated by using the trained C-TimeGAN model, comprising: S341, based on the preset sample balance strategy and the sample quantity of each cluster, the maximum sample quantity of each cluster is determined; In the embodiment of the application, a sample balance strategy is adopted, and the target is to make the sample quantities of all clusters reach a similar level, and the maximum sample quantity of the cluster is calculated: For the cluster , the number of samples to be generated is as follows: ; where, as a balance coefficient (generally 0.3-0.7), to avoid excessive generation.

[0088] S342, for any one sample insufficient cluster, a random noise sequence of a set time step is sampled, and the random noise obeys a multi-dimensional Gaussian distribution; In the embodiment of the application, for each cluster that needs to be enhanced, the following steps are repeated times. 24 time step random noises are sampled: ; where, is a 32-dimensional unit matrix, represents a 32-dimensional independent Gaussian noise with a mean of 0 and a standard deviation of 1.

[0089] S343, for any one sample insufficient cluster, the multi-dimensional condition vector of the cluster and the random noise sequence are input into the generator of the trained C-TimeGAN model to generate a latent representation sequence; In the embodiment of the application, the condition vector and the noise sequence are input into the generator: ; S344, for any one sample insufficient cluster, input the potential representation sequence into the restoration network of the C-TimeGAN model to obtain a generated synthetic time sequence sample, and perform S342 to S344 until a set number of times to obtain a plurality of synthetic time sequence samples; In the embodiments of the application, the restoration network is mapped to the feature space: Finally, a generated 24x5 sample matrix is obtained .

[0090] S345, based on all synthetic time sequence samples, determine the synthetic sample set corresponding to the cluster.

[0091] S35, for any one sample insufficient cluster, calculate the Euclidean distance between each sample in the synthetic sample set and the cluster barycenter, and filter the samples in the synthetic sample set based on the respective Euclidean distances to obtain a filtered synthetic sample set; S36, for any one sample insufficient cluster, merge the original sample corresponding to the cluster with the filtered synthetic sample set to obtain an enhanced sample set corresponding to the cluster, and take the enhanced sample set as the target sample set of the cluster; S37, for any one sample sufficient cluster, take the cluster assignment result corresponding to the sample sufficient cluster as the target sample set of the cluster; S38, based on the target sample set of each cluster, determine the target data set.

[0092] S4, for each cluster, based on the target sample set corresponding to the cluster and the pre-set improved dynamic programming optimization algorithm, train and optimize the pre-constructed bidirectional long short-term memory neural network to obtain the wave energy prediction model corresponding to the cluster, to predict the wave energy power based on the wave energy prediction model corresponding to each cluster and new weather data. Get the predicted power generation information.

[0093] In the embodiments of the application, S4 includes the following sub-steps: S41, based on the target sample set corresponding to each cluster, construct a bidirectional long short-term memory neural network for each cluster; In the embodiments of the application, the method for constructing a bidirectional long short-term memory neural network comprises: Define the input of the bidirectional long short-term memory neural network as a weather feature sequence containing multiple time steps, and the output as a power prediction sequence corresponding to the time step; Construct a network architecture containing two bidirectional long short-term memory layers, wherein the first bidirectional long short-term memory layer is used to process the input sequence from the forward and reverse directions and output the spliced hidden state; A Dropout regularization layer is connected after the first bidirectional long short-term memory layer, and the Dropout regularization layer is used to randomly discard part of neuron outputs during the training process to prevent overfitting; The output of the Dropout regularization layer is taken as the input of a second bidirectional long short-term memory layer, and the second bidirectional long short-term memory layer extracts time sequence features from the bidirectional; A fully connected output layer is connected after the second bidirectional long short-term memory layer, and the fully connected output layer is used to map the extracted time sequence features to the predicted power generation power; A mean square error is used as a loss function of the bidirectional long short-term memory neural network, and the loss function is used to calculate the difference between the predicted power generation power and the actual power generation power.

[0094] S42, for each cluster, the target sample set corresponding to the cluster is divided into a training set, a validation set and a test set; S43, for each cluster, the number of hidden units, the learning rate, the Dropout dropout probability and the training batch size of the bidirectional long short-term memory neural network of the cluster are defined as the hyperparameter vector to be optimized, and the prediction error of the bidirectional long short-term memory neural network on the validation set is taken as the fitness function; S44, for each cluster, based on the training set, the validation set, the hyperparameter vector to be optimized and the fitness function corresponding to the cluster, an improved AnimatedOat Optimization algorithm is used to search for an optimal solution in the hyperparameter space, and an optimal hyperparameter configuration is obtained; In the embodiment of the application, the improved AnimatedOat Optimization algorithm is an improved AnimatedOat Optimization (IAOO).

[0095] As shown in Figure 6 based on the training set, the validation set, the hyperparameter vector to be optimized and the fitness function corresponding to the cluster, an improved AnimatedOat Optimization algorithm is used to search for an optimal solution in the hyperparameter space, and an optimal hyperparameter configuration is obtained, comprising: S441, based on the search space of the hyperparameter vector to be optimized, the set population size and the maximum number of iterations, the population of the improved AnimatedOat Optimization algorithm is initialized, and the population includes a plurality of individuals, and each individual represents a group of hyperparameter vector schemes; S442, the exploration probability of each individual in the current iteration population is calculated according to the cosine attenuation formula, and a random number is generated; S443, based on the exploration probability and the random number, it is judged that each individual in the current iteration population executes the position update strategy of the exploration stage or the utilization stage; S444, for each of the individuals, if it is judged that the individual of the current iteration is to perform the exploration phase, updating the position of the individual according to a hierarchical position updating strategy; S445, for each of the individuals, if it is judged that the individual of the current iteration is to perform the exploitation phase, updating the position of the individual according to an elite-guided enhanced exploitation strategy; S446, obtaining an updated population based on the position of each of the individuals; S447, for each individual in the updated population, configuring a bidirectional long short-term memory neural network based on the hyperparameter vector scheme corresponding to the individual, training the configured bidirectional long short-term memory neural network based on the training set corresponding to the cluster, and calculating the prediction error of the trained network based on the validation set corresponding to the cluster; S448, based on the fitness function and the prediction error of each individual of the updated population, evaluating the fitness of each individual of the updated population, and updating the global optimal solution and the elite memory pool, performing S442 to S448 until the number of iterations reaches the maximum number of iterations or the number of consecutive improvements of the global optimal solution reaches the preset threshold, and configuring the hyperparameter vector scheme corresponding to the global optimal solution in the current iteration period as the optimal hyperparameter.

[0096] In the above embodiment, the BiLSTM hyperparameter vector to be optimized: ; wherein, is the first layer BiLSTM hidden unit number range, is the second layer BiLSTM hidden unit number range, is the learning rate range, is the dropout probability range, is the batch size range.

[0097] The fitness function is: ; wherein, is the number of validation samples of the cluster , and the BiLSTM model on the validation set is used as the fitness function for evaluating the merits of the individual.

[0098] To overcome the defect of fixed exploration and exploitation probabilities in the original AOO, a cosine decay dynamic conversion probability is introduced: ; wherein t is the current iteration number, is the maximum iteration number.

[0099] When I1 > Pe(t), the exploration phase is executed, simulating the behavior of wild oat seeds spreading over a wide area by wind, water, or animals. I1 is a random number between 0 and 1.

[0100] The hierarchical location update strategy is as follows: ; Where N is the population size. This is the globally optimal solution in the t-th iteration. Round down to ensure that at least 10% of individuals implement the special strategy.

[0101] The elite memory pool maintenance mechanism includes: Initialization: At the start of the algorithm, create an empty set of size Ne: ; In this invention, Ne=5 is set (to retain the top 5 optimal solutions from history). Update rule: After each iteration, the elite pool is updated according to the following steps: first, all individuals in the current population are added to the elite pool. Merge, then sort by fitness value Sort the solutions from smallest to largest (smaller is better), and keep the top Ne individuals to update the elite pool. This yields Ne solutions.

[0102] ; in, .

[0103] For the i-th individual in the population Randomly select an elite solution from the elite pool. (j is randomly selected uniformly from 1 to Ne), calculate the guiding vector as shown in the following formula: ; The adaptive calculation of guidance strength is shown in the following formula: ; in, Based on guiding weights, For individuals The fitness gap with elite solutions, denominator Let be the fitness (normalization factor) of individual i. The adaptive mechanism explains that if... (Individuals are far inferior to elites) near Provide strong guidance to quickly gravitate towards an elite approach; if (Individuals approaching elite status) Approaching 0, weaken guidance and maintain local exploration.

[0104] The improved rolling propagation mechanism includes: When I1≤Pe(t) and I2>0.5, an improved rolling mechanism is executed. The improvement is that: on the basis of the original random disturbance , an adaptive guide term is superimposed , so that the individual gradually deviates from the elite solution direction during the rolling process, I1 and I2 are random numbers between 0 and 1.

[0105] where r is a random number between 0 and 1; is a seed quality parameter; is a thorn length parameter, N is the population size; is an eccentricity coefficient; is a dim-dimensional random matrix, each element is uniformly distributed in ; represents a dim-dimensional Levy flight vector.

[0106] Improved ejection propagation mechanism, including: When I1≤Pe(t) and I2≤0.5, an improved ejection mechanism is executed. The improvement is that: on the basis of the original ejection displacement , an adaptive guide term is superimposed , so that the ejection direction is affected by the elite solution, I1 and I2 are random numbers between 0 and 1.

[0107] The convergence and termination condition is: if the optimal fitness of the last t stop (t stop =10) generations has no significant improvement or reaches the maximum number of iterations , the iteration is terminated. The corresponding optimal parameter X best is output and used to train the final intra-cluster BiLSTM model.

[0108] S45, for each of the clusters, based on the optimal hyperparameter configuration, train a bidirectional long short-term memory neural network model on the training set of the cluster, and evaluate the performance of the trained bidirectional long short-term memory neural network model on the test set, to obtain the wave energy prediction model corresponding to the cluster.

[0109] In the embodiments of the application, each cluster is optimized and trained, the input is the training set, the validation set, the population size N=30, the maximum number of iterations Tmax=50, and the elite pool size Ne=5.

[0110] For each cluster, the output is the optimal hyperparameter, and the optimal model for each cluster is saved.

[0111] The bidirectional long short-term memory neural network model trained on the test set includes: Root mean square error (RMSE): ; Mean Absolute Error (MAE): ; Coefficient of Determination (R2):

[0112] wherein, : respectively represent the evaluation index of the prediction model corresponding to the kth cluster; is the true power value of the ith sample in the test set at the n th time; is the predicted power value of the ith sample in the test set at the n th time; is the average value of the true power value; is the total number of test set samples; is the output time step.

[0113] In the embodiments of the present application, the wave energy power is predicted based on the wave energy prediction model corresponding to each cluster and the new meteorological data to obtain the predicted power generation information, comprising: acquiring new meteorological data of a future set time period; performing dynamic time warping distance calculation on the new meteorological data and the gravity centers of each cluster respectively to obtain calculation results, and determining the cluster closest to the new meteorological data as the target cluster according to the calculation results; inputting the meteorological data into the trained wave energy prediction model corresponding to the target cluster for prediction to obtain the predicted power generation information.

[0114] The present application can construct a wave energy power generation data set closer to the actual working condition by acquiring sample data and pre-processing and feature screening; the K-Means algorithm based on dynamic time warping gravity center average is used to adaptively cluster the marine working conditions, overcoming the defect that a single model is difficult to adapt to dynamic switching of multiple working conditions; the conditional time series generative adversarial network is introduced to realize the generation of high-fidelity synthetic data under extreme working conditions, effectively alleviating the prediction distortion problem caused by the sparsity of key scene data; the improved dynamic Mac optimization algorithm is combined to realize intelligent optimization of the prediction model super parameter, improving the prediction accuracy and stability of the bidirectional long short-term memory neural network under different marine working conditions. A complete technical chain from data construction, working condition identification, sample enhancement to model optimization is formed, so that the wave energy power prediction has higher reliability and generalization ability in common and extreme scenarios, providing reliable technical support for efficient utilization of marine renewable energy and safe dispatching of power grids.

[0115] ​​​​The terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus.

[0116] The description above merely illustrates preferred embodiments of the present application and the principles of the technology employed. It should be understood by those skilled in the art that the scope of the application involved in the present application is not limited to the technical solutions formed by the specific combinations of the above technical features, and should also cover other technical solutions formed by the combinations of the above technical features or their equivalent features without departing from the above application concept. For example, the above technical features can be replaced with the technical features applied in the present application (but not limited to) having similar functions to form technical solutions.

Claims

1. A wave energy power production prediction method, characterized by, The method comprises the following steps: obtaining sample data, preprocessing and feature screening the sample data, and obtaining a wave energy generation dataset, wherein the sample data comprises wind direction, wind speed, gust wind speed, significant wave height, dominant wave period, average wave period, dominant wave direction, sea level pressure, sea surface temperature, air temperature, and dew point temperature, and the wave energy generation dataset comprises a plurality of target meteorological features, and the plurality of target meteorological features comprise significant wave height, average wave period, gust wind speed, wind speed, and power generation power; based on the wave energy generation dataset, a preset normalization processing method, and a preset dynamic time warping and K-Means algorithm with a moving average center, a clustering result is determined, and the clustering result comprises a plurality of cluster assignment results, and each cluster corresponds to one marine environment working condition mode; based on the clustering result and a preset conditional generative adversarial network, a target dataset is determined, and the target dataset comprises a plurality of target sample sets corresponding to the clusters; for each cluster, based on the target sample set corresponding to the cluster and a preset improved dynamic time warping optimization algorithm, a pre-constructed bidirectional long short-term memory neural network is trained and optimized to obtain a wave energy prediction model corresponding to the cluster, so that the wave energy prediction model corresponding to each cluster and new meteorological data are used to predict wave energy generation power to obtain predicted power generation power information.

2. A wave energy power production forecasting method according to claim 1, characterized in that, The wave energy generation dataset comprises a plurality of time series samples, each of the time series samples comprises a plurality of target meteorological features, the clustering result is determined based on the wave energy generation dataset, a preset normalization processing method, and a preset dynamic time warping and K-Means algorithm with a moving average center, and the determination comprises: each of the target meteorological features in the wave energy generation dataset is mapped to a set interval based on the preset normalization processing method to obtain a normalized dataset; a plurality of time series samples in the normalized dataset are clustered based on the preset dynamic time warping and K-Means algorithm with a moving average center to obtain the clustering result, and the clustering target is to minimize the sum of squared deviations within the cluster; wherein the clustering target is to minimize the sum of squared deviations within the cluster, and the clustering of the plurality of time series samples in the normalized dataset based on the preset dynamic time warping and K-Means algorithm with a moving average center comprises: ; wherein, characterizing a time series sample, characterizing the k-th cluster, characterizing a cluster center of the k-th cluster, characterizing a time series sample a dynamic time warping distance between the cluster center squared.

3. A wave energy power production forecasting method according to claim 2, characterised in that, S221, a plurality of time series samples are randomly selected in the normalized dataset as a cluster center set based on a preset number of clusters, and the cluster center set comprises a plurality of clusters; S222, for each time series sample, the minimum distance path between the time series sample and each cluster center in the current iteration is calculated based on a preset dynamic time warping algorithm; S223, based on the minimum distance path between each time series sample and each cluster, all time series samples are cluster-assigned to obtain a clustering result in the current iteration, and the clustering result in the current iteration comprises a plurality of clusters, each cluster corresponds to a cluster assignment set and a cluster center, and the cluster assignment set comprises a plurality of time series samples; ​ S224, for each cluster in the current iteration, determining a new cluster gravity center of the cluster in the current iteration based on a cluster assignment set corresponding to the cluster and a preset DTW gravity center average algorithm; S225, determining a new cluster gravity center set of the current iteration based on the new cluster gravity center corresponding to each cluster, and taking the new cluster gravity center set of the current iteration as a cluster gravity center set of the next iteration, performing S222 to S224 until an external convergence condition is met, obtaining a clustering result, the external convergence condition being that a clustering result of all time series samples in the current iteration is within a set difference range of a clustering result of a last iteration of the current iteration, or a number of iterations of the current iteration reaches a set iteration number threshold.

4. A wave energy power production forecasting method according to claim 3, characterised in that, The determining of the new cluster gravity center of the cluster in the current iteration based on the cluster assignment set corresponding to the cluster and the preset DTW gravity center average algorithm comprises: S2241, randomly selecting a time series sample in the cluster assignment set corresponding to the cluster as an initial value of the cluster gravity center; S2242, calculating an optimal warping path of a value of each time series sample in the cluster assignment set of the current sub-iteration and the cluster gravity center of the current sub-iteration based on the preset dynamic time warping algorithm; S2243, for each time point of the cluster gravity center of the current sub-iteration, determining all intra-cluster sample data points aligned with the time point in the optimal warping path based on the optimal warping path of all time series samples in the cluster assignment set corresponding to the cluster, and forming a data point set corresponding to the time point; S2244, calculating an average value of all data points in each data point set corresponding to each time point respectively; S2245, determining a new gravity center sequence of the cluster of the current sub-iteration based on the average value of all data points in each data point set corresponding to each time point; S2246, determining whether the new gravity center sequence of the cluster of the current sub-iteration meets a sub-convergence condition; S2247, if yes, taking the new gravity center sequence meeting the sub-convergence condition as the new cluster gravity center of the cluster in the current iteration; S2248, if no, taking the new gravity center sequence as a value of the cluster gravity center of the next sub-iteration, and performing S2242 to S2246 until the new gravity center sequence meeting the sub-convergence condition is obtained as the new cluster gravity center of the cluster in the current iteration; The determining of whether the new gravity center sequence of the cluster of the current sub-iteration meets the sub-convergence condition comprises: determining whether a difference between the new gravity center sequence and the value of the cluster gravity center is not greater than a preset gravity center threshold, or determining whether a number of iterations of the current sub-iteration reaches a preset maximum internal iteration number; if the difference between the new gravity center sequence and the value of the cluster gravity center is not greater than the preset gravity center threshold, or the number of iterations of the current sub-iteration reaches the preset maximum internal iteration number, it is determined that the sub-convergence condition is met, otherwise it is determined that the sub-convergence condition is not met.

5. A wave energy power production forecasting method according to claim 1, characterized in that, The determining of the target data set based on the clustering result and the preset conditional generative adversarial network comprises: determining a cluster with insufficient sample quantity based on the clustering result; constructing a multi-dimensional condition vector of the cluster with insufficient sample quantity for any cluster with insufficient sample quantity; For any sample insufficient cluster, based on the cluster allocation result corresponding to the cluster and the multi-dimensional condition vector, an initial C-TimeGAN model is trained to obtain a trained C-TimeGAN model; the trained C-TimeGAN model is a conditional generative adversarial network based on a TimeGAN framework; For any sample insufficient cluster, based on the multi-dimensional condition vector, the sample quantity and the maximum sample quantity of the cluster, a synthesized sample set is generated by using the trained C-TimeGAN model; For any sample insufficient cluster, the Euclidean distance between each sample in the synthesized sample set and the gravity center of the corresponding cluster is calculated, and the samples in the synthesized sample set are screened based on the Euclidean distances to obtain a screened synthesized sample set; For any sample insufficient cluster, the original samples corresponding to the cluster are merged with the screened synthesized sample set to obtain an enhanced sample set corresponding to the cluster, and the enhanced sample set is taken as the target sample set of the cluster; For any sample sufficient cluster, the cluster allocation result corresponding to the sample sufficient cluster is taken as the target sample set of the cluster; Based on the target sample set of each cluster, a target data set is determined.

6. A wave energy power production forecasting method according to claim 5, characterised in that, The construction of the multi-dimensional condition vector of the cluster comprises: Based on the cluster allocation result corresponding to the cluster, a cluster gravity center feature is extracted, and the cluster gravity center feature is flattened according to a set dimension to obtain a high-dimensional cluster gravity center feature vector, the cluster gravity center feature representing the change mode of the plurality of target meteorological features at a set time; Based on the cluster gravity center feature and a preset statistical feature calculation formula, a mean vector and a standard deviation vector of all samples in the cluster on each target meteorological feature dimension are calculated, and the mean vector and the standard deviation vector are spliced into a statistical feature vector; The high-dimensional cluster gravity center feature vector and the statistical feature vector are compressed and fused by an encoding network to obtain an original condition vector; The original condition vector is compressed and mapped by an encoding network to obtain a multi-dimensional condition vector, and the multi-dimensional condition vector is a 32-dimensional condition vector.

7. A wave energy power production forecasting method according to claim 5, characterised in that, The training of the C-TimeGAN model based on the cluster allocation result corresponding to the cluster and the multi-dimensional condition vector comprises: S331, based on a TimeGAN framework and an LSTM formula, an initial C-TimeGAN is constructed, and the initial C-TimeGAN comprises an embedding network, a recovery network, a conditional generation network and a discriminator network; S332, a loss function is constructed, and the loss function comprises a reconstruction loss, an unsupervised adversarial loss, a supervised step loss and an Euclidean distance constraint loss, wherein the reconstruction loss is used to ensure the reversibility of the embedding-recovery process, the unsupervised adversarial loss is used to train the discriminator to distinguish between real sequences and generated sequences, the supervised step loss is used to ensure that the generator learns a real time series transfer dynamic, and the Euclidean distance constraint loss is used to ensure that the generated sequence maintains a reasonable distance from the cluster gravity center; S333, based on the cluster assignment result corresponding to the cluster and the multi-dimensional condition vector, training the embedding network and the restoration network with the objective of minimizing the reconstruction loss, fixing the parameters of the condition generation network and the discriminator network, to obtain the pre-trained embedding network and the restoration network; S334, based on the cluster assignment result corresponding to the cluster and the multi-dimensional condition vector, updating the parameters of the discriminator network with the objective of maximizing the unsupervised adversarial loss; S335, based on the cluster assignment result corresponding to the cluster and the multi-dimensional condition vector, updating the parameters of the embedding network and the restoration network with the objective of minimizing the weighted sum of the reconstruction loss and the supervised step loss; S336, based on the cluster assignment result corresponding to the cluster and the multi-dimensional condition vector, updating the parameters of the condition generation network with the objective of minimizing the weighted sum of the unsupervised adversarial loss, the supervised step loss and the Euclidean distance constraint loss, and executing S334 to S336 until the training stopping condition is met, to obtain the trained C-TimeGAN model.

8. A wave energy power production forecasting method according to claim 5, characterised in that, For any cluster with insufficient sample quantity, based on the multi-dimensional condition vector, the sample quantity and the maximum sample quantity of the cluster, a synthesized sample set is generated using the trained C-TimeGAN model, including: S341, based on the preset sample balancing strategy and the sample quantity of each cluster, determining the maximum sample quantity of each cluster; S342, for any cluster with insufficient sample quantity, sampling a random noise sequence of a set time step, the random noise following a multi-dimensional Gaussian distribution; S343, for any cluster with insufficient sample quantity, inputting the multi-dimensional condition vector of the cluster and the random noise sequence into the generator of the trained C-TimeGAN model to generate a latent representation sequence; S344, for any cluster with insufficient sample quantity, inputting the latent representation sequence into the restoration network of the C-TimeGAN model to obtain a generated synthesized time series sample, and executing S342 to S344 until a set number of times, to obtain a plurality of synthesized time series samples; S345, based on all synthesized time series samples, determining the synthesized sample set corresponding to the cluster.

9. A wave energy power production forecasting method according to claim 1, characterized in that, Based on the target sample set corresponding to the cluster and the preset improved dynamic optimization algorithm, the pre-constructed bidirectional long short-term memory neural network is trained and optimized to obtain the wave energy prediction model corresponding to the cluster, including: Based on the target sample set corresponding to each cluster, a bidirectional long short-term memory neural network is constructed for each cluster; For each cluster, the target sample set corresponding to the cluster is divided into a training set, a validation set and a test set; For each cluster, the number of hidden units, the learning rate, the Dropout dropout probability and the training batch size of the bidirectional long short-term memory neural network of the cluster are defined as the hyperparameter vector to be optimized, and the prediction error of the bidirectional long short-term memory neural network on the validation set is used as the fitness function; For each cluster, based on the training set, the validation set, the hyperparameter vector to be optimized and the fitness function corresponding to the cluster, an optimal solution is searched in the hyperparameter space using the improved dynamic optimization algorithm to obtain the optimal hyperparameter configuration. For each cluster, based on the optimal hyperparameter configuration, a bidirectional long short-term memory neural network model is trained on the training set of the cluster, and the performance of the trained bidirectional long short-term memory neural network model is evaluated on the test set to obtain the wave energy prediction model corresponding to the cluster.

10. A wave energy power production forecasting method according to claim 11, characterised in that, The optimal hyperparameter configuration is obtained by searching for the optimal solution in the hyperparameter space using an improved dynamic optimization algorithm based on the training set, validation set, hyperparameter vector to be optimized, and fitness function corresponding to the cluster, including: S441, Based on the search space of the hyperparameter vector to be optimized, the population size and the maximum number of iterations are set, the population of the improved dynamic optimization algorithm is initialized, the population includes multiple individuals, and each individual represents a set of hyperparameter vector schemes; S442, calculate the exploration probability of each individual in the population in the current iteration according to the cosine decay formula, and generate random numbers; S443, Based on the exploration probability and the random number, determine the position update strategy for each individual in the population during the current iteration to execute the exploration phase or the utilization phase; S444, for each individual, if it is determined that the individual in the current iteration is in the exploration phase, then the position of the individual is updated according to the hierarchical position update strategy; S445, for each individual, if it is determined that the individual in the current iteration is in the exploitation phase, then the position of the individual is updated according to the elite-guided enhanced exploitation strategy; S446, Based on the position of each individual, obtain the updated population; S447, For each individual in the updated population, configure a bidirectional long short-term memory neural network based on the hyperparameter vector scheme corresponding to the individual, train the configured bidirectional long short-term memory neural network based on the training set corresponding to the cluster, and calculate the prediction error of the trained network based on the validation set corresponding to the cluster. S448: Based on the fitness function and the prediction error of each individual in the updated population, evaluate the fitness of each individual in the updated population, update the global optimal solution and the elite memory pool, and execute S442 to S448 until the number of iterations reaches the maximum number of iterations or the number of consecutive times the global optimal solution has no improvement reaches a preset threshold. The hyperparameter vector scheme corresponding to the global optimal solution in the current iteration cycle is taken as the optimal hyperparameter configuration.