Photovoltaic power prediction method and system based on improved DBO-LSTM neural network
By improving the DBO-LSTM neural network, combining the dung-optimization algorithm and the higher-order interactive gating mechanism, the shortcomings of the existing photovoltaic power prediction model in dealing with nonlinear relationships and timing characteristics are solved, and more efficient photovoltaic power prediction is achieved, improving the grid stability and the operation efficiency of photovoltaic power stations.
Patent Information
- Application Number
- CN202411978966.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2044-12-31
AI Technical Summary
The existing photovoltaic power prediction model has shortcomings in dealing with nonlinear relationships and timing characteristics, and the traditional parameter optimization method is inefficient.
The improved DBO-LSTM neural network is adopted to optimize the hyperparameters of the LSTM neural network through the dung beetle optimization algorithm, and combined with correlation analysis and higher-order interactive gating mechanism, the accuracy of the model for the prediction of photovoltaic power generation is improved.
It improves the accuracy of photovoltaic power generation prediction, enhances the power grid's ability to absorb photovoltaic power generation, and improves the operating efficiency of photovoltaic power stations.
Smart Images

Figure CN119397363B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of energy and electric power, and particularly relates to a photovoltaic power prediction method and system based on an improved DBO-LSTM neural network. Background Art
[0002] As a renewable energy source with rich reserves and environmental friendliness, solar energy realizes the efficient utilization of clean energy through photovoltaic power generation, playing an important role in the sustainable development of energy. However, the inherent randomness of sunlight and the rhythmic day-night cycle bring fluctuations and intermittency to photovoltaic power generation. In addition, various factors, such as weather and environmental conditions, affect the output of the photovoltaic system. When it comes to large-scale grid connection of photovoltaic power generation, the unpredictability of power generation is significant. Therefore, this unpredictability will have a negative impact on the planning of the power grid. Considering the influence of the multi-factor coupling time-varying characteristics, accurate prediction of photovoltaic power generation is effective for improving the stability of the power grid, enhancing the power grid's ability to absorb photovoltaic power generation, and improving the operation efficiency of photovoltaic power stations.
[0003] As a special type of recurrent neural network (RNN), the LSTM neural network aims to solve the long-term dependence problem encountered by traditional RNNs when dealing with long sequences and has been widely used in fields such as time series prediction. However, the LSTM neural network also has some disadvantages, mainly including: (1) complex calculations; (2) the need for a large amount of data for training; (3) long training time. Summary of the Invention
[0004] The present invention provides a photovoltaic power prediction method and system based on an improved DBO (Dung Beetle Optimizer)-LSTM neural network to solve the technical problems of the insufficient processing ability of existing models for non-linear relationships and time series characteristics, and the inefficiency of traditional parameter optimization methods.
[0005] In a first aspect, the present invention provides a photovoltaic power prediction method based on an improved DBO-LSTM neural network, including:
[0006] Obtain photovoltaic data and perform data preprocessing on the photovoltaic data, where the photovoltaic data includes meteorological sub-data and corresponding photovoltaic power generation sub-data;
[0007] Perform correlation analysis on the preprocessed photovoltaic data, and select at least one target photovoltaic data with a correlation coefficient greater than a preset threshold according to the analysis result, where the target photovoltaic data includes target meteorological sub-data and corresponding target photovoltaic power generation sub-data;
[0008] Input the at least one target photovoltaic data into the improved LSTM neural network, and perform iterative training on the improved LSTM neural network to obtain a photovoltaic power generation prediction model, where the improved LSTM neural network is obtained by optimizing the hyperparameters of the LSTM neural network according to the improved dung beetle optimization algorithm, and the expression of the dung beetle function mapping strategy in the improved dung beetle optimization algorithm is:
[0009] ,
[0010] ,
[0011] ,
[0012] ,
[0013] ,
[0014] In the formula, is the probability that a dung beetle is assigned as a ball-rolling dung beetle, is the probability that a dung beetle is assigned as a breeding dung beetle, is the probability that a dung beetle is assigned as a foraging dung beetle, is the probability that a dung beetle is assigned as a stealing dung beetle, is the fitness of the th dung beetle at the t-th iteration, is the minimum fitness of the current population, is the maximum fitness of the current population, is the population size, is the fitness of the th dung beetle at the t-th iteration, is the average fitness of all dung beetles in the population at the t-th iteration, is the ratio of the breeding and foraging functions with the number of iterations;
[0015] Input the obtained real-time meteorological sub-data into the photovoltaic power generation prediction model, and the photovoltaic power generation prediction model outputs a photovoltaic power generation power prediction result.
[0016] In a second aspect, the present invention provides a photovoltaic power generation power prediction system based on an improved DBO-LSTM neural network, including:
[0017] A processing module, configured to obtain photovoltaic data and perform data preprocessing on the photovoltaic data, where the photovoltaic data includes meteorological sub-data and photovoltaic power generation sub-data corresponding to the meteorological sub-data;
[0018] A selection module, configured to perform a correlation analysis on the preprocessed photovoltaic data, and select at least one target photovoltaic data with a correlation coefficient greater than a preset threshold according to the analysis result, wherein the target photovoltaic data includes target meteorological sub-data and target photovoltaic power generation sub-data corresponding to the target meteorological sub-data;
[0019] A training module, configured to input the at least one target photovoltaic data into an improved LSTM neural network, and perform iterative training on the improved LSTM neural network to obtain a photovoltaic power generation prediction model, wherein the improved LSTM neural network is obtained by optimizing the hyperparameters of the LSTM neural network according to an improved dung beetle optimization algorithm, and the expression of the dung beetle function mapping strategy in the improved dung beetle optimization algorithm is:
[0020] ,
[0021] ,
[0022] ,
[0023] ,
[0024] ,
[0025] In the formula, is the probability that a dung beetle is assigned as a ball-rolling dung beetle, is the probability that a dung beetle is assigned as a breeding dung beetle, is the probability that a dung beetle is assigned as a foraging dung beetle, is the probability that a dung beetle is assigned as a stealing dung beetle, is the fitness of the t-th dung beetle at the t-th iteration, is the minimum fitness of the current population, is the maximum fitness of the current population, is the fitness of the t-th dung beetle at the t-th iteration, is the average fitness of all dung beetles in the population at the t-th iteration;
[0026] An output module, configured to input the acquired real-time meteorological sub-data into the photovoltaic power generation prediction model, and the photovoltaic power generation prediction model outputs a photovoltaic power generation power prediction result.
[0027] In a third aspect, an electronic device is provided, which includes: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the steps of the photovoltaic power prediction method based on the improved DBO-LSTM neural network according to any embodiment of the present invention.
[0028] In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the program instructions are executed by a processor, the processor is enabled to execute the steps of the photovoltaic power prediction method based on the improved DBO-LSTM neural network according to any embodiment of the present invention.
[0029] The photovoltaic power prediction method and system based on the improved DBO-LSTM neural network of the present application perform a correlation analysis on photovoltaic data, and select at least one target photovoltaic data with a correlation coefficient greater than a preset threshold according to the analysis result; input the at least one target photovoltaic data into the improved LSTM neural network, perform iterative training on the improved LSTM neural network to obtain a photovoltaic power prediction model, input the acquired real-time meteorological sub-data into the photovoltaic power prediction model, and the photovoltaic power prediction model outputs a photovoltaic power prediction result, improving the accuracy of photovoltaic power prediction, which is beneficial to power system scheduling and control, power market trading, optimization of energy storage systems, and operation and maintenance of photovoltaic power stations. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for description in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0031] Figure 1 It is a flowchart of a photovoltaic power prediction method based on an improved DBO-LSTM neural network provided by an embodiment of the present invention;
[0032] Figure 2 It is a structural block diagram of a photovoltaic power prediction system based on an improved DBO-LSTM neural network provided by an embodiment of the present invention;
[0033] Figure 3 It is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0034] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0035] Please refer to Figure 1 , which shows a flowchart of a photovoltaic power prediction method based on an improved DBO-LSTM neural network of the present application.
[0036] As Figure 1 shown, the photovoltaic power prediction method based on the improved DBO-LSTM neural network specifically includes the following steps:
[0037] Step S101: Obtain photovoltaic data and perform data preprocessing on the photovoltaic data. The photovoltaic data includes meteorological sub-data and photovoltaic power generation sub-data corresponding to the meteorological sub-data.
[0038] In this step, data cleaning and data conversion are performed on the meteorological sub-data and the photovoltaic power generation sub-data. Among them, the data cleaning is specifically: processing outliers in the meteorological sub-data and the photovoltaic power generation sub-data according to a multi-dimensional self-adjusting convolutional filter, and the expression is:
[0039] ,
[0040] ,
[0041] In the formula, is the data after outlier processing, is the sliding process of the filter in the time period, is the original input data, is the time integration variable, is the filter, is the adaptive factor, is the time variable, is the degree of nonlinearity, is the attenuation rate of the filter, is the standard deviation of the Gaussian component, is the factor for adjusting the amplitude of the sine wave, is the frequency of the sine wave;
[0042] The data conversion is specifically: normalizing the meteorological sub-data and the photovoltaic power generation sub-data according to the adaptive dynamic nonlinear normalization strategy, and the expression of the adaptive dynamic nonlinear normalization strategy is:
[0043] ,
[0044] In the formula, is the value after normalization of the th feature, is the weight coefficient of the th feature, is the th feature value in the original data, is the minimum value of the th feature, is the maximum value of the th feature, is the feature value input data;
[0045] ,
[0046] In the formula, is the scaling coefficient of the th feature, is the bias factor of the th feature;
[0047] ,
[0048] In the formula, is the smoothing coefficient of the th feature;
[0049] ,
[0050] In the formula, is the output of the dynamic non - linear feature regulator.
[0051] Step S102: Perform a correlation analysis on the pre - processed photovoltaic data, and select at least one target photovoltaic data whose correlation coefficient is greater than a preset threshold according to the analysis result. Among them, the target photovoltaic data includes target meteorological sub - data and target photovoltaic power generation sub - data corresponding to the target meteorological sub - data.
[0052] In this step, in photovoltaic power prediction, it is crucial to perform a correlation analysis on meteorological data. Meteorological factors such as temperature, solar radiation intensity, humidity, wind speed, etc. directly affect the power generation efficiency and stability of the photovoltaic system. By deeply analyzing the correlation between these meteorological data and photovoltaic power generation, the photovoltaic power can be predicted more accurately. The weighted multiple - interaction correlation analysis method is introduced to analyze the correlation between each meteorological factor and photovoltaic power generation. Specifically, calculate the correlation coefficient between the meteorological sub - data and the photovoltaic power generation sub - data according to the preset non - linear interaction term. The expression is:
[0053] ,
[0054] ,
[0055] In the formula, is the correlation coefficient considering the non - linear interaction term, is the correlation coefficient between the input feature and the output variable, is the number of non - linear features, is the weight coefficient of the non - linear term, is the th input feature value, is the average value of the variable, is the th output variable, is the average value of the variable, is the standard deviation of the input feature, is the standard deviation of the output feature, is the frequency parameter of the feature, is the weight of the feature, is the th input feature value, is the th output variable, is the number of samples;
[0056] Select at least one meteorological sub - data with the correlation coefficient considering the non - linear interaction term greater than a preset threshold and the corresponding photovoltaic power generation sub - data.
[0057] Step S103, input the at least one target photovoltaic data into the improved LSTM neural network, and perform iterative training on the improved LSTM neural network to obtain a photovoltaic power generation prediction model.
[0058] In the process of the specific embodiment, before inputting the at least one target photovoltaic data into the improved LSTM neural network and performing iterative training on the improved LSTM neural network to obtain a photovoltaic power generation prediction model, the method further includes:
[0059] Optimize the hyperparameters of the LSTM neural network according to the improved dung beetle optimization algorithm to obtain an improved LSTM neural network, specifically:
[0060] During the dung beetle rolling process, the first mathematical model for updating the dung beetle position is expressed as:
[0061] ,
[0062] ,
[0063] In the formula, is the position updated by the dung beetle in the (t + 1)-th iteration, is the position updated by the dung beetle in the t-th iteration, is the degree of deviation from the value of -1 or 1. 1 indicates no deviation from the original direction, and -1 indicates deviation from the original direction, is the offset coefficient, is the position updated by the dung beetle in the (t - 1)-th iteration, is a constant, is the simulation of the change in sunlight intensity, is the position of the current species that is the worst globally;
[0064] When an individual can no longer move, the tangent function is used to determine the new rolling direction. The expression of the second mathematical model for updating the position of the dung beetle is:
[0065] ,
[0066] In the formula, is the deflection angle;
[0067] Model the egg-laying area of the dung beetle. The expression is:
[0068] ,
[0069] ,
[0070] In the formula, is the lower limit of the egg-laying area, is the current best position, , is the maximum number of iterations, is the current number of iterations, is the lower limit of the optimization problem, is the upper limit of the egg-laying area, is the upper limit of the optimization problem;
[0071] In each iteration cycle, the position of egg-laying changes continuously. The mathematical model of the position of egg-laying is expressed as:
[0072] ,
[0073] In the formula, is the position of the -th hatching ball at the (t + 1)-th iteration, is the position of the -th hatching ball at the t-th iteration, 、 are both random vectors;
[0074] Adult dung beetles forage, determine the boundaries of the optimal foraging area, and update their individual positions. The mathematical model of the boundaries of the optimal foraging area is expressed as:
[0075] ,
[0076] ,
[0077] In the formula, is the lower boundary of the optimal foraging area, is the upper boundary of the optimal foraging area, is the local best position of the previous population;
[0078] The mathematical model for updating individual positions is expressed as:
[0079] ,
[0080] In the formula, is a random number conforming to the normal distribution, is a random vector falling within the range of (0, 1);
[0081] In the dung beetle algorithm, there is a behavior of stealing food from other dung beetles. This dung beetle is called a stealing dung beetle. Therefore, assume The surrounding area is the best position for competing for food. The mathematical model used to update the position of the dung beetle during the iteration process is expressed as:
[0082] ,
[0083] In the formula, is a randomly selected D-dimensional vector conforming to the normal distribution, is a constant;
[0084] In the traditional dung beetle algorithm, there are problems such as fixed function allocation and difficulty in adapting to dynamic environments. It often fails to effectively balance global exploration and local exploitation at different evolutionary stages, resulting in being prone to falling into local optimal solutions or premature convergence. Therefore, a global solution is carried out based on the fitness-based dung beetle function mapping strategy. The expression of the dung beetle function mapping strategy is:
[0085] ,
[0086] ,
[0087] ,
[0088] ,
[0089] ,
[0090] In the formula, is the probability that a dung beetle is assigned as a ball-rolling dung beetle, is the probability that a dung beetle is assigned as a breeding dung beetle, is the probability that a dung beetle is assigned as a foraging dung beetle, is the probability that a dung beetle is assigned as a stealing dung beetle, is the fitness of the th dung beetle at the t-th iteration, is the minimum fitness of the current population, is the maximum fitness of the current population, is the population size, is the th dung beetle at the t-th iteration, is the average fitness of all dung beetles in the population at the t-th iteration,
[0091] This strategy can adjust the function allocation in real time according to the performance of individuals at different evolutionary stages, so as to balance the relationship between global exploration and local exploitation. By considering individual fitness, population distribution and the current iteration state, it effectively avoids the local optimal trap brought by the fixed mode of function allocation. At the same time, it can dynamically adjust the function ratio according to the population diversity, improve the overall search efficiency of the group, enable dung beetle individuals to adaptively adjust according to the current group state during division of labor and cooperation, thus maximizing the resource utilization rate in the optimization process and improving the robustness and convergence speed of the algorithm.
[0092] The improved dung beetle algorithm is used to iteratively update the hyperparameter combination of the LSTM neural network to maximize the fitness, and gradually find the optimal hyperparameter configuration. The expression of the optimal hyperparameter configuration is:
[0093] ,
[0094] where, is the hyperparameter combination at the t-th iteration, is the th dung beetle's iteration number of the LSTM neural network at the t-th iteration, is the th dung beetle's number of neurons in the hidden layer of the LSTM neural network at the t-th iteration, is the th dung beetle's learning rate of the LSTM neural network at the t-th iteration, is the hyperparameter combination at the (t + 1)-th iteration, is the update amount, is the loss function value under the current hyperparameter combination, is the th sample's true value, is the predicted value of the th sample, is the number of samples in the validation set, is the fitness optimization objective.
[0095] It should be noted that in the traditional LSTM neural network, the interaction between gates is relatively simple during the gate update process, relying only on the input and hidden states, and it is difficult to capture complex temporal features. Therefore, the improved LSTM neural network includes: a high-order interaction gating mechanism for the interaction between the forget gate, input gate, and output gate, and a time-dependent decay layer normalization strategy.
[0096] The expression of the high-order interaction gating mechanism is;
[0097] ,
[0098] ,
[0099] ,
[0100] ,
[0101] In the formula, is the interaction function between the hidden gate and the input gate, is the interaction function between the hidden gate and the output gate, is the interaction function between the input gate and the input gate, is the learnable weight matrix, is the activation value of the forget gate at the th time step, is the activation value of the input gate at the th time step, is the activation value of the output gate at the th time step, is the weight matrix of the current input is the weight matrix of the previous hidden state , are both scalar parameters, is the dot product, is the multiplication;
[0102]
[0102] The high - order interaction gating mechanism enables each gate to not only interact with other gates at a deeper level but also finely regulate the information flow through the gating matrix. The introduction of high - order non - linear interactions allows the gates to express more complex relationships with each other, thereby enhancing the model's ability to capture long - range dependencies and fine - grained patterns. In addition, this complex interaction structure helps to avoid the vanishing gradient problem and enables the model to exhibit higher accuracy and robustness when processing long - sequence data. Through these enhancements, the improved LSTM neural network can perform better in the face of highly non - linear and complex time - series tasks.
[0103] To accelerate the training process of the neural network and improve the generalization performance of the model, a time - dependent decay layer normalization strategy is added after the memory cell update, and the expression is:
[0104] ,
[0105] ,
[0106] ,
[0107] ,
[0108] ,
[0109] ,
[0110] In the formula, is the memory cell state of the LSTM neural network at time step t, is the dynamic mean of the memory cell at time step t, is the dynamic standard deviation of the memory cell at time step t, is the time integration variable, is the fluctuation frequency, is the memory cell state of the LSTM neural network at time step i, is the non - linear normalization function, is the decay transformation function, is time the memory cell state at time is the normalized memory cell state, is the normalization balance influence factor, is the decay rate, is the time - dependent normalization function.
[0111] Step S104: Input the obtained real - time meteorological sub - data into the photovoltaic power generation prediction model, and the photovoltaic power generation prediction model outputs the photovoltaic power generation power prediction result.
[0112] In summary, the method of the present application performs a correlation analysis on photovoltaic data, selects at least one target photovoltaic data with a correlation coefficient greater than a preset threshold according to the analysis result; inputs the at least one target photovoltaic data into an improved LSTM neural network, performs iterative training on the improved LSTM neural network to obtain a photovoltaic power generation prediction model, inputs the obtained real-time meteorological sub-data into the photovoltaic power generation prediction model, and the photovoltaic power generation prediction model outputs a photovoltaic power generation power prediction result, improving the accuracy of photovoltaic power generation power prediction, which is beneficial to power system scheduling and control, power market trading, optimization of energy storage systems, and operation and maintenance of photovoltaic power stations.
[0113] Please refer to Figure 2 , which shows a structural block diagram of a photovoltaic power generation power prediction system based on an improved DBO-LSTM neural network of the present application.
[0114] As Figure 2 shown, the photovoltaic power generation power prediction system 200 includes a processing module 210, a selection module 220, a training module 230, and an output module 240.
[0115] Among them, the processing module 210 is configured to obtain photovoltaic data and perform data preprocessing on the photovoltaic data. The photovoltaic data includes meteorological sub-data and photovoltaic power generation sub-data corresponding to the meteorological sub-data; the selection module 220 is configured to perform a correlation analysis on the preprocessed photovoltaic data, and select at least one target photovoltaic data with a correlation coefficient greater than a preset threshold according to the analysis result. Among them, the target photovoltaic data includes target meteorological sub-data and target photovoltaic power generation sub-data corresponding to the target meteorological sub-data; the training module 230 is configured to input the at least one target photovoltaic data into an improved LSTM neural network, perform iterative training on the improved LSTM neural network to obtain a photovoltaic power generation prediction model; the output module 240 is configured to input the obtained real-time meteorological sub-data into the photovoltaic power generation prediction model, and the photovoltaic power generation prediction model outputs a photovoltaic power generation power prediction result.
[0116] It should be understood that Figure 2 the modules described in Figure 1 correspond to the respective steps in the method described in reference Figure 2 . Therefore, the operations, features, and corresponding technical effects described above for the method also apply to the
[0117] In some other embodiments, the embodiments of the present invention also provide a computer-readable storage medium, on which a computer program is stored. When the program instructions are executed by a processor, the processor is caused to execute the photovoltaic power generation power prediction method based on an improved DBO-LSTM neural network in any of the above method embodiments;
[0118] As an implementation manner, the computer-readable storage medium of the present invention stores computer-executable instructions, and the computer-executable instructions are set as follows:
[0119] Obtain photovoltaic data, and perform data preprocessing on the photovoltaic data, where the photovoltaic data includes meteorological sub-data and photovoltaic power generation sub-data corresponding to the meteorological sub-data;
[0120] Perform correlation analysis on the preprocessed photovoltaic data, and select at least one target photovoltaic data whose correlation coefficient is greater than a preset threshold according to the analysis result. Among them, the target photovoltaic data includes target meteorological sub-data and target photovoltaic power generation sub-data corresponding to the target meteorological sub-data;
[0121] Input the at least one target photovoltaic data into an improved LSTM neural network, and perform iterative training on the improved LSTM neural network to obtain a photovoltaic power generation prediction model;
[0122] Input the obtained real-time meteorological sub-data into the photovoltaic power generation prediction model, and the photovoltaic power generation prediction model outputs a photovoltaic power generation power prediction result.
[0123] The computer-readable storage medium may include a storage program area and a storage data area. Among them, the storage program area may store an operating system and application programs required for at least one function; the storage data area may store data created according to the use of the photovoltaic power generation power prediction system based on the improved DBO-LSTM neural network, etc. In addition, the computer-readable storage medium may include a high-speed random access memory, and may also include a memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the computer-readable storage medium may optionally include a memory remotely provided with respect to the processor, and these remote memories may be connected to the photovoltaic power generation power prediction system based on the improved DBO-LSTM neural network through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0124] Figure 3 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention, as Figure 3 shown, the device includes: a processor 310 and a memory 320. The electronic device may further include: an input device 330 and an output device 340. The processor 310, the memory 320, the input device 330, and the output device 340 may be connected through a bus or other means, Figure 3Take the bus connection as an example. The memory 320 is the above-mentioned computer-readable storage medium. The processor 310 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions, and modules stored in the memory 320, that is, implements the photovoltaic power prediction method based on the improved DBO-LSTM neural network in the above method embodiment. The input device 330 can receive input digital or character information, and generate key signal inputs related to the user settings and function controls of the photovoltaic power prediction system based on the improved DBO-LSTM neural network. The output device 340 can include display devices such as a display screen.
[0125] The above electronic device can execute the method provided by the embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method. For the technical details not described in detail in this embodiment, reference can be made to the method provided by the embodiment of the present invention.
[0126] As an implementation manner, the above electronic device is applied to a photovoltaic power prediction system based on an improved DBO-LSTM neural network and is used for a client, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to:
[0127] Obtain photovoltaic data and perform data preprocessing on the photovoltaic data, where the photovoltaic data includes meteorological sub-data and photovoltaic power generation sub-data corresponding to the meteorological sub-data;
[0128] Perform correlation analysis on the preprocessed photovoltaic data, and select at least one target photovoltaic data whose correlation coefficient is greater than a preset threshold according to the analysis result. Among them, the target photovoltaic data includes target meteorological sub-data and target photovoltaic power generation sub-data corresponding to the target meteorological sub-data;
[0129] Input the at least one target photovoltaic data into the improved LSTM neural network, and perform iterative training on the improved LSTM neural network to obtain a photovoltaic power generation prediction model;
[0130] Input the obtained real-time meteorological sub-data into the photovoltaic power generation prediction model, and the photovoltaic power generation prediction model outputs a photovoltaic power prediction result.
[0131] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiments.
[0132] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of each embodiment of the present invention.
Claims
1. A photovoltaic power generation prediction method based on an improved DBO-LSTM neural network, characterized in that: include: Acquire photovoltaic data and perform data preprocessing on the photovoltaic data, wherein the photovoltaic data includes meteorological sub-data and photovoltaic power generation data corresponding to the meteorological sub-data; Performing correlation analysis on the preprocessed photovoltaic data, and selecting at least one target photovoltaic data having a correlation coefficient greater than a preset threshold value according to the analysis result, wherein the target photovoltaic data includes target meteorological sub-data and target photovoltaic data corresponding to the target meteorological sub-data; The at least one target photovoltaic data is input into the improved LSTM neural network, and the improved LSTM neural network is iteratively trained to obtain a photovoltaic power generation prediction model, wherein the improved LSTM neural network is obtained by optimizing the hyperparameters of the LSTM neural network according to the improved dung beetle optimization algorithm, and the expression of the dung beetle function mapping strategy in the improved dung beetle optimization algorithm is: , , , , , In the formula, is the probability that a dung beetle is assigned as a rolling ball dung beetle, is the probability of a dung beetle being assigned as a breeding dung beetle, is the probability that a dung beetle is assigned as a foraging dung beetle, is the probability that a dung beetle is assigned as a thieving dung beetle, For the A dung beetle in the The fitness at the iteration, is the minimum fitness of the current population, is the maximum fitness of the current population, is the population size, For the A dung beetle in the The fitness at the iteration, For all dung beetles in the population, The average fitness of the iterations, The ratio of reproduction and foraging functions to the number of iterations; The acquired real-time meteorological sub-data is input into the photovoltaic power generation prediction model, and the photovoltaic power generation prediction model outputs a photovoltaic power generation power prediction result.
2. According to claim 1, a photovoltaic power prediction method based on an improved DBO-LSTM neural network is characterized in that: The data preprocessing of photovoltaic data includes: The meteorological sub-data and the photovoltaic power generation electronic data are cleaned and converted, wherein the data cleaning is specifically: processing the abnormal values in the meteorological sub-data and the photovoltaic power generation electronic data according to a multi-dimensional self-adjusting convolution filter, and the expression is: , , In the formula, is the data after outlier processing. is the sliding process of the filter over the time period, is the original input data, is the time-integrated variable, is the filter, is the adaptive factor, is the time variable, is the degree of nonlinearity, is the attenuation rate of the filter, is the standard deviation of the Gaussian component, To adjust the factor of the sine wave amplitude, is the frequency of the sine wave; The data conversion is specifically as follows: normalizing the meteorological sub-data and the photovoltaic sub-data according to an adaptive dynamic nonlinear normalization strategy, wherein the expression of the adaptive dynamic nonlinear normalization strategy is: , In the formula, For the The normalized value of the feature, For the The weight coefficient of the feature, The original data eigenvalues, For the The minimum value of the features, For the The maximum value of the features, Enter data for the eigenvalues; , In the formula, For the The scaling factor of the features, For the The bias factor of each feature; , In the formula, For the The smoothing coefficient of the feature; , In the formula, is the output of the dynamic nonlinear characteristic regulator.
3. The photovoltaic power generation prediction method based on the improved DBO-LSTM neural network according to claim 1 is characterized in that: The performing correlation analysis on the preprocessed photovoltaic data and selecting at least one target photovoltaic data having a correlation coefficient greater than a preset threshold according to the analysis result comprises: The correlation coefficient between the meteorological sub-data and the photovoltaic power generation sub-data is calculated according to the preset nonlinear interaction term, and the expression is: , , In the formula, To consider the correlation coefficient of nonlinear interaction terms, is the correlation coefficient between the input feature and the output variable, is the number of nonlinear features, is the nonlinear term weight coefficient, For the Input feature values, For variables The average value of For the output variables, For variables The average value of is the standard deviation of the input features, is the standard deviation of the output features, is the frequency parameter of the characteristic, is the weight of the feature, For the Input feature values, For the output variables, is the sample size; At least one meteorological sub-data having a correlation coefficient of a nonlinear interaction term greater than a preset threshold and photovoltaic power generation electronic data corresponding to the at least one meteorological sub-data are selected.
4. The photovoltaic power generation prediction method based on the improved DBO-LSTM neural network according to claim 1 is characterized in that: Before inputting the at least one target photovoltaic data into the improved LSTM neural network and iteratively training the improved LSTM neural network to obtain a photovoltaic power generation prediction model, the method further includes: The hyperparameters of the LSTM neural network are optimized according to the improved dung beetle optimization algorithm to obtain an improved LSTM neural network, specifically: During the rolling process of the dung beetle, the first mathematical model for updating the position of the dung beetle is expressed as: , , In the formula, For dung beetles +1 The updated position in the iteration, For dung beetles The updated position in the iteration, It is the degree of deviation from -1 or 1, 1 means no deviation from the original direction, -1 means deviation from the original direction. is the offset coefficient, For dung beetles -1 The updated position in the iteration, is a constant, To simulate the change of sunlight intensity, is the worst position of the species in the world at present; When the individual cannot move further, the tangent function is used to determine the new rolling direction. The expression of the second mathematical model for updating the position of the dung beetle is: , In the formula, is the deflection angle; Model the dung beetle egg-laying area, the expression is: , , In the formula, is the lower limit of the spawning area, is the current best position, , is the maximum number of iterations, is the current iteration number, is the lower bound of the optimization problem, is the upper limit of the spawning area, is the upper limit of the optimization problem; In each iteration cycle, the spawning position keeps changing, and the mathematical model of the spawning position is expressed as: , In the formula, For the The hatching ball is in the The position at +1 iteration, For the The hatching ball is in the The position at the iteration, , are all random vectors; Adult dung beetles forage to determine the optimal foraging area boundary and update individual positions. The mathematical model of the optimal foraging area boundary is expressed as: , , In the formula, is the lower boundary of the optimal foraging area, is the upper boundary of the optimal foraging area, is the local optimal position of the previous population; The mathematical model for updating individual positions is expressed as: , In the formula, is a random number that conforms to the normal distribution. is a random vector in the range (0,1); In the dung beetle algorithm, there is a behavior of stealing food from other dung beetles, which is called a stealing dung beetle. Therefore, assuming The surrounding area is the best location to compete for food. The mathematical model used to update the position of the dung beetle during the iteration process is expressed as: , In the formula, is a randomly selected D-dimensional vector that conforms to the normal distribution, is a constant; The global solution is obtained by mapping the functions of dung beetles based on fitness; The improved dung beetle algorithm is used to iteratively update the hyperparameter combination of the LSTM neural network to maximize fitness and gradually find the optimal hyperparameter configuration. The expression of the optimal hyperparameter configuration is: , In the formula, For the The hyperparameter combination for the iteration, For the Dung beetle The number of iterations of the LSTM neural network at iterations, For the Dung beetle individuals in the The number of neurons in the hidden layer of the LSTM neural network at the iteration, For the Dung beetle individuals in the The learning rate of the LSTM neural network at the iteration, For the +1 iteration of hyperparameter combinations, is the update amount, is the loss function value under the current hyperparameter combination, For the The true value of the samples, For the The predicted value of samples, is the number of samples in the validation set, The goal of fitness optimization.
5. The photovoltaic power generation prediction method based on the improved DBO-LSTM neural network according to claim 1 is characterized in that: The improved LSTM neural network includes: a high-order interactive gating mechanism for the interaction between the forget gate, the input gate, and the output gate, and a time-dependent attenuation layer normalization strategy; The expression of the high-order interactive gating mechanism is: , , , , In the formula, is the interaction function between the hidden gate and the input gate, is the interaction function between the hidden gate and the output gate, is the interaction function between the input gate and the input gate, is the learnable weight matrix, is the activation value of the forget gate at the tth time step, is the activation value of the input gate at the tth time step, is the activation value of the output gate at the tth time step, For current input The weight matrix of For the previous moment The weight matrix of the hidden state, is the input data of the current time step, is the hidden state of the previous time step, , are scalar parameters, is the dot product, To multiply; The expression of the time-dependent attenuation layer normalization strategy is: , , , , , , In the formula, is the memory cell state of the LSTM neural network at time step t, is the dynamic mean of the memory unit at time step t, is the dynamic standard deviation of the memory unit at time step t, is the time-integrated variable, is the fluctuation frequency, is the memory cell state of the LSTM neural network at time step i, is a nonlinear normalization function, is the attenuation transformation function, For time The state of the memory unit at the moment, is the normalized memory cell state, is the normalized equilibrium impact factor, is the decay rate, is the time-dependent normalization function.
6. A photovoltaic power generation prediction system based on an improved DBO-LSTM neural network, characterized in that: include: A processing module configured to obtain photovoltaic data and perform data preprocessing on the photovoltaic data, wherein the photovoltaic data includes meteorological sub-data and photovoltaic power generation data corresponding to the meteorological sub-data; A selection module is configured to perform a correlation analysis on the preprocessed photovoltaic data, and select at least one target photovoltaic data having a correlation coefficient greater than a preset threshold value according to the analysis result, wherein the target photovoltaic data includes target meteorological sub-data and target photovoltaic data corresponding to the target meteorological sub-data; The training module is configured to input the at least one target photovoltaic data into an improved LSTM neural network, iteratively train the improved LSTM neural network, and obtain a photovoltaic power generation prediction model, wherein the improved LSTM neural network is obtained by optimizing the hyperparameters of the LSTM neural network according to an improved dung beetle optimization algorithm, and the expression of the dung beetle function mapping strategy in the improved dung beetle optimization algorithm is: , , , , , In the formula, is the probability that a dung beetle is assigned as a rolling ball dung beetle, is the probability of a dung beetle being assigned as a breeding dung beetle, is the probability that a dung beetle is assigned as a foraging dung beetle, is the probability that a dung beetle is assigned as a thieving dung beetle, For the A dung beetle in the The fitness at the iteration, is the minimum fitness of the current population, is the maximum fitness of the current population, is the population size, For the A dung beetle in the The fitness at the iteration, For all dung beetles in the population, The average fitness of the iterations, The ratio of reproduction and foraging functions to the number of iterations; The output module is configured to input the acquired real-time meteorological sub-data into the photovoltaic power generation prediction model, and the photovoltaic power generation prediction model outputs the photovoltaic power generation power prediction result.
7. An electronic device, characterized in that: include: At least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method described in any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Method and device for predicting photovoltaic power generation power
CN118735066A
Unmanned vehicle scheduling method for instant logistics
CN118798757A