Short-term photovoltaic power prediction method and device
The CNN-BiLSTM model optimized by VMD decomposition and WOA algorithm combined with the attention mechanism, the problems of insufficient feature extraction and slow convergence speed of photovoltaic power prediction in the prior art are solved, significantly improving the prediction accuracy and model stability.
Patent Information
- Application Number
- CN202410934452.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-11-08
AI Technical Summary
The prior art has problems such as insufficient feature capability extraction and loss of key information in short-term photovoltaic power prediction, which leads to limited prediction accuracy, especially WOA algorithms are prone to local optimality and slow convergence speed.
VMD decomposition is used to process photovoltaic power generation data, combine WOA algorithm to optimize the CNN-BiLSTM model, and introduce an attention mechanism to form a WOA-CNN-BiLSTM--Attention model to generate photovoltaic power prediction results.
The accuracy of short-term photovoltaic power prediction and the convergence speed of the model are improved, and the generalization ability and accuracy of the prediction model are enhanced.
Smart Images

Figure CN118920448A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of photovoltaic power generation data analysis, and in particular to a short-term photovoltaic power prediction method and device. Background Art
[0002] Due to the shortage of fossil fuels, environmental pollution and greenhouse effect problems are becoming more and more serious, and the development and utilization of renewable energy has gradually attracted worldwide attention. Solar energy is a clean energy with huge reserves and high development potential. Photovoltaic power generation is one of the main forms of solar energy utilization and has received increasing attention from researchers in recent years. When photovoltaic panels are used for power generation on a large scale, photovoltaic power must be predicted to ensure the reliability, stability and economy of the power grid.
[0003] Photovoltaic power generation prediction is an essential key link in the integration of photovoltaic power plants, and can provide an effective basis for power generation, dispatching and maintenance of power systems. Accurate prediction results will greatly reduce the peak load pressure brought by photovoltaic grid connection and reduce the negative impact on the power grid, thereby ensuring the safe operation of the power grid. Therefore, the research on short-term photovoltaic power prediction has important practical significance. The randomness and volatility of solar power output make the output power of photovoltaic power generation unstable, which increases the difficulty of photovoltaic power prediction.
[0004] In the related technologies, photovoltaic power prediction widely uses deep learning such as recursive neural network (RNN), random forest algorithm and vector learning machine. This method has the difficulty of insufficient feature extraction and key information loss when processing complex time series, which often greatly limits the prediction accuracy of traditional methods. Summary of the invention
[0005] In view of this, the present application provides a short-term photovoltaic power prediction method and device, which can improve the accuracy of photovoltaic power prediction.
[0006] In a first aspect, the present application provides a short-term photovoltaic power prediction method, comprising: Obtain historical characteristic data of photovoltaic power; Decomposing the photovoltaic power historical characteristic data based on VMD to form a time characteristic sequence of photovoltaic power; Construct a WOA-CNN-BiLSTM--Attention model, and use the time feature sequence as the input and output object of the WOA-CNN-BiLSTM--Attention model to obtain a photovoltaic power prediction model; The power load characteristic data to be analyzed is input into the trained photovoltaic power prediction model to generate photovoltaic power prediction results.
[0007] Optionally, the acquiring of photovoltaic power historical characteristic data is specifically: The photovoltaic power historical characteristic data is obtained according to the historical power generation data of the power prediction target area and the corresponding electric power influencing factors.
[0008] Optionally, build a WOA-CNN-BiLSTM--Attention model, including: The WOA algorithm is used to optimize the hyperparameters of CNN-BiLSTM’s learning rate, hidden layer nodes, and regularization coefficient to obtain the best hyperparameter combination to form a WOA-CNN-BiLSTM model. An attention mechanism is introduced into the WOA-CNN-BiLSTM model to obtain a WOA-CNN-BiLSTM--Attention model.
[0009] Optionally, in the process of combinatorial optimization of CNN-BiLSTM hyperparameters by the WOA algorithm, the best search strategy is in the following form: ;
[0010] in, is the current number of iterations, is the distance between the actual position of the current individual and the position of the best individual, is the position of the best individual, is the actual position of the current individual, , is the coefficient vector, , is a random vector in [0,1], are random vector coefficients.
[0011] Optionally, in the process of combinatorial optimization of CNN-BiLSTM hyperparameters by the WOA algorithm, the position update formula is in the following form: ; in, is the distance between the current search individual and the current optimal solution, is the probability, is the position of the best individual, is the current actual position, is the spiral shape parameter, is a random number uniformly distributed in the range [-1,1]. is the coefficient vector, is the current iteration number.
[0012] Optionally, if the coefficient vector satisfy , the position update formula is in the following form,
[0013] In the formula, is the current number of iterations, , is the coefficient vector, is the distance from the search individual, Represents the current random individual position.
[0014] Optionally, an attention mechanism is introduced, which is expressed in the following formula:
[0015] In the formula, Source consists of a series of key-value pairs Composition; Query represents a given Target element; Key is the Key value of the element in Source; Value is the Value value of the element in Source; Attention Value is the weighted sum of the Value values.
[0016] In a second aspect, the present application provides a short-term photovoltaic power prediction device, comprising: An acquisition module is used to obtain photovoltaic power historical characteristic data; A decomposition module, used for decomposing the photovoltaic power historical characteristic data based on VMD to form a time characteristic sequence of photovoltaic power; A construction module is used to construct a WOA-CNN-BiLSTM--Attention model, and the time feature sequence is used as the input and output object of the WOA-CNN-BiLSTM--Attention model to obtain a photovoltaic power prediction model; The generation module is used to input the power load characteristic data to be analyzed into the trained photovoltaic power prediction model to generate photovoltaic power prediction results.
[0017] In a third aspect, the present application provides a computer-readable storage medium, comprising a program, which, when executed on a computer, enables the computer to execute the above method.
[0018] In a fourth aspect, the present application provides an execution device, comprising a processor and a memory, wherein the processor is coupled to the memory; The memory is used to store programs; The processor is used to execute the program in the memory, so that the execution device executes the above method.
[0019] In the method disclosed in the present application, by introducing VMD to process photovoltaic power generation data before using the WOA algorithm when constructing the corresponding prediction model, and adding an attention mechanism after the WOA algorithm, the problems of the WOA algorithm being prone to falling into local optimality and slow algorithm convergence speed when the existing single WOA algorithm and LSTM model are used for short-term photovoltaic power prediction are solved, so that the accuracy of short-term photovoltaic power prediction can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The technical solution and other beneficial effects of the present application will be made apparent by describing in detail the specific implementation methods of the present application in conjunction with the accompanying drawings.
[0021] Figure 1 An operational flow chart of a short-term photovoltaic power prediction method provided by an exemplary embodiment is shown.
[0022] Figure 2 A graph of power generation data to be analyzed provided by an exemplary embodiment is shown.
[0023] Figure 3 A comparison chart of fitness values between the prediction method of the present application provided by an exemplary embodiment and that based on a pure WOA algorithm is shown.
[0024] Figure 4 A test chart showing the prediction accuracy of the method of the present application provided by an exemplary embodiment is shown.
[0025] Figure 5 A test diagram of the generalization ability of the prediction model of the method of the present application provided by an exemplary embodiment is shown.
[0026] Figure 6 A block diagram of a short-term photovoltaic power prediction device provided by an exemplary embodiment is shown.
[0027] Figure 7 A block diagram of the execution device provided by an exemplary embodiment is shown. DETAILED DESCRIPTION
[0028] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present application, so the present application is not limited by the specific embodiments disclosed below. The terms "first", "second", etc. in the specification and claims of this application 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 interchangeable where appropriate, so that the embodiments described here can be implemented in an order other than that illustrated or described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices. The naming or numbering of steps in this application does not mean that the steps in the method flow must be executed in the time / logical sequence indicated by the naming or numbering. The process steps that have been named or numbered can change the execution order according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved. The division of units in this application is a logical division. There may be other division methods when it is implemented in actual applications. For example, multiple units can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection between units can be electrical or other similar forms, which are not limited in this application. In addition, the units or sub-units described as separate components may or may not be physically separated, may or may not be physical units, or may be distributed in multiple circuit units, and some or all of the units may be selected according to actual needs to achieve the purpose of the present application.
[0029] Please refer to Figure 1 ,in Figure 1 A flowchart of a short-term photovoltaic power prediction method provided by an exemplary embodiment is shown. The method is implemented through steps 102-106.
[0030] In step 102, photovoltaic power historical characteristic data is obtained.
[0031] As a demonstration form of actual operation of photovoltaic power historical characteristic data, historical data of power generation data in the power prediction target area and corresponding electric power influencing factor data are obtained, and conventional data characterization processing is performed on these data to form photovoltaic power historical characteristic data.
[0032] Here, the historical data of power generation data can be as follows Figure 2 The daily photovoltaic power generation power (i.e. the power generation power at different hours of the day) represented can also be the monthly photovoltaic power generation power, etc.
[0033] In step 104, the photovoltaic power historical characteristic data is decomposed based on VMD to form a time characteristic sequence of photovoltaic power.
[0034] Here, the term "VMD" refers to Variational Mode Decomposition, a new adaptive signal decomposition method that decomposes the signal into several intrinsic mode functions (IMFs) with limited bandwidth through variational optimization. Unlike empirical mode decomposition (EMD), the VMD algorithm does not require preset basis functions, avoids mode aliasing problems during the decomposition process, has better frequency aggregation, good noise resistance and adaptability.
[0035] The purpose of VMD decomposition is to obtain a sequence with a certain bandwidth and center frequency. The formula is: (1); in, For the modal components, For the The center frequency of the modal components, is the smoothing coefficient, is the Dirac function, represents the convolution operation, Is an imaginary unit.
[0036] In step 106, a WOA-CNN-BiLSTM--Attention model is constructed, and the time feature sequence is used as the input and output object of the WOA-CNN-BiLSTM--Attention model to obtain a photovoltaic power prediction model.
[0037] As a better demonstration example, the WOA-CNN-BiLSTM--Attention model is constructed, including: Step 106A1: Use the WOA algorithm to optimize the hyperparameters of the learning rate, hidden layer nodes, and regularization coefficient of the CNN-BiLSTM to obtain the best hyperparameter combination to form a WOA-CNN-BiLSTM model.
[0038] It is well known to technicians in the relevant field that the CNN-BiLSTM model refers to a comprehensive model based on two neural network models: Convolutional Neural Networks (CNN) and Bi-directional Long Short-Term Memory (BiLSTM).
[0039] The photovoltaic power prediction model of the present application is constructed using CNN, taking into account the generalization performance of CNN as an enhanced model and preventing overfitting, thereby further improving the accuracy of the prediction results.
[0040] WOA stands for Whale Optimization Algorithm (WOA).
[0041] In this step 106A1, the hyperparameters of the learning rate, hidden layer nodes and regularization coefficient of CNN-BiLSTM are combined and optimized through the WOA algorithm. The data form adopted is a training set in which the time characteristic sequence of photovoltaic power is randomly divided. Based on the training set, the other part of the time characteristic sequence of photovoltaic power randomly divided, namely the test set, is used for training the photovoltaic power prediction model.
[0042] As a demonstration, the WOA algorithm is used to optimize the learning rate, hidden layer nodes, and regularization coefficient of CNN-BiLSTM, including: For the optimized WOA algorithm, the population size is initialized, and the population is initialized by random mapping to obtain the initialization parameters and the corresponding individual positions, and the number of iterations is set; the numerical range of the hyperparameter learning rate and the number of hidden layer neurons is set, and the fitness of the individual position is calculated based on the numerical value range to determine the optimal individual and the corresponding optimal individual position; Determine whether the iteration termination condition is met; If the iteration termination condition is met, the iteration is stopped, and the current optimal individual and the corresponding optimal solution position are used as the optimal hyperparameter combination of BiLSTM; If the iteration termination condition is not met, the coefficient is updated, the position update strategy is redetermined according to the coefficient, and the individual position is updated through the position update formula corresponding to the position update strategy to redetermine the optimal individual and the corresponding optimal solution position.
[0043] As a better demonstration of the optimal search strategy, its expression is: (2); in, is the current iteration number, is the distance between the actual position of the current individual and the position of the best individual, is the current best individual position, , is the coefficient vector.
[0044] If there is a better solution, the WOA algorithm will continuously update the position of the optimal individual , where the vector , The expression is as follows: (3); in, are random vector coefficients.
[0045] Throughout the iteration process, It decreases linearly from 2 to 0. , is a random vector in [0,1] As an example of the position update formula form, the expression is: (4); in, is the distance between the current search individual and the current optimal solution, is the spiral shape parameter, is a random number uniformly distributed in the range [-1,1].
[0046] The position update formula is based on the probability There are two specific forms: (5); in, is a random number with a value in [0,1]. and As the number of iterations increases, it gradually decreases. , it means that the current optimal solution has been surrounded and the local optimization has begun.
[0047] When some search individuals enter the local optimization, other search individuals will enter the global optimization. The position update formula becomes: (6); in, is the distance from the search individual, Represents the current random individual position.
[0048] when Select random search when When choosing the best, WOA can Selecting appropriate expressions for prediction has stronger global search capabilities and convergence speed compared to traditional optimization algorithms such as particle swarm optimization (PSO) and genetic algorithm (GA). WOA only needs to update the position of the current optimal solution in each iteration, which greatly reduces the time complexity of the algorithm.
[0049] Step 106A2: Introduce an attention mechanism into the WOA-CNN-BiLSTM model to obtain a WOA-CNN-BiLSTM--Attention model.
[0050] Attention Mechanism (Attention Mechanism or Attention), sometimes also called neural attention mechanism, enables neural network to focus on its input (or feature) subset: select specific input. Attention can be applied to any type of input regardless of its shape. In the case of limited computing power, attention mechanism is a resource allocation scheme that is the main means to solve the problem of information overload, allocating computing resources to more important tasks.
[0051] In a preferred embodiment, an attention mechanism is introduced, which is expressed in the following formula: (7); In the formula, Source consists of a series of key-value pairs Composition; Query represents the given Target element; Key is the Key value of the element in Source; Value is the Value value of the element in Source; Attention Value is the weighted sum of the Value values.
[0052] The first stage is to calculate the correlation between the query and different keys, that is, to calculate the weight coefficients of different values; the second stage is to normalize the output of the previous stage and map the range of values between 0 and 1; the third stage is to perform weighted summation on the values to obtain the values of the attention, thereby redistributing the weights. This can help the model focus more deeply on the core data of the input sequence, thereby enhancing the accuracy and rapid convergence of the model.
[0053] In step 108, the power load characteristic data to be analyzed is input into the trained photovoltaic power prediction model to generate a photovoltaic power prediction result.
[0054] It is easy to imagine that during the training process of the photovoltaic power prediction model, the time characteristic series of photovoltaic power is randomly divided into a test set to verify the accuracy of the photovoltaic power prediction model.
[0055] The prediction accuracy of the VMD-WOA-BiLSTM-Attention short-term photovoltaic power prediction model is verified by the test set, including the mean absolute percentage error (MAPE), root mean square error (RMSE), and determination coefficient. (Coefficient of Determination) is used as an evaluation index of the prediction accuracy of the VMD-WOA-BiLSTM-Attention short-term photovoltaic power prediction model. The corresponding evaluation index value is obtained according to the test set, and the prediction accuracy of the VMD-WOA-BiLSTM-Attention short-term photovoltaic power prediction model is verified according to the evaluation index value.
[0056] Mean Absolute Error (MAE) (8); RMSE is one of the commonly used indicators for evaluating the accuracy of prediction models. Its idea is to quantify the deviation between the predicted value and the true value. The calculation content is the square root of the sum of the squares of the difference between the predicted value and the true value. The smaller the value, the smaller the error and the stronger the prediction ability of the model. Its calculation formula is: Root mean square error, (9); In the formula is the number of samples, is the true value, is the predicted value.
[0057] As a common time series evaluation indicator, MAPE measures the deviation between the predicted result and the actual value in an intuitive percentage form. Its value range is from 0 to positive infinity. The smaller the value, the higher the accuracy of the symbolic prediction model. It is generally believed that if MAPE is below 10%, the model is considered to have good prediction performance. Its calculation formula is as follows: Mean absolute percentage error, (10); The coefficient of determination is an indicator used to assess the goodness of fit of a regression model, which indicates the proportion of data variance that the model can explain. The value of is between 0 and 1. The closer it is to 1, the better the model fit is, and the closer the predicted result is to the actual value. The calculation formula is as follows: (11).
[0058] In order to further support the claimed effect of this prediction method, the relevant verification results of the prediction method of this application are introduced below.
[0059] The experimental algorithm codes are all deployed and run on Python. The Python version is 3.8 (64 bit) First, the original data of photovoltaic power generation in a certain place in Xinjiang are selected as data, and the single WOA algorithm in the prediction model of this application and related technologies is trained, and the relevant verifications of "(1) fitness value" and "(2) consistency with actual results" are implemented as follows.
[0060] (1) Fitness value Depend on Figure 3 It can be seen that after adding the variational mode decomposition (VMD) method to process the original photovoltaic power data to extract more representative features and reduce noise, and adding the Attention mechanism to help the model pay more attention to the core data of the input sequence, the WOA algorithm model with VMD and Attention mechanism has better convergence speed and stability during training than the single WOA algorithm model.
[0061] (2) Consistency with actual results like Figure 4 As shown in the figure, the two curves of this prediction method (VMD-WOA-BiLSTM-Attention) and the actual result are almost consistent, which fully demonstrates that the prediction accuracy of this prediction method can basically meet expectations.
[0062] (3) Model evaluation indicators In order to further prove the superiority of a short-term photovoltaic power prediction method based on VMD-WOA-BiLSTM-Attention proposed in this patent, it is gradually decomposed and compared with other popular prediction methods. LSTM and gated recurrent unit (GRU) are both algorithms evolved from RNN, and both solve the problems of RNN gradient disappearance and gradient explosion. GRU only uses one parameter of the update gate to control the information transmission between the previous moment and the current moment, while LSTM uses two gate parameters, the input gate and the forget gate, for iterative updates. Both algorithms are widely used in the field of time series prediction. In addition, Transformer is a completely new model that is completely different from RNN. It is a deep model architecture built entirely by the attention mechanism. In recent years, it has gradually surpassed the RNN-based deep learning model in the fields of computer vision and natural language processing to become the most popular model.
[0063] In order to verify the superiority of the algorithm proposed in this paper, this paper compares it with the above-mentioned prediction methods. The photovoltaic data of a certain place in Xinjiang is still used as training data, and part of it is taken as a validation set to verify the performance of the model. Its performance indicators are shown in the following table:
[0064] The experimental results show that the prediction model of this application, namely the VMD-WOA-BiLSTM-Attention model, is superior to other methods in all evaluation indicators, and the introduction of the VMD mechanism or the Attention mechanism alone can also improve the performance of the model, reflecting the advantages of the network model 1 architecture proposed in this patent. In addition, the value of R² of this model on the test set is 0.973, which shows that this architecture can fully capture the correlation between load data and spatiotemporal characteristics, reflecting its good prediction performance.
[0065] (4) Model generalization ability In order to further verify the generalization ability of the model, we selected the photovoltaic power generation data of a certain place in Hainan as a data set to test the generalization ability of the model. From a macro perspective, Hainan and Xinjiang have completely different geographical characteristics in the new data set, which can be used to comprehensively explore the generalization ability of the model.
[0066] The training results are as follows Figure 5 As shown, its indicators =0.965MAPE(%)=3.72, although compared with the indicators of a certain place in Xinjiang =0.973 and MAPE(%)=3.05, the model accuracy has decreased, but the model still maintains high performance and successfully completes the prediction task, reflecting that the model has excellent generalization ability.
[0067] Please refer to Figure 6 , which shows a block diagram of the short-term photovoltaic power prediction device provided by the present application. The device 200 includes: An acquisition module 202 is used to acquire photovoltaic power historical characteristic data; A decomposition module 204, configured to decompose the photovoltaic power historical characteristic data based on VMD to form a time characteristic sequence of photovoltaic power; A construction module 206 is used to construct a WOA-CNN-BiLSTM--Attention model, and use the time feature sequence as an input and output object of the WOA-CNN-BiLSTM--Attention model to obtain a photovoltaic power prediction model; The generating module 208 is used to input the power load characteristic data to be analyzed into the trained photovoltaic power prediction model to generate a photovoltaic power prediction result.
[0068] Since the above methods have been discussed in detail, the specific implementation of the above modules will not be repeated here.
[0069] Next, an execution device provided by an embodiment of the present application is introduced. Figure 7 , Figure 7This is a schematic diagram of a structure of an execution device provided in an embodiment of the present application. The execution device 300 can be specifically manifested as an autonomous driving vehicle, a mobile phone, a tablet, a laptop computer, a desktop computer, a monitoring data processing device, etc., which is not limited here. Figure 1 The functions of the execution device in the corresponding embodiment. Specifically, the execution device 300 includes: a receiver 301, a transmitter 302, a processor 303 and a memory 304 (wherein the number of the processor 303 in the execution device 300 can be one or more, Figure 7 In the example of FIG. 3 , the processor 303 may include an application processor 3031 and a communication processor 3032. In some embodiments of the present application, the receiver 301, the transmitter 302, the processor 303 and the memory 304 may be connected via a bus or other means.
[0070] The memory 304 may include a read-only memory and a random access memory, and provides instructions and data to the processor 303. A portion of the memory 304 may also include a non-volatile random access memory (NVRAM). The memory 304 stores processor and operation instructions, executable modules or data structures, or subsets thereof, or extended sets thereof, wherein the operation instructions may include various operation instructions for implementing various operations.
[0071] The processor 303 controls the operation of the execution device. In a specific application, the various components of the execution device are coupled together through a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus, and a status signal bus, etc. However, for the sake of clarity, various buses are referred to as bus systems in the figure.
[0072] The method disclosed in the above embodiment of the present application can be applied to the processor 303, or implemented by the processor 303. The processor 303 can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 303. The above processor 303 can be a general processor, a digital signal processor (digital signal processing, DSP), a microprocessor or a microcontroller, and can further include an application specific integrated circuit (application specific integrated circuit, ASIC), a field programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The processor 303 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 304, and the processor 303 reads the information in the memory 304 and completes the steps of the above method in combination with its hardware.
[0073] The receiver 301 can be used to receive input digital or character information and generate signal input related to the relevant settings and function control of the execution device. The transmitter 302 can be used to output digital or character information through the first interface; the transmitter 302 can also be used to send instructions to the disk group through the first interface to modify the data in the disk group; the transmitter 302 can also include a display device such as a display screen.
[0074] In the embodiment of the present application, the processor 303 is used to execute Figure 1 The specific manner in which the application processor 3031 in the processor 303 performs the above steps is the same as that in the present application. Figure 1 The corresponding method embodiments are based on the same concept, and the technical effects they bring are the same as those in this application. Figure 1 The corresponding method embodiments are the same. For specific contents, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.
[0075] The above is only a preferred specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed in the present application should be covered within the protection scope of the present application.
Claims
1. A short-term photovoltaic power prediction method, It is characterized in that include: Obtain historical characteristic data of photovoltaic power; Decomposing the photovoltaic power historical characteristic data based on VMD to form a time characteristic sequence of photovoltaic power; Construct a WOA-CNN-BiLSTM--Attention model, and use the time feature sequence as the input and output object of the WOA-CNN-BiLSTM--Attention model to obtain a photovoltaic power prediction model; The power load characteristic data to be analyzed is input into the trained photovoltaic power prediction model to generate photovoltaic power prediction results.
2. The method according to claim 1, It is characterized in that The obtaining of photovoltaic power historical characteristic data is specifically as follows: The photovoltaic power historical characteristic data is obtained according to the historical power generation data of the power prediction target area and the corresponding electric power influencing factors.
3. The method according to claim 1, It is characterized in that Build the WOA-CNN-BiLSTM--Attention model, including: The WOA algorithm is used to optimize the hyperparameters of CNN-BiLSTM’s learning rate, hidden layer nodes, and regularization coefficient to obtain the best hyperparameter combination to form a WOA-CNN-BiLSTM model. An attention mechanism is introduced into the WOA-CNN-BiLSTM model to obtain a WOA-CNN-BiLSTM--Attention model.
4. The method according to claim 3, It is characterized in that In the process of combinatorial optimization of CNN-BiLSTM hyperparameters by WOA algorithm, the best search strategy is as follows: ; in, is the current number of iterations, is the distance between the actual position of the current individual and the position of the best individual, is the position of the best individual, is the actual position of the current individual, , is the coefficient vector, , is a random vector in [0,1], are random vector coefficients.
5. The method according to claim 1, It is characterized in that In the process of combinatorial optimization of CNN-BiLSTM hyperparameters through the WOA algorithm, the position update formula is as follows: ; in, is the distance between the current search individual and the current optimal solution, is the probability, is the position of the best individual, is the current actual position, is the spiral shape parameter, is a random number uniformly distributed in the range [-1,1]. is the coefficient vector, is the current iteration number.
6. The method according to claim 5, It is characterized in that If the coefficient vector satisfy , the position update formula is in the following form, In the formula, is the current number of iterations, , is the coefficient vector, is the distance from the search individual, Represents the current random individual position.
7. The method according to claim 3, It is characterized in that The attention mechanism is introduced, which is expressed in the following formula: In the formula, Source consists of a series of key-value pairs Composition; Query represents the given Target element; Key is the Key value of the element in Source; Value is the Value value of the element in Source; Attention Value is the weighted sum of the Value values.
8. A short-term photovoltaic power prediction device, It is characterized in that include: An acquisition module is used to obtain photovoltaic power historical characteristic data; A decomposition module, used for decomposing the photovoltaic power historical characteristic data based on VMD to form a time characteristic sequence of photovoltaic power; A construction module is used to construct a WOA-CNN-BiLSTM--Attention model, and the time feature sequence is used as the input and output object of the WOA-CNN-BiLSTM--Attention model to obtain a photovoltaic power prediction model; The generation module is used to input the power load characteristic data to be analyzed into the trained photovoltaic power prediction model to generate photovoltaic power prediction results.
9. A computer-readable storage medium, It is characterized in that The invention comprises a program, which, when being executed on a computer, causes the computer to execute the method according to any one of claims 1 to 7.
10. An execution device, It is characterized in that comprising a processor and a memory, wherein the processor is coupled to the memory; The memory is used to store programs; The processor is configured to execute the program in the memory so that the execution device executes the method according to any one of claims 1 to 7.
