Short-term photovoltaic power prediction method, device, storage medium and electronic device
Through the combination of target mode decomposition algorithm and deep learning model, the problem of low accuracy and efficiency of photovoltaic power prediction is solved, accurate prediction of various weather conditions is achieved, and the stability and prediction effect of the model are improved.
Patent Information
- Application Number
- CN202411076847.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-08-07
AI Technical Summary
Photovoltaic power prediction in the existing technology has low accuracy and efficiency, and cannot effectively capture changes in meteorological conditions and handle nonlinear characteristics, resulting in poor model stability and reliability.
The target modal decomposition algorithm is used to decompose the photovoltaic data signal to obtain the modal components, which are input into the target deep learning model for prediction, and the sum of the modal prediction sequences is calculated to obtain the photovoltaic power prediction data.
It improves the accuracy and efficiency of photovoltaic power prediction, can better handle photovoltaic power changes under various weather conditions, and enhances the stability and reliability of the model.
Smart Images

Figure CN118611058B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of short-term photovoltaic power prediction or other related fields, and specifically, to a short-term photovoltaic power prediction method, device, storage medium and electronic device. Background Art
[0002] Accurate short-term photovoltaic power generation prediction can effectively alleviate the pressure caused by photovoltaic grid connection on the power system. However, photovoltaic power generation is affected by many factors, such as solar radiation, meteorological conditions, etc., showing obvious volatility and uncertainty, making the prediction of photovoltaic power generation difficult, which poses a challenge to the stable operation of the power grid and the rational allocation of power resources. Therefore, it is urgent to propose an accurate prediction model, which is of great significance to ensure the stable operation of the power grid and the rational allocation of resources.
[0003] In order to solve this problem, various prediction methods have been proposed. At present, they can be roughly divided into physical models, statistical models and machine learning models. Among them, the physical model refers to a model based on the working principle of the photovoltaic power generation system, such as using the sun position, radiation model, etc. to predict the power generation; the statistical model refers to a prediction model established by using historical data for analysis and statistical methods, such as time series analysis model (AutoRegressive Integrated Moving Average: ARIMA), gray prediction model, etc.; the machine learning model refers to a data-driven method that predicts photovoltaic power generation by learning a large amount of historical data, such as neural networks, support vector machines, etc. However, among the above models, the physical model is usually more complex and requires detailed meteorological data and solar radiation data, which will lead to high model construction and calculation costs, and cannot accurately capture all changes in meteorological conditions that affect photovoltaic power generation, such as cloud cover and scattering; the statistical model is based on linear relationship assumptions, and cannot handle the nonlinear characteristics of photovoltaic power generation well. It also needs to be recalibrated due to changes in the external environment, which affects the stability and reliability of the model; the machine learning model usually requires a large amount of historical data for training. If the data is not comprehensive or noisy, the prediction effect of the model is not good.
[0004] There are problems of low prediction accuracy and low prediction efficiency when predicting photovoltaic power in related technologies, and no effective solution has been proposed yet. Summary of the invention
[0005] The main purpose of the present application is to provide a short-term photovoltaic power prediction method, device, storage medium and electronic device to solve the problems of low prediction accuracy and low prediction efficiency when predicting photovoltaic power in related technologies.
[0006] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for predicting short-term photovoltaic power is provided. The method comprises: obtaining M groups of photovoltaic data of M weather conditions within a preset time period, wherein each group of photovoltaic data comprises photovoltaic power data and weather data of a preset time period, and M is a positive integer; performing signal decomposition on the M groups of photovoltaic data using a target modal decomposition algorithm to obtain M groups of modal components, wherein the target modal decomposition algorithm is obtained by optimizing a preset modal decomposition algorithm based on historical photovoltaic data of a historical time period by a target optimization algorithm; inputting the M groups of modal components into a target deep learning model, outputting M groups of modal prediction sequences, calculating the sum of the data in each group of modal prediction sequences, and obtaining photovoltaic power prediction data of M weather conditions.
[0007] Furthermore, the target modal decomposition algorithm is obtained in the following manner: preprocessing the historical photovoltaic data to obtain the historical photovoltaic power sequence; the preset modal decomposition algorithm uses the sample entropy algorithm to calculate the historical photovoltaic power sequence to obtain the initial fitness value and the initial position data; obtaining the initial iteration data, and when the initial iteration data is less than or equal to the preset iteration threshold, the target optimization algorithm iteratively updates the initial fitness value and the initial position data until the initial iteration data is greater than the preset iteration threshold, and obtains the target fitness value and the target position data; when the target fitness value and the target position data meet the iteration termination condition, the target decomposition layer number and the target penalty factor are obtained, and the target modal decomposition algorithm is constructed according to the target decomposition layer number and the target penalty factor, wherein the target decomposition layer number and the target penalty factor refer to the algorithm parameters in the modal decomposition algorithm when the target fitness value and the target position data are calculated.
[0008] Furthermore, the target modal decomposition algorithm is used to perform signal decomposition on M groups of photovoltaic data to obtain M groups of modal components, including: performing sequence conversion on the M groups of photovoltaic data to obtain M groups of photovoltaic data sequences; obtaining white Gaussian noise parameters, and performing noise processing on the M groups of photovoltaic data sequences using the white Gaussian noise parameters to obtain M groups of processed photovoltaic data sequences; obtaining a first operator and a second operator, and processing each group of processed photovoltaic data sequences using the first operator and the second operator to obtain M groups of modal components.
[0009] Furthermore, using the first operator and the second operator to process each group of processed photovoltaic data sequences to obtain M groups of modal components includes: using the first operator to calculate each group of processed photovoltaic data sequences to obtain M groups of first local mean decomposition sequences; using the second operator to calculate each group of first local mean decomposition sequences to obtain M groups of first residual components; calculating the difference between each group of processed photovoltaic data sequences and each group of first residual components to obtain M groups of first modal components; and determining M groups of modal components using the M groups of first residual components and the M groups of first modal components.
[0010] Further, determining M groups of modal components using M groups of first residual components and M groups of first modal components includes: obtaining a preset order, calculating the mean of M groups of first local mean decomposition sequences, and obtaining M groups of second local mean decomposition sequences; calculating each group of second local mean decomposition sequences using a second operator to obtain M groups of second residual components; calculating the difference between each group of processed photovoltaic data sequences and each group of second residual components to obtain M groups of second modal components, until M groups of preset-order residual components and M groups of preset-order modal components associated with the preset order are obtained; combining all groups of residual components to obtain M groups of target residual components, combining all groups of modal components to obtain M groups of target modal components, and combining each group of target residual components and each group of target modal components to obtain M groups of modal components.
[0011] Furthermore, M groups of modal components are input into the target deep learning model, and M groups of modal prediction sequences are output, including: normalizing each group of modal components to obtain M groups of processed modal components; performing sequence conversion on each group of processed modal components to obtain M groups of target sequences, and inputting the M groups of target sequences into the target deep learning model.
[0012] Furthermore, the target deep learning model is trained in the following manner: dividing the historical photovoltaic data to obtain first historical photovoltaic data and second historical photovoltaic data, preprocessing the first historical photovoltaic data and the second historical photovoltaic data to obtain first historical photovoltaic power sequence and second historical photovoltaic power sequence; inputting the first historical photovoltaic power sequence into a preset deep learning model, outputting a preset photovoltaic power sequence, calculating the mean square error between the preset photovoltaic power sequence and the second historical photovoltaic power sequence, and obtaining a power error; when the power error is greater than or equal to an error threshold, adjusting the model parameters of the preset deep learning model until the power error of the adjusted deep learning model is less than the error threshold, and determining the adjusted deep learning model as the target deep learning model.
[0013] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a short-term photovoltaic power prediction device is provided. The device includes: an acquisition unit, which is used to acquire M groups of photovoltaic data of M weather conditions within a preset time period, wherein each group of photovoltaic data includes photovoltaic power data and weather data of a preset time period, and M is a positive integer; a decomposition unit, which is used to perform signal decomposition on the M groups of photovoltaic data using a target modal decomposition algorithm to obtain M groups of modal components, wherein the target modal decomposition algorithm is obtained by optimizing a preset modal decomposition algorithm based on historical photovoltaic data of a historical time period by a target optimization algorithm; an input unit, which is used to input the M groups of modal components into a target deep learning model, output M groups of modal prediction sequences, calculate the sum of the data in each group of modal prediction sequences, and obtain photovoltaic power prediction data of M weather conditions.
[0014] According to another aspect of an embodiment of the present invention, a computer storage medium is provided. The computer storage medium is used to store a program. When the program is executed, the device where the computer storage medium is located is controlled to execute a short-term photovoltaic power prediction method.
[0015] According to another aspect of an embodiment of the present invention, an electronic device is provided, comprising one or more processors and a memory; the memory stores computer-readable instructions, and the processor is used to execute the computer-readable instructions, wherein a short-term photovoltaic power prediction method is executed when the computer-readable instructions are executed.
[0016] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program. When the computer program is executed by a processor, a method for predicting short-term photovoltaic power is performed.
[0017] Through the present application, the following steps are adopted: obtaining M groups of photovoltaic data of M weather conditions within a preset time period, wherein each group of photovoltaic data includes photovoltaic power data and weather data of a preset time period, and M is a positive integer; performing signal decomposition on the M groups of photovoltaic data using a target modal decomposition algorithm to obtain M groups of modal components, wherein the target modal decomposition algorithm is obtained by optimizing a preset modal decomposition algorithm based on historical photovoltaic data of a historical time period by a target optimization algorithm; inputting the M groups of modal components into a target deep learning model, outputting M groups of modal prediction sequences, calculating the sum of the data in each group of modal prediction sequences, and obtaining photovoltaic power prediction data of M weather conditions, thereby solving the problem of low prediction accuracy and low prediction efficiency when predicting photovoltaic power in the related art, by obtaining photovoltaic data of multiple weather conditions within a preset time period, performing signal decomposition on the photovoltaic data using a target modal decomposition algorithm to obtain modal components, inputting all modal components into a target deep learning model, outputting multiple groups of modal prediction sequences, calculating the sum of the data in each group of modal prediction sequences, and obtaining photovoltaic power prediction data of the above-mentioned multiple weather conditions, thereby achieving the effect of improving the accuracy and efficiency of predicting photovoltaic power data. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0019] Figure 1 is a flow chart of a method for predicting short-term photovoltaic power according to an embodiment of the present application;
[0020] Figure 2 is a schematic diagram of the decomposition of modal components of sunny day photovoltaic data provided according to an embodiment of the present application;
[0021] Figure 3is a schematic diagram of the decomposition of modal components of cloudy photovoltaic data provided according to an embodiment of the present application;
[0022] Figure 4 is a schematic diagram of the decomposition of modal components of rainy day photovoltaic data provided according to an embodiment of the present application;
[0023] Figure 5 It is a sunny day photovoltaic power prediction curve diagram provided according to an embodiment of the present application;
[0024] Figure 6 It is a cloudy photovoltaic power prediction curve diagram provided according to an embodiment of the present application;
[0025] Figure 7 It is a rainy day photovoltaic power prediction curve diagram provided according to an embodiment of the present application;
[0026] Figure 8 is a schematic diagram of the structure of a target deep learning model provided according to an embodiment of the present application;
[0027] Fig. 9 is a schematic diagram of an optional short-term photovoltaic power prediction method provided according to an embodiment of the present application;
[0028] Fig.10 is a schematic diagram of a short-term photovoltaic power prediction device provided according to an embodiment of the present application;
[0029] Fig.11 is a schematic diagram of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0030] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0031] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. For example, an interface is set up between this system and the relevant users or organizations. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.
[0034] It should be noted that the collected information used in this application is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse to use it.
[0035] The present invention is described below in conjunction with preferred implementation steps. Figure 1 is a flow chart of a method for predicting short-term photovoltaic power according to an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:
[0036] Step S101, obtaining M groups of photovoltaic data of M weather conditions within a preset time period, wherein each group of photovoltaic data includes photovoltaic power data and weather data of a preset time period, and M is a positive integer.
[0037] Specifically, the preset time period can be the past year. In order to accurately predict the photovoltaic power generation, we can first collect photovoltaic data under various weather conditions in the past year. For example, we can collect photovoltaic data from 8 am to 5 pm every day in the past year. After data cleaning, we can obtain a set of photovoltaic data for 104 sunny days, a set of photovoltaic data for 119 cloudy days, and a set of photovoltaic data for 74 rainy days. It should be noted that photovoltaic data may include photovoltaic power data and weather data. The photovoltaic power data is recorded in real time by the inverter or other monitoring equipment of the photovoltaic system. The weather data can be obtained from the meteorological station, including but not limited to temperature, humidity, wind speed, wind direction, sunshine time, cloud cover and precipitation.
[0038] Step S102, using a target modal decomposition algorithm to perform signal decomposition on M groups of photovoltaic data to obtain M groups of modal components, wherein the target modal decomposition algorithm is obtained by optimizing a preset modal decomposition algorithm based on historical photovoltaic data in a historical time period by a target optimization algorithm.
[0039] Specifically, after obtaining photovoltaic data of various weather conditions, the target mode decomposition algorithm obtained by optimizing the target optimization algorithm can be used to perform signal decomposition processing on each set of photovoltaic data, and then obtain the corresponding modal components, and the modal classification corresponds to frequency information. It should be noted that the target mode decomposition algorithm (Variate Mode Decomposition, ICEEMDAN) is a signal decomposition algorithm that can solve the decomposition problem of nonlinear and non-stationary signals, and extract the local frequency and amplitude information of the signal, decompose the complex time domain signal into multiple intrinsic mode functions (that is, decompose into modal components), that is, the target mode decomposition algorithm can regard the signal as a linear combination of multiple intrinsic mode functions, each modal component has different frequency modulation and amplitude modulation characteristics, and a series of modal components of the signal can be obtained by iteratively optimizing the signal modal component by modal component, and each component corresponds to a local vibration structure within a certain frequency range.
[0040] In addition, the target optimization algorithm can be a dung beetle optimization algorithm, and the optimization problem of the algorithm is solved by simulating its foraging behavior. In order to improve the generalization ability of the above-mentioned target modal decomposition algorithm and reduce the risk of overfitting, the dung beetle optimization algorithm can be used to optimize the decomposition layer number and penalty factor of the target modal decomposition algorithm. It should be noted that since the traditional dung beetle optimization (Dung Beetle Optimization: DBO) algorithm uses a random number generation method to initialize the population position in the population initialization stage, the positions of dung beetles in the population are uneven, and it is impossible to traverse all positions in the environment, resulting in poor optimization effect and low convergence speed. In this regard, the Chebyshev chaotic map is introduced in the population initialization stage, and the Chebyshev chaotic map is used to initialize the population. In this way, the above problem is solved, and the IDBO algorithm in this embodiment is obtained.
[0041] For example, when the acquired photovoltaic data are sunny photovoltaic data, cloudy photovoltaic data, and rainy photovoltaic data, three groups of modal components can be obtained after the target modal decomposition algorithm is used to decompose the above photovoltaic data. Figure 2 is a schematic diagram of the decomposition of modal components of sunny day photovoltaic data provided by an embodiment of the present application, such as Figure 2 As shown in the figure, the first row refers to the original sunny day photovoltaic data (that is, the original signal), imf1-imf4 are the fourth-order modal components obtained after the target modal decomposition algorithm decomposes the photovoltaic data, and imf5 is the residual component obtained after the target modal decomposition algorithm decomposes the photovoltaic data. All modal components and residual components are combined to obtain a set of modal components on a sunny day.
[0042] Figure 3 is a schematic diagram of the decomposition of modal components of cloudy photovoltaic data provided by an embodiment of the present application, such as Figure 3 As shown in the figure, the first row refers to the original cloudy photovoltaic data (that is, the original signal), imf1-imf4 are the fourth-order modal components obtained after the target modal decomposition algorithm decomposes the photovoltaic data, and imf5 is the residual component obtained after the target modal decomposition algorithm decomposes the photovoltaic data. All modal components and residual components are combined to obtain a set of modal components for cloudy days.
[0043] Figure 4 is a schematic diagram of the decomposition of the modal components of the rainy day photovoltaic data provided by the embodiment of the present application, such as Figure 4As shown in the figure, the first row refers to the original rainy day photovoltaic data (that is, the original signal), imf1-imf4 are the fourth-order modal components obtained after the target modal decomposition algorithm decomposes the photovoltaic data, and imf5 is the residual component obtained after the target modal decomposition algorithm decomposes the photovoltaic data. All modal components and residual components are combined to obtain a set of modal components for rainy days.
[0044] Step S103: input M groups of modal components into the target deep learning model, output M groups of modal prediction sequences, calculate the sum of the data in each group of modal prediction sequences, and obtain photovoltaic power prediction data for M weather conditions.
[0045] Specifically, after the target modal decomposition algorithm decomposes multiple groups of modal components, the modal components can be input into the target deep learning model composed of the Transformer algorithm, and the model can be used to perform power prediction on each modal component to obtain the prediction result, that is, the modal prediction sequence, and then the predicted modal prediction sequences are added to obtain the photovoltaic power prediction data corresponding to each weather condition.
[0046] It should be noted that in order to evaluate the prediction performance of the IDBO-ICEEMDAN-Transformer algorithm provided in the embodiment of the present application, firstly, a long short-term memory network (LSTM) model, a Transformer model, an ICEEMDAN-Transformer model, and a hybrid model constructed by the IDBO-ICEEMDAN-Transformer algorithm in the present application can be obtained, and then three sets of photovoltaic data, namely, photovoltaic data on sunny days, cloudy days, and rainy days, are respectively input into the above models for verification, thereby obtaining three sets of predicted photovoltaic power. Figure 5 The photovoltaic power prediction curve diagram on a sunny day provided in the embodiment of the present application is Figure 6 The cloudy photovoltaic power prediction curve diagram provided in the embodiment of the present application is Figure 7 is a rainy day photovoltaic power prediction curve diagram provided according to an embodiment of the present application, such as Figure 5 , 6 As shown in Figures 7 and 7, the predicted power of the hybrid model constructed in the present application at different times in sunny, cloudy and rainy days is higher than that of the long short-term memory network model, the Transformer model and the ICEEMDAN-Transformer model, indicating that the hybrid model constructed in the present application has good prediction performance.
[0047] The short-term photovoltaic power prediction method provided by the embodiment of the present application obtains M groups of photovoltaic data of M weather conditions within a preset time period, wherein each group of photovoltaic data includes photovoltaic power data and weather data of a preset time period, and M is a positive integer; uses a target modal decomposition algorithm to perform signal decomposition on the M groups of photovoltaic data to obtain M groups of modal components, wherein the target modal decomposition algorithm is obtained by optimizing a preset modal decomposition algorithm based on historical photovoltaic data of a historical time period by a target optimization algorithm; inputs the M groups of modal components into a target deep learning model, outputs M groups of modal prediction sequences, calculates the sum of data in each group of modal prediction sequences, and obtains photovoltaic power prediction data of M weather conditions, thereby solving the problem of low prediction accuracy and low prediction efficiency when predicting photovoltaic power in the related art, obtains photovoltaic data of multiple weather conditions within a preset time period, uses a target modal decomposition algorithm to perform signal decomposition on the photovoltaic data, obtains modal components, inputs all modal components into a target deep learning model, outputs multiple groups of modal prediction sequences, calculates the sum of data in each group of modal prediction sequences, and obtains photovoltaic power prediction data of the above-mentioned multiple weather conditions, thereby achieving the effect of improving the accuracy and efficiency of predicting photovoltaic power data.
[0048] In order to decompose and process the photovoltaic data, it is necessary to optimize the modal decomposition algorithm using a target optimization algorithm. Optionally, in the short-term photovoltaic power prediction method provided in the embodiment of the present application, the target modal decomposition algorithm is obtained in the following manner: preprocessing the historical photovoltaic data to obtain a historical photovoltaic power sequence; the preset modal decomposition algorithm uses a sample entropy algorithm to calculate the historical photovoltaic power sequence to obtain an initial fitness value and initial position data; obtaining initial iteration data, and when the initial iteration data is less than or equal to a preset iteration threshold, the target optimization algorithm iteratively updates the initial fitness value and the initial position data until the initial iteration data is greater than the preset iteration threshold, and obtains the target fitness value and the target position data; when the target fitness value and the target position data meet the iteration termination condition, the target decomposition layer number and the target penalty factor are obtained, and the target modal decomposition algorithm is constructed according to the target decomposition layer number and the target penalty factor, wherein the target decomposition layer number and the target penalty factor refer to the algorithm parameters in the modal decomposition algorithm when the target fitness value and the target position data are calculated.
[0049] Specifically, when the target modal decomposition algorithm is optimized by the target optimization algorithm, in order to improve the optimization efficiency, the target optimization algorithm can be subjected to population initialization processing of Chebyshev chaos mapping, and then improved by using the golden sine strategy and dynamic weight strategy. Then the historical photovoltaic power data can be collected, and after data cleaning, removal of outliers and missing values, standardization and normalization of the historical photovoltaic power data, a standard photovoltaic power generation sequence is obtained, that is, a historical photovoltaic power sequence is obtained, and then the preset modal decomposition algorithm is initialized to obtain an initial population N, in which each individual represents a solution space of the ICEEMDAN parameters, and the number of iterations is set. And the upper and lower bounds It should be noted that when initializing the dung beetle population, a group of initial dung beetle individuals can be generated as the population, and the decomposition levels and penalty factors of these individuals are randomly selected or predefined.
[0050] Furthermore, the sample entropy algorithm is used to calculate the historical photovoltaic power sequence to obtain the initial fitness value, and then the position of the dung beetle individual is updated according to the initial fitness value of each individual in the population, that is, the initial position data is obtained. The sample entropy calculation formula is:
[0051] ;
[0052] Where m represents the embedding dimension; r represents the effective threshold; and It represents the probability of two sequences matching m and m+1 points under similar tolerance.
[0053] Furthermore, the initial iteration data is obtained. When the initial iteration data is less than or equal to the preset iteration threshold, and when the random number rand is less than the random number threshold, the dung beetle formula under the rolling ball behavior in the target optimization algorithm is used to iteratively update the initial fitness value and initial position data; if the random number rand is greater than the random number threshold, the dung beetle formula under the dancing behavior in the target optimization algorithm is used to iteratively update the initial fitness value and initial position data, and then the sample entropy algorithm is used to calculate the fitness value and position data. Then the dung beetle population N is judged, and then the position of the rolling ball dung beetle, the position of the hatching ball, and the position of the stealing dung beetle are updated according to the population size, and the sample entropy algorithm is used to calculate the fitness value and position data until the initial iteration data is greater than the preset iteration threshold, and the global optimal fitness value and the optimal individual position are calculated and selected.
[0054] When the target fitness value and the target position data meet the iteration termination conditions, the optimal parameter combination is determined at the end of the loop iteration, that is, the target decomposition layer number and the target penalty factor when the target fitness value and the target position data are calculated are obtained, that is, the target decomposition layer number and the target penalty factor are used as parameter combinations to construct the target modal decomposition algorithm, and then the constructed target modal decomposition algorithm can be used to decompose the modal components, that is, the photovoltaic data of various weather conditions (such as photovoltaic data of sunny days, cloudy days and rainy days) are decomposed by the ICEEMDAN algorithm according to the optimized parameter combination to obtain the final modal components, mode spectrum and center frequency. This embodiment lays the foundation for the subsequent prediction of photovoltaic power by constructing the target modal decomposition algorithm.
[0055] The modal components can be obtained by processing a target modal decomposition algorithm using multiple operators and white Gaussian noise parameters. Optionally, in the short-term photovoltaic power prediction method provided in the embodiment of the present application, the target modal decomposition algorithm is used to perform signal decomposition on M groups of photovoltaic data to obtain M groups of modal components, including: performing sequence conversion on the M groups of photovoltaic data to obtain M groups of photovoltaic data sequences; obtaining white Gaussian noise parameters, and using the white Gaussian noise parameters to perform noise processing on the M groups of photovoltaic data sequences to obtain M groups of processed photovoltaic data sequences; obtaining a first operator and a second operator, and using the first operator and the second operator to process each group of processed photovoltaic data sequences to obtain M groups of modal components.
[0056] Specifically, the first operator can be the EMD (Empirical Mode Decomposition) decomposition algorithm. operator, the second operator can be used to generate the local mean of the signal in the EMD decomposition method. Operator, when using the optimized target modal decomposition algorithm to perform signal decomposition processing, the acquired photovoltaic data is then subjected to sequence conversion processing. After obtaining the photovoltaic data sequence, in order to improve the decomposition quality and optimize the decomposition process, the noise level added to the sequence can be adaptively adjusted. At this time, a white Gaussian noise parameter with a mean of 0 and unit variance can be introduced. , the photovoltaic data sequence is processed by adding noise using white Gaussian noise parameters to obtain the processed photovoltaic data sequence, and then the above operator is used to process each group of processed photovoltaic data sequences, so as to convert the original signal Each group of processed photovoltaic data sequences is decomposed into several modal components and a residual component, which can effectively solve the modal aliasing phenomenon in the empirical mode decomposition (EMD) algorithm (that is, the problem that signal components of different frequencies interfere with each other during the decomposition process), the residual noise that may exist in the ensemble empirical mode decomposition (EEMD) algorithm, and the pseudo-mode in the CEEMDAN (Comprehensive Learning-based Ensemble Empirical Mode Decomposition with Adaptive Noise) algorithm.
[0057] Each group of modal components includes multiple residual components and several modal components. Optionally, in the short-term photovoltaic power prediction method provided in the embodiment of the present application, each group of processed photovoltaic data sequences is processed using the first operator and the second operator to obtain M groups of modal components, including: using the first operator to calculate each group of processed photovoltaic data sequences to obtain M groups of first local mean decomposition sequences; using the second operator to calculate each group of first local mean decomposition sequences to obtain M groups of first residual components; calculating the difference between each group of processed photovoltaic data sequences and each group of first residual components to obtain M groups of first modal components; and determining M groups of modal components using M groups of first residual components and M groups of first modal components.
[0058] Specifically, using Operator and When the operator processes the above data sequence, it first uses the empirical mode decomposition algorithm and Operator constructs a local mean decomposition sequence (also known as the first local mean decomposition sequence) , get the first-order residual (that is, the first residual component) ,in, represents the processed photovoltaic data sequence, is the white Gaussian noise parameter, Used to remove residual noise in the initial stage, The first group of white noise The inverse of the expected signal-to-noise ratio between the analyzed signal, i represents the number of times noise is added, std represents the standard deviation, Indicates the overall average.
[0059] Further, the first modal component is calculated according to the first residual component : ,in, The processed photovoltaic data sequence is represented, and then the first residual component and the first modal component can be used to construct multi-order modal components, and then all the modal components are combined to obtain multiple groups of modal components. This embodiment adds noise, performs operator processing and extracts modal components on the processed photovoltaic data sequence, and finally realizes in-depth analysis of photovoltaic data, laying a foundation for subsequent prediction of photovoltaic power.
[0060] In order to determine the intrinsic dynamic characteristics of photovoltaic data, it is necessary to perform multiple iterative calculations on the first residual component and the first modal component. Optionally, in the short-term photovoltaic power prediction method provided in the embodiment of the present application, using M groups of first residual components and M groups of first modal components to determine M groups of modal components includes: obtaining a preset order, calculating the mean of M groups of first local mean decomposition sequences, and obtaining M groups of second local mean decomposition sequences; using a second operator to calculate each group of second local mean decomposition sequences to obtain M groups of second residual components; calculating the difference between each group of processed photovoltaic data sequences and each group of second residual components to obtain M groups of second modal components, until M groups of preset order residual components and M groups of preset order modal components associated with the preset order are obtained; combining all groups of residual components to obtain M groups of target residual components, combining all groups of modal components to obtain M groups of target modal components, and combining each group of target residual components and each group of target modal components to obtain M groups of modal components.
[0061] Specifically, when processing based on the first residual component and the first modal component, the preset order K can be obtained first, and then the first residual component is used when calculating the second-order residual and the second-order modal component (that is, the second residual component and the second modal component). Determine the local mean decomposition sequence , and then calculate the second residual component: , and then use the second residual component to calculate the second modal component: , and then use the above method to calculate the Kth residual component and the Kth modal component: , After all residual components and modal components are calculated, all groups of residual components are combined to obtain target residual components, all groups of modal components are combined to obtain target modal components, and each group of target residual components and each group of target modal components are combined to obtain the final modal components. This embodiment decomposes the modal components and then determines the intrinsic dynamic characteristics of photovoltaic data based on these modal components, which provides a basis for further analysis and optimization.
[0062] The modal prediction sequence is predicted by a deep learning model. Optionally, in the short-term photovoltaic power prediction method provided in an embodiment of the present application, M groups of modal components are input into a target deep learning model, and outputting M groups of modal prediction sequences includes: normalizing each group of modal components to obtain M groups of processed modal components; performing sequence conversion on each group of processed modal components to obtain M groups of target sequences, and inputting the M groups of target sequences into a target deep learning model.
[0063] Specifically, after obtaining the modal components, in order to use the target deep learning model to predict the photovoltaic power situation, the modal components can be normalized and sequence converted in turn to obtain multiple groups of target sequences representing time series. Finally, the multiple groups of target sequences can be input into the target deep learning model to output the modal prediction sequence.
[0064] In order to improve the prediction accuracy of the model, optionally, in the short-term photovoltaic power prediction method provided in the embodiment of the present application, the target deep learning model is trained in the following manner: historical photovoltaic data is divided to obtain first historical photovoltaic data and second historical photovoltaic data, the first historical photovoltaic data and the second historical photovoltaic data are preprocessed to obtain a first historical photovoltaic power sequence and a second historical photovoltaic power sequence; the first historical photovoltaic power sequence is input into a preset deep learning model, a preset photovoltaic power sequence is output, and the mean square error between the preset photovoltaic power sequence and the second historical photovoltaic power sequence is calculated to obtain a power error; when the power error is greater than or equal to an error threshold, the model parameters of the preset deep learning model are adjusted until the power error of the adjusted deep learning model is less than the error threshold, and the adjusted deep learning model is determined as the target deep learning model.
[0065] It should be noted that the target deep learning model can be a Transformer model. Figure 8 is a schematic diagram of the structure of the target deep learning model provided in the embodiment of the present application, such as Figure 8As shown in the figure, the Transformer model consists of multiple encoder layers and decoder layers, each of which contains a self-attention mechanism and a feedforward neural network. The encoder encodes the sequence input, and sequentially performs multi-head attention mechanism processing, residual regularization processing, feedforward layer processing, and residual regularization processing, and then inputs the processed data into the decoder. The decoder decodes the encoded representation into an output sequence, that is, sequentially performs masked multi-head attention mechanism processing, residual regularization processing, multi-head attention mechanism processing, feedforward layer processing, fully connected layer processing, and anti-normalization processing to obtain the predicted output (that is, the above-mentioned output sequence). It should be noted that in order to enable the model to capture global dependencies in the input sequence, a self-attention mechanism can be introduced. The self-attention mechanism is used to calculate the representation of each position in the input sequence, which can take into account the information of all other positions in the sequence, and can also avoid the limitations of fixed-size local receptive fields in traditional recurrent neural networks and convolutional neural networks:
[0066] ;
[0067] Where Q, K, and V represent the query, key, and value matrices, respectively. k is the dimension of the key.
[0068] The feedforward neural network formula is: ;in, , , and are the weights and biases of two linear transformations respectively, and ReLU stands for rectified linear unit.
[0069] Specifically, when using historical photovoltaic data for training, the historical photovoltaic data can be divided to obtain first historical photovoltaic data and second historical photovoltaic data, and then the first historical photovoltaic data and the second historical photovoltaic data are preprocessed to obtain a first historical photovoltaic power sequence and a second historical photovoltaic power sequence, wherein the first historical photovoltaic power sequence can be used as input photovoltaic data, and the second historical photovoltaic power sequence can be used as photovoltaic data for verification.
[0070] Further, the preset deep learning model is trained using the first historical photovoltaic data, that is, the first historical photovoltaic power sequence is input into the preset deep learning model, and after the preset photovoltaic power sequence is output, the model parameters are optimized using the difference between the preset photovoltaic power sequence and the second historical photovoltaic power sequence. The power error can be obtained by calculating the mean square error of the above sequence, and the model parameters are adjusted when the power error is greater than or equal to the error threshold. After multiple iterations, the power error of the adjusted deep learning model is less than the error threshold, and the target model is further verified to ensure its stability and accuracy in practical applications. The model is used as the target deep learning model, and finally the trained Transformer model can be used to predict future data. The known photovoltaic data can be used as input, and then the future time steps are gradually predicted, and all the prediction results are added up to obtain the prediction results of the entire photovoltaic data. This embodiment trains a deep learning model, and then the model realizes the prediction of photovoltaic power generation, which helps the power grid to better balance supply and demand and provide strong data support for the management and optimization of photovoltaic power generation systems.
[0071] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0072] The present application also provides a method for predicting short-term photovoltaic power. Fig. 9 is a schematic diagram of an optional short-term photovoltaic power prediction method provided according to an embodiment of the present application, such as Fig. 9 As shown, the method includes:
[0073] In order to accurately predict photovoltaic power generation, we can first collect photovoltaic power data under various weather conditions in the past year, preprocess the photovoltaic power data, and use Chebyshev chaotic mapping to initialize the population, thereby obtaining the dung beetle optimization algorithm.
[0074] Furthermore, the above-mentioned dung beetle optimization algorithm is used to optimize the decomposition layer number and penalty factor of the target mode decomposition algorithm (Variate Mode Decomposition, ICEEMDAN): first, the fitness value and position are calculated according to the sample entropy calculation formula, and the initial iteration data is obtained. When the initial iteration data is less than or equal to the preset iteration threshold, when the random number rand is less than the random number threshold, the dung beetle formula under the rolling behavior in the dung beetle optimization algorithm is used to iteratively update the initial fitness value and initial position data; if the random number rand is greater than the random number threshold, the dung beetle formula under the dancing behavior in the dung beetle optimization algorithm is used to iteratively update the initial fitness value and initial position data, and then the fitness value and position are calculated according to the sample entropy calculation formula. Further, the dung beetle population N is judged, and then the position of the rolling ball dung beetle, the position of the hatching ball, and the position of the stealing dung beetle are updated according to the population size, and then the fitness value and position are calculated according to the sample entropy calculation formula until the initial iteration data is greater than the preset iteration threshold, and the cycle iteration ends to determine the optimal parameter combination of ICEEMDAN.
[0075] Furthermore, the ICEEMDAN algorithm is constructed using the above optimal parameter combination, and the ICEEMDAN algorithm is used to perform signal decomposition on the photovoltaic power data to screen out the initial modal components (also known as IMF components) and residual components, and these initial modal components and residual components are added and reconstructed to obtain multiple modal components IMFk, which are input into the Transformer model, and the model is used to predict the power of each modal component to obtain the photovoltaic power prediction result, and then the predicted photovoltaic power prediction results are added and reconstructed to obtain the corresponding photovoltaic power final prediction result after sequence denormalization.
[0076] This embodiment obtains photovoltaic data of various weather conditions within a preset time period, uses a target modal decomposition algorithm to decompose the photovoltaic data signals to obtain modal components, inputs all modal components into a target deep learning model, outputs multiple groups of modal prediction sequences, calculates the sum of the data in each group of modal prediction sequences, and obtains photovoltaic power prediction data for the above-mentioned various weather conditions, thereby achieving the effect of improving the accuracy and efficiency of predicting photovoltaic power data.
[0077] The embodiment of the present application also provides a short-term photovoltaic power prediction device. It should be noted that the short-term photovoltaic power prediction device of the embodiment of the present application can be used to execute the short-term photovoltaic power prediction method provided by the embodiment of the present application. The short-term photovoltaic power prediction device provided by the embodiment of the present application is introduced below.
[0078] Fig.10 is a schematic diagram of a short-term photovoltaic power prediction device provided according to an embodiment of the present application, such as Fig.10 As shown, the device includes: an acquisition unit 10, a decomposition unit 20, and an input unit 30.
[0079] An acquisition unit 10 is used to acquire M groups of photovoltaic data of M weather conditions within a preset time period, wherein each group of photovoltaic data includes photovoltaic power data and weather data of a preset time period, and M is a positive integer;
[0080] A decomposition unit 20 is used to perform signal decomposition on M groups of photovoltaic data using a target modal decomposition algorithm to obtain M groups of modal components, wherein the target modal decomposition algorithm is obtained by optimizing a preset modal decomposition algorithm based on historical photovoltaic data of a historical time period by a target optimization algorithm;
[0081] The input unit 30 is used to input M groups of modal components into the target deep learning model, output M groups of modal prediction sequences, calculate the sum of the data in each group of modal prediction sequences, and obtain photovoltaic power prediction data under M weather conditions.
[0082] The short-term photovoltaic power prediction device provided in the embodiment of the present application obtains M groups of photovoltaic data of M weather conditions within a preset time period through an acquisition unit 10, wherein each group of photovoltaic data includes photovoltaic power data and weather data of a preset time period, and M is a positive integer; the decomposition unit 20 uses a target modal decomposition algorithm to perform signal decomposition on the M groups of photovoltaic data to obtain M groups of modal components, wherein the target modal decomposition algorithm is obtained by optimizing a preset modal decomposition algorithm based on historical photovoltaic data of a historical time period by a target optimization algorithm; the input unit 30 inputs the M groups of modal components into a target deep learning model, outputs M groups of modal prediction sequences, and calculates each group The sum of the data in the modal prediction sequence is used to obtain the photovoltaic power prediction data for M weather conditions, which solves the problems of low prediction accuracy and low prediction efficiency in the prediction of photovoltaic power in the related technology. By obtaining the photovoltaic data of various weather conditions within a preset time period, the photovoltaic data is decomposed into signals using the target modal decomposition algorithm to obtain modal components. All modal components are input into the target deep learning model, and multiple groups of modal prediction sequences are output. The sum of the data in each group of modal prediction sequences is calculated to obtain the photovoltaic power prediction data for the above-mentioned multiple weather conditions, thereby achieving the effect of improving the accuracy and efficiency of predicting photovoltaic power data.
[0083] Optionally, in the short-term photovoltaic power prediction device provided in the embodiment of the present application, the decomposition unit 20 includes: a target modal decomposition algorithm is obtained in the following manner: a first processing module, used to pre-process historical photovoltaic data to obtain a historical photovoltaic power sequence; a first calculation module, used to preset the modal decomposition algorithm to calculate the historical photovoltaic power sequence using a sample entropy algorithm to obtain an initial fitness value and initial position data; a first acquisition module, used to obtain initial iteration data, and when the initial iteration data is less than or equal to a preset iteration threshold, the target optimization algorithm iteratively updates the initial fitness value and initial position data until the initial iteration data is greater than the preset iteration threshold, and obtains the target fitness value and target position data; a second acquisition module, used to obtain the target decomposition layer number and target penalty factor when the target fitness value and target position data meet the iteration termination condition, and construct the target modal decomposition algorithm according to the target decomposition layer number and the target penalty factor, wherein the target decomposition layer number and the target penalty factor refer to the algorithm parameters in the modal decomposition algorithm when the target fitness value and the target position data are calculated.
[0084] Optionally, in the short-term photovoltaic power prediction device provided in the embodiment of the present application, the decomposition unit 20 includes: a conversion module, used to perform sequence conversion on M groups of photovoltaic data to obtain M groups of photovoltaic data sequences; a third acquisition module, used to obtain white Gaussian noise parameters, and use the white Gaussian noise parameters to perform noise processing on the M groups of photovoltaic data sequences to obtain M groups of processed photovoltaic data sequences; a fourth acquisition module, used to obtain the first operator and the second operator, and use the first operator and the second operator to process each group of processed photovoltaic data sequences to obtain M groups of modal components.
[0085] Optionally, in the short-term photovoltaic power prediction device provided in the embodiment of the present application, the decomposition unit 20 includes: a second calculation module, used to use the first operator to calculate each group of processed photovoltaic data sequences to obtain M groups of first local mean decomposition sequences; a third calculation module, used to use the second operator to calculate each group of first local mean decomposition sequences to obtain M groups of first residual components; a fourth calculation module, used to calculate the difference between each group of processed photovoltaic data sequences and each group of first residual components to obtain M groups of first modal components; a determination module, used to determine M groups of modal components using M groups of first residual components and M groups of first modal components.
[0086] Optionally, in the short-term photovoltaic power prediction device provided in the embodiment of the present application, the decomposition unit 20 includes: a fifth acquisition module, used to obtain a preset order, calculate the mean of M groups of first local mean decomposition sequences, and obtain M groups of second local mean decomposition sequences; a fifth calculation module, used to use the second operator to calculate each group of second local mean decomposition sequences to obtain M groups of second residual components; a sixth calculation module, used to calculate the difference between each group of processed photovoltaic data sequences and each group of second residual components, to obtain M groups of second modal components, until M groups of preset-order residual components and M groups of preset-order modal components associated with the preset order are obtained; a combination module, used to combine all groups of residual components to obtain M groups of target residual components, combine all groups of modal components to obtain M groups of target modal components, and combine each group of target residual components and each group of target modal components to obtain M groups of modal components.
[0087] Optionally, in the short-term photovoltaic power prediction device provided in the embodiment of the present application, the input unit 30 includes: a second processing module, used to normalize each group of modal components to obtain M groups of processed modal components; a third processing module, used to perform sequence conversion processing on each group of processed modal components to obtain M groups of target sequences, and input the M groups of target sequences into the target deep learning model.
[0088] Optionally, in the short-term photovoltaic power prediction device provided in the embodiment of the present application, the input unit 30 includes: the target deep learning model is trained in the following manner: a division module, used to divide the historical photovoltaic data to obtain the first historical photovoltaic data and the second historical photovoltaic data, pre-process the first historical photovoltaic data and the second historical photovoltaic data to obtain the first historical photovoltaic power sequence and the second historical photovoltaic power sequence; an input module, used to input the first historical photovoltaic power sequence into a preset deep learning model, output the preset photovoltaic power sequence, calculate the mean square error between the preset photovoltaic power sequence and the second historical photovoltaic power sequence, and obtain the power error; an adjustment module, used to adjust the model parameters of the preset deep learning model when the power error is greater than or equal to the error threshold, until the power error of the adjusted deep learning model is less than the error threshold, and determine the adjusted deep learning model as the target deep learning model.
[0089] The above-mentioned short-term photovoltaic power prediction device includes a processor and a memory. The above-mentioned acquisition unit 10, decomposition unit 20, input unit 30, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0090] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the problem of low prediction accuracy and low prediction efficiency in photovoltaic power prediction in related technologies can be solved by adjusting kernel parameters.
[0091] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0092] An embodiment of the present invention provides a computer storage medium, which is used to store a program. When the program is running, the device where the computer storage medium is located is controlled to execute a short-term photovoltaic power prediction method.
[0093] Fig.11 is a schematic diagram of an electronic device provided according to an embodiment of the present application, such as Fig.11 As shown, an embodiment of the present invention provides an electronic device, the electronic device 11 includes a processor, a memory, and a program stored in the memory and executable on the processor, the processor is used to execute computer-readable instructions, wherein the computer-readable instructions execute a short-term photovoltaic power prediction method when executed. The device in this article can be a server, a PC, a PAD, a mobile phone, etc.
[0094] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of a short-term photovoltaic power prediction method in each embodiment of the present application.
[0095] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0096] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0097] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0098] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0099] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0100] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0101] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0102] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0103] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A short-term photovoltaic power prediction method, It is characterized in that include: Acquire M groups of photovoltaic data of M weather conditions within a preset time period, wherein each group of photovoltaic data includes photovoltaic power data and weather data of the preset time period, and M is a positive integer; Using a target modal decomposition algorithm to perform signal decomposition on the M groups of photovoltaic data to obtain M groups of modal components, wherein the target modal decomposition algorithm is obtained by optimizing a preset modal decomposition algorithm based on historical photovoltaic data in a historical time period by a target optimization algorithm; The M groups of modal components are input into the target deep learning model, and M groups of modal prediction sequences are output. The sum of the data in each group of modal prediction sequences is calculated to obtain the photovoltaic power prediction data of the M weather conditions. The target deep learning model includes a self-attention mechanism, and the self-attention mechanism is expressed as , Q, K and V represent query, key and value matrices respectively, and dk is the dimension of the key; Wherein, the target modal decomposition algorithm is obtained in the following manner: preprocessing the historical photovoltaic data to obtain a historical photovoltaic power sequence; the preset modal decomposition algorithm uses a sample entropy algorithm to calculate the historical photovoltaic power sequence to obtain an initial fitness value and initial position data; obtaining initial iteration data, and when the initial iteration data is less than or equal to a preset iteration threshold, the target optimization algorithm iteratively updates the initial fitness value and the initial position data until the initial iteration data is greater than the preset iteration threshold, and obtains the target fitness value and target position data; when the target fitness value and the target position data meet the iteration termination condition, obtaining the target decomposition layer number and the target penalty factor, and constructing the target modal decomposition algorithm according to the target decomposition layer number and the target penalty factor, wherein the target decomposition layer number and the target penalty factor refer to the algorithm parameters in the modal decomposition algorithm when the target fitness value and the target position data are calculated; Using the target modal decomposition algorithm to perform signal decomposition on the M groups of photovoltaic data to obtain the M groups of modal components includes: performing sequence conversion on the M groups of photovoltaic data to obtain M groups of photovoltaic data sequences; obtaining white Gaussian noise parameters, and performing noise processing on the M groups of photovoltaic data sequences using the white Gaussian noise parameters to obtain M groups of processed photovoltaic data sequences; obtaining a first operator and a second operator, and processing each group of processed photovoltaic data sequences using the first operator and the second operator to obtain the M groups of modal components; Using the first operator and the second operator to process each group of processed photovoltaic data sequences to obtain the M groups of modal components includes: using the first operator to calculate each group of processed photovoltaic data sequences to obtain M groups of first local mean decomposition sequences; using the second operator to calculate each group of first local mean decomposition sequences to obtain M groups of first residual components; calculating the difference between each group of processed photovoltaic data sequences and each group of first residual components to obtain M groups of first modal components; and determining the M groups of modal components using the M groups of first residual components and the M groups of first modal components; Determining the M groups of modal components using the M groups of first residual components and the M groups of first modal components includes: obtaining a preset order, calculating the mean of the M groups of first local mean decomposition sequences, and obtaining M groups of second local mean decomposition sequences; using the second operator to calculate each group of second local mean decomposition sequences to obtain M groups of second residual components; calculating the difference between each group of processed photovoltaic data sequences and each group of second residual components to obtain M groups of second modal components, until M groups of preset-order residual components and M groups of preset-order modal components associated with the preset order are obtained; combining all groups of residual components to obtain M groups of target residual components, combining all groups of modal components to obtain M groups of target modal components, and combining each group of target residual components and each group of target modal components to obtain the M groups of modal components.
2. The method according to claim 1, It is characterized in that The M groups of modal components are input into the target deep learning model, and the output of the M groups of modal prediction sequences includes: Each group of modal components is normalized to obtain M groups of processed modal components; Perform sequence conversion processing on each group of processed modal components to obtain M groups of target sequences, and input the M groups of target sequences into the target deep learning model.
3. The method according to claim 1, It is characterized in that The target deep learning model is trained in the following way: Dividing the historical photovoltaic data to obtain first historical photovoltaic data and second historical photovoltaic data, and preprocessing the first historical photovoltaic data and the second historical photovoltaic data to obtain a first historical photovoltaic power sequence and a second historical photovoltaic power sequence; Inputting the first historical photovoltaic power sequence into a preset deep learning model, outputting a preset photovoltaic power sequence, calculating the mean square error between the preset photovoltaic power sequence and the second historical photovoltaic power sequence, and obtaining a power error; When the power error is greater than or equal to the error threshold, the model parameters of the preset deep learning model are adjusted until the power error of the adjusted deep learning model is less than the error threshold, and the adjusted deep learning model is determined as the target deep learning model.
4. A short-term photovoltaic power prediction device, It is characterized in that include: An acquisition unit, used to acquire M groups of photovoltaic data of M weather conditions within a preset time period, wherein each group of photovoltaic data includes photovoltaic power data and weather data of the preset time period, and M is a positive integer; A decomposition unit, configured to perform signal decomposition on the M groups of photovoltaic data using a target modal decomposition algorithm to obtain M groups of modal components, wherein the target modal decomposition algorithm is obtained by optimizing a preset modal decomposition algorithm based on historical photovoltaic data of a historical time period by a target optimization algorithm; An input unit is used to input the M groups of modal components into a target deep learning model, output M groups of modal prediction sequences, calculate the sum of the data in each group of modal prediction sequences, and obtain the photovoltaic power prediction data of the M weather conditions. The target deep learning model includes a self-attention mechanism, and the self-attention mechanism is expressed as , Q, K and V represent query, key and value matrices respectively, and dk is the dimension of the key; Wherein, the decomposition unit includes: the target modal decomposition algorithm is obtained in the following manner: a first processing module, used for preprocessing the historical photovoltaic data to obtain a historical photovoltaic power sequence; a first calculation module, used for the preset modal decomposition algorithm to calculate the historical photovoltaic power sequence using a sample entropy algorithm to obtain an initial fitness value and initial position data; a first acquisition module, used for obtaining initial iteration data, when the initial iteration data is less than or equal to a preset iteration threshold, the target optimization algorithm iteratively updates the initial fitness value and the initial position data until the initial iteration data is greater than the preset iteration threshold, and obtains the target fitness value and target position data; a second acquisition module, used for obtaining the target decomposition layer number and the target penalty factor when the target fitness value and the target position data meet the iteration termination condition, and constructing the target modal decomposition algorithm according to the target decomposition layer number and the target penalty factor, wherein the target decomposition layer number and the target penalty factor refer to the algorithm parameters in the modal decomposition algorithm when the target fitness value and the target position data are calculated; The decomposition unit includes: a conversion module, which is used to perform sequence conversion on the M groups of photovoltaic data to obtain M groups of photovoltaic data sequences; a third acquisition module, which is used to obtain white Gaussian noise parameters, and use the white Gaussian noise parameters to perform noise processing on the M groups of photovoltaic data sequences to obtain M groups of processed photovoltaic data sequences; a fourth acquisition module, which is used to obtain a first operator and a second operator, and use the first operator and the second operator to process each group of processed photovoltaic data sequences to obtain the M groups of modal components; The decomposition unit includes: a second calculation module, used to use the first operator to calculate each group of processed photovoltaic data sequences to obtain M groups of first local mean decomposition sequences; a third calculation module, used to use the second operator to calculate each group of first local mean decomposition sequences to obtain M groups of first residual components; a fourth calculation module, used to calculate the difference between each group of processed photovoltaic data sequences and each group of first residual components to obtain M groups of first modal components; a determination module, used to determine the M groups of modal components using the M groups of first residual components and the M groups of first modal components; The decomposition unit includes: a fifth acquisition module, used to obtain a preset order, calculate the mean of the M groups of first local mean decomposition sequences, and obtain M groups of second local mean decomposition sequences; a fifth calculation module, used to use the second operator to calculate each group of second local mean decomposition sequences to obtain M groups of second residual components; a sixth calculation module, used to calculate the difference between each group of processed photovoltaic data sequences and each group of second residual components, to obtain M groups of second modal components, until M groups of preset order residual components and M groups of preset order modal components associated with the preset order are obtained; a combination module, used to combine all groups of residual components to obtain M groups of target residual components, combine all groups of modal components to obtain M groups of target modal components, and combine each group of target residual components and each group of target modal components to obtain the M groups of modal components.
5. A computer storage medium, It is characterized in that The computer storage medium is used to store a program, wherein when the program is executed, the device where the computer storage medium is located is controlled to execute the short-term photovoltaic power prediction method according to any one of claims 1 to 3.
6. An electronic device, It is characterized in that It comprises one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the short-term photovoltaic power prediction method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Photovoltaic power station short-term generation power prediction method based on WOA-VMD-OLS
CN116307240A
Distributed photovoltaic power generation power prediction method and device, equipment and storage medium
CN117613850A
